Changeset 160099 in webkit
- Timestamp:
- Dec 4, 2013, 10:20:37 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 11 added
- 1 deleted
- 66 edited
- 7 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSContext.h
r159723 r160099 165 165 @property(readonly, retain) JSVirtualMachine *virtualMachine; 166 166 167 /*! 168 @property 169 @discussion Name of the JSContext. Exposed when remote debugging the context. 170 */ 171 @property(copy) NSString *name; 172 167 173 @end 168 174 -
trunk/Source/JavaScriptCore/API/JSContext.mm
r159531 r160099 167 167 } 168 168 169 - (NSString *)name 170 { 171 JSStringRef name = JSGlobalContextCopyName(m_context); 172 if (!name) 173 return nil; 174 175 return [(NSString *)JSStringCopyCFString(kCFAllocatorDefault, name) autorelease]; 176 } 177 178 - (void)setName:(NSString *)name 179 { 180 JSStringRef nameJS = JSStringCreateWithCFString((CFStringRef)[name copy]); 181 JSGlobalContextSetName(m_context, nameJS); 182 JSStringRelease(nameJS); 183 } 184 169 185 @end 170 186 -
trunk/Source/JavaScriptCore/API/JSContextRef.cpp
r159605 r160099 214 214 } 215 215 216 JSStringRef JSGlobalContextCopyName(JSGlobalContextRef ctx) 217 { 218 if (!ctx) { 219 ASSERT_NOT_REACHED(); 220 return 0; 221 } 222 223 ExecState* exec = toJS(ctx); 224 APIEntryShim entryShim(exec); 225 226 String name = exec->vmEntryGlobalObject()->name(); 227 if (name.isNull()) 228 return 0; 229 230 return OpaqueJSString::create(name).leakRef(); 231 } 232 233 void JSGlobalContextSetName(JSGlobalContextRef ctx, JSStringRef name) 234 { 235 if (!ctx) { 236 ASSERT_NOT_REACHED(); 237 return; 238 } 239 240 ExecState* exec = toJS(ctx); 241 APIEntryShim entryShim(exec); 242 243 exec->vmEntryGlobalObject()->setName(name ? name->string() : String()); 244 } 245 246 216 247 class BacktraceFunctor { 217 248 public: -
trunk/Source/JavaScriptCore/API/JSContextRef.h
r157468 r160099 134 134 JS_EXPORT JSGlobalContextRef JSContextGetGlobalContext(JSContextRef ctx) CF_AVAILABLE(10_7, 4_0); 135 135 136 /*! 137 @function 138 @abstract Gets a copy of the name of a context. 139 @param ctx The JSGlobalContext whose name you want to get. 140 @result The name for ctx. 141 @discussion A JSGlobalContext's name is exposed for remote debugging to make it 142 easier to identify the context you would like to attach to. 143 */ 144 JS_EXPORT JSStringRef JSGlobalContextCopyName(JSGlobalContextRef ctx); 145 146 /*! 147 @function 148 @abstract Sets the remote debugging name for a context. 149 @param ctx The JSGlobalContext that you want to name. 150 @param name The remote debugging name to set on ctx. 151 */ 152 JS_EXPORT void JSGlobalContextSetName(JSGlobalContextRef ctx, JSStringRef name); 153 136 154 #ifdef __cplusplus 137 155 } -
trunk/Source/JavaScriptCore/CMakeLists.txt
r160094 r160099 12 12 "${JAVASCRIPTCORE_DIR}/heap" 13 13 "${JAVASCRIPTCORE_DIR}/debugger" 14 "${JAVASCRIPTCORE_DIR}/inspector" 14 15 "${JAVASCRIPTCORE_DIR}/interpreter" 15 16 "${JAVASCRIPTCORE_DIR}/jit" … … 585 586 debugger 586 587 heap 588 inspector 587 589 interpreter 588 590 jit -
trunk/Source/JavaScriptCore/ChangeLog
r160094 r160099 1 2013-12-03 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=124613 5 6 Reviewed by Timothy Hatcher. 7 8 Move the ENABLE(REMOTE_INSPECTOR) remote debugger connection management 9 into JavaScriptCore (originally from WebKit/mac). Include enhancements: 10 11 * allow for different types of remote debuggable targets, 12 eventually at least a JSContext, WebView, WKView. 13 * allow debuggables to be registered and debugged on any thread. Unlike 14 WebViews, JSContexts may be run entirely off of the main thread. 15 * move the remote connection (XPC connection) itself off of the main thread, 16 it doesn't need to be on the main thread. 17 18 Make JSContext @class and JavaScriptCore::JSContextRef 19 "JavaScript" Remote Debuggables. 20 21 * inspector/remote/RemoteInspectorDebuggable.h: Added. 22 * inspector/remote/RemoteInspectorDebuggable.cpp: Added. 23 (Inspector::RemoteInspectorDebuggable::RemoteInspectorDebuggable): 24 (Inspector::RemoteInspectorDebuggable::~RemoteInspectorDebuggable): 25 (Inspector::RemoteInspectorDebuggable::init): 26 (Inspector::RemoteInspectorDebuggable::update): 27 (Inspector::RemoteInspectorDebuggable::setRemoteDebuggingAllowed): 28 (Inspector::RemoteInspectorDebuggable::info): 29 RemoteInspectorDebuggable defines a debuggable target. As long as 30 something creates a debuggable and is set to allow remote inspection 31 it will be listed in remote debuggers. For the different types of 32 debuggables (JavaScript and Web) there is different basic information 33 that may be listed. 34 35 * inspector/InspectorFrontendChannel.h: Added. 36 (Inspector::InspectorFrontendChannel::~InspectorFrontendChannel): 37 The only thing a debuggable needs for remote debugging is an 38 InspectorFrontendChannel a way to send messages to a remote frontend. 39 This class provides that method, and is vended to the 40 RemoteInspectorDebuggable when a remote connection is setup. 41 42 * inspector/remote/RemoteInspector.h: Added. 43 * inspector/remote/RemoteInspector.mm: Added. 44 Singleton, created at least when the first Debuggable is created. 45 This class manages the list of debuggables, any connection to a 46 remote debugger proxy (XPC service "com.apple.webinspector"). 47 48 (Inspector::dispatchAsyncOnQueueSafeForAnyDebuggable): 49 (Inspector::RemoteInspector::shared): 50 (Inspector::RemoteInspector::RemoteInspector): 51 (Inspector::RemoteInspector::nextAvailableIdentifier): 52 (Inspector::RemoteInspector::registerDebuggable): 53 (Inspector::RemoteInspector::unregisterDebuggable): 54 (Inspector::RemoteInspector::updateDebuggable): 55 Debuggable management. When debuggables are added, removed, or updated 56 we stash a copy of the debuggable information and push an update to 57 debuggers. Stashing a copy of the information in the RemoteInspector 58 is a thread safe way to avoid walking over all debuggables to gather 59 the information when it is needed. 60 61 (Inspector::RemoteInspector::start): 62 (Inspector::RemoteInspector::stop): 63 Runtime API to enable / disable the feature. 64 65 (Inspector::RemoteInspector::listingForDebuggable): 66 (Inspector::RemoteInspector::pushListingNow): 67 (Inspector::RemoteInspector::pushListingSoon): 68 Pushing a listing to remote debuggers. 69 70 (Inspector::RemoteInspector::sendMessageToRemoteFrontend): 71 (Inspector::RemoteInspector::setupXPCConnectionIfNeeded): 72 (Inspector::RemoteInspector::xpcConnectionReceivedMessage): 73 (Inspector::RemoteInspector::xpcConnectionFailed): 74 (Inspector::RemoteInspector::xpcConnectionUnhandledMessage): 75 XPC setup, send, and receive handling. 76 77 (Inspector::RemoteInspector::updateHasActiveDebugSession): 78 Applications being debugged may want to know when a debug 79 session is active. This provides that notification. 80 81 (Inspector::RemoteInspector::receivedSetupMessage): 82 (Inspector::RemoteInspector::receivedDataMessage): 83 (Inspector::RemoteInspector::receivedDidCloseMessage): 84 (Inspector::RemoteInspector::receivedGetListingMessage): 85 (Inspector::RemoteInspector::receivedIndicateMessage): 86 (Inspector::RemoteInspector::receivedConnectionDiedMessage): 87 Dispatching incoming remote debugging protocol messages. 88 These are wrapping above the inspector protocol messages. 89 90 * inspector/remote/RemoteInspectorConstants.h: Added. 91 Protocol messages and dictionary keys inside the messages. 92 93 (Inspector::RemoteInspectorDebuggableInfo::RemoteInspectorDebuggableInfo): 94 * inspector/remote/RemoteInspectorDebuggableConnection.h: Added. 95 * inspector/remote/RemoteInspectorDebuggableConnection.mm: Added. 96 This is a connection between the RemoteInspector singleton and a RemoteInspectorDebuggable. 97 98 (Inspector::RemoteInspectorDebuggableConnection::RemoteInspectorDebuggableConnection): 99 (Inspector::RemoteInspectorDebuggableConnection::~RemoteInspectorDebuggableConnection): 100 Allow for dispatching messages on JavaScript debuggables on a dispatch_queue 101 instead of the main queue. 102 103 (Inspector::RemoteInspectorDebuggableConnection::destination): 104 (Inspector::RemoteInspectorDebuggableConnection::connectionIdentifier): 105 Needed in the remote debugging protocol to identify the remote debugger. 106 107 (Inspector::RemoteInspectorDebuggableConnection::dispatchSyncOnDebuggable): 108 (Inspector::RemoteInspectorDebuggableConnection::dispatchAsyncOnDebuggable): 109 (Inspector::RemoteInspectorDebuggableConnection::setup): 110 (Inspector::RemoteInspectorDebuggableConnection::closeFromDebuggable): 111 (Inspector::RemoteInspectorDebuggableConnection::close): 112 (Inspector::RemoteInspectorDebuggableConnection::sendMessageToBackend): 113 (Inspector::RemoteInspectorDebuggableConnection::sendMessageToFrontend): 114 The connection is a thin channel between the two sides that can be closed 115 from either side, so there is some logic around multi-threaded access. 116 117 * inspector/remote/RemoteInspectorXPCConnection.h: Added. 118 (Inspector::RemoteInspectorXPCConnection::Client::~Client): 119 * inspector/remote/RemoteInspectorXPCConnection.mm: Added. 120 (Inspector::RemoteInspectorXPCConnection::RemoteInspectorXPCConnection): 121 (Inspector::RemoteInspectorXPCConnection::~RemoteInspectorXPCConnection): 122 (Inspector::RemoteInspectorXPCConnection::close): 123 (Inspector::RemoteInspectorXPCConnection::deserializeMessage): 124 (Inspector::RemoteInspectorXPCConnection::handleEvent): 125 (Inspector::RemoteInspectorXPCConnection::sendMessage): 126 This is a connection between the RemoteInspector singleton and an XPC service 127 named "com.apple.webinspector". This handles serialization of the dictionary 128 messages to and from the service. The receiving is done on a non-main queue. 129 130 * API/JSContext.h: 131 * API/JSContext.mm: 132 (-[JSContext name]): 133 (-[JSContext setName:]): 134 ObjC API to enable/disable JSContext remote inspection and give a name. 135 136 * API/JSContextRef.h: 137 * API/JSContextRef.cpp: 138 (JSGlobalContextGetName): 139 (JSGlobalContextSetName): 140 C API to give a JSContext a name. 141 142 * runtime/JSGlobalObject.cpp: 143 (JSC::JSGlobalObject::setName): 144 * runtime/JSGlobalObject.h: 145 (JSC::JSGlobalObject::name): 146 Shared handling of the APIs above. 147 148 * runtime/JSGlobalObjectDebuggable.cpp: Added. 149 (JSC::JSGlobalObjectDebuggable::JSGlobalObjectDebuggable): 150 (JSC::JSGlobalObjectDebuggable::name): 151 (JSC::JSGlobalObjectDebuggable::connect): 152 (JSC::JSGlobalObjectDebuggable::disconnect): 153 (JSC::JSGlobalObjectDebuggable::dispatchMessageFromRemoteFrontend): 154 * runtime/JSGlobalObjectDebuggable.h: Added. 155 Stub for the actual remote debugging implementation. We will push 156 down the appropriate WebCore/inspector peices suitable for debugging 157 just a JavaScript context. 158 159 * CMakeLists.txt: 160 * JavaScriptCore.xcodeproj/project.pbxproj: 161 * GNUmakefile.am: 162 * GNUmakefile.list.am: 163 * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: 164 * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: 165 Update build files. 166 1 167 2013-12-04 Michael Saboff <msaboff@apple.com> 2 168 -
trunk/Source/JavaScriptCore/GNUmakefile.am
r154747 r160099 60 60 -I$(srcdir)/Source/JavaScriptCore/ftl \ 61 61 -I$(srcdir)/Source/JavaScriptCore/heap \ 62 -I$(srcdir)/Source/JavaScriptCore/inspector \ 62 63 -I$(srcdir)/Source/JavaScriptCore/interpreter \ 63 64 -I$(srcdir)/Source/JavaScriptCore/jit \ -
trunk/Source/JavaScriptCore/GNUmakefile.list.am
r160094 r160099 611 611 Source/JavaScriptCore/icu/unicode/utypes.h \ 612 612 Source/JavaScriptCore/icu/unicode/uversion.h \ 613 Source/JavaScriptCore/inspector/InspectorFrontendChannel.h \ 613 614 Source/JavaScriptCore/interpreter/AbstractPC.cpp \ 614 615 Source/JavaScriptCore/interpreter/AbstractPC.h \ -
trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
r160094 r160099 997 997 <ClInclude Include="..\heap\WeakSetInlines.h" /> 998 998 <ClInclude Include="..\heap\WriteBarrierSupport.h" /> 999 <ClInclude Include="..\inspector\InspectorFrontendChannel.h" /> 999 1000 <ClInclude Include="..\interpreter\AbstractPC.h" /> 1000 1001 <ClInclude Include="..\interpreter\CachedCall.h" /> -
trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters
r160094 r160099 25 25 <Filter Include="heap"> 26 26 <UniqueIdentifier>{bd49e5cf-95d6-4151-b286-8837ccd347fa}</UniqueIdentifier> 27 </Filter> 28 <Filter Include="inspector"> 29 <UniqueIdentifier>{09ae09da-1239-00ea-8dfe-9087ae123bbe}</UniqueIdentifier> 27 30 </Filter> 28 31 <Filter Include="interpreter"> … … 1707 1710 <Filter>heap</Filter> 1708 1711 </ClInclude> 1712 <ClInclude Include="..\inspector\InspectorFrontendChannel.h"> 1713 <Filter>inspector</Filter> 1714 </ClInclude> 1709 1715 <ClInclude Include="..\interpreter\AbstractPC.h"> 1710 1716 <Filter>interpreter</Filter> -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r160094 r160099 888 888 A1A009C01831A22D00CF8711 /* MacroAssemblerARM64.h in Headers */ = {isa = PBXBuildFile; fileRef = 8640923C156EED3B00566CB2 /* MacroAssemblerARM64.h */; settings = {ATTRIBUTES = (Private, ); }; }; 889 889 A1A009C11831A26E00CF8711 /* ARM64Assembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 8640923B156EED3B00566CB2 /* ARM64Assembler.h */; settings = {ATTRIBUTES = (Private, ); }; }; 890 A594558F18245EFD00CC3843 /* RemoteInspectorDebuggable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A594558E18245EDE00CC3843 /* RemoteInspectorDebuggable.cpp */; }; 891 A59455921824744700CC3843 /* JSGlobalObjectDebuggable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A59455901824744700CC3843 /* JSGlobalObjectDebuggable.cpp */; }; 892 A59455931824744700CC3843 /* JSGlobalObjectDebuggable.h in Headers */ = {isa = PBXBuildFile; fileRef = A59455911824744700CC3843 /* JSGlobalObjectDebuggable.h */; }; 893 A5945595182479EB00CC3843 /* InspectorFrontendChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = A5945594182479EB00CC3843 /* InspectorFrontendChannel.h */; settings = {ATTRIBUTES = (Private, ); }; }; 894 A5BA15E8182340B300A82E69 /* RemoteInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = A5BA15E1182340B300A82E69 /* RemoteInspector.h */; settings = {ATTRIBUTES = (Private, ); }; }; 895 A5BA15E9182340B300A82E69 /* RemoteInspector.mm in Sources */ = {isa = PBXBuildFile; fileRef = A5BA15E2182340B300A82E69 /* RemoteInspector.mm */; }; 896 A5BA15EA182340B400A82E69 /* RemoteInspectorConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = A5BA15E3182340B300A82E69 /* RemoteInspectorConstants.h */; settings = {ATTRIBUTES = (Private, ); }; }; 897 A5BA15EB182340B400A82E69 /* RemoteInspectorDebuggableConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = A5BA15E4182340B300A82E69 /* RemoteInspectorDebuggableConnection.h */; }; 898 A5BA15EC182340B400A82E69 /* RemoteInspectorDebuggableConnection.mm in Sources */ = {isa = PBXBuildFile; fileRef = A5BA15E5182340B300A82E69 /* RemoteInspectorDebuggableConnection.mm */; }; 899 A5BA15ED182340B400A82E69 /* RemoteInspectorXPCConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = A5BA15E6182340B300A82E69 /* RemoteInspectorXPCConnection.h */; }; 900 A5BA15EE182340B400A82E69 /* RemoteInspectorXPCConnection.mm in Sources */ = {isa = PBXBuildFile; fileRef = A5BA15E7182340B300A82E69 /* RemoteInspectorXPCConnection.mm */; }; 901 A5BA15F0182345AF00A82E69 /* RemoteInspectorDebuggable.h in Headers */ = {isa = PBXBuildFile; fileRef = A5BA15EF182345AF00A82E69 /* RemoteInspectorDebuggable.h */; settings = {ATTRIBUTES = (Private, ); }; }; 890 902 A700873917CBE85300C3E643 /* MapConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A700873717CBE85300C3E643 /* MapConstructor.cpp */; }; 891 903 A700873A17CBE85300C3E643 /* MapConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = A700873817CBE85300C3E643 /* MapConstructor.h */; }; … … 2200 2212 A1712B3E11C7B228007A5315 /* RegExpCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegExpCache.h; sourceTree = "<group>"; }; 2201 2213 A1712B4011C7B235007A5315 /* RegExpKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegExpKey.h; sourceTree = "<group>"; }; 2214 A594558E18245EDE00CC3843 /* RemoteInspectorDebuggable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RemoteInspectorDebuggable.cpp; path = inspector/remote/RemoteInspectorDebuggable.cpp; sourceTree = "<group>"; }; 2215 A59455901824744700CC3843 /* JSGlobalObjectDebuggable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObjectDebuggable.cpp; sourceTree = "<group>"; }; 2216 A59455911824744700CC3843 /* JSGlobalObjectDebuggable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObjectDebuggable.h; sourceTree = "<group>"; }; 2217 A5945594182479EB00CC3843 /* InspectorFrontendChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InspectorFrontendChannel.h; path = inspector/InspectorFrontendChannel.h; sourceTree = "<group>"; }; 2218 A5BA15E1182340B300A82E69 /* RemoteInspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteInspector.h; path = inspector/remote/RemoteInspector.h; sourceTree = "<group>"; }; 2219 A5BA15E2182340B300A82E69 /* RemoteInspector.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RemoteInspector.mm; path = inspector/remote/RemoteInspector.mm; sourceTree = "<group>"; }; 2220 A5BA15E3182340B300A82E69 /* RemoteInspectorConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteInspectorConstants.h; path = inspector/remote/RemoteInspectorConstants.h; sourceTree = "<group>"; }; 2221 A5BA15E4182340B300A82E69 /* RemoteInspectorDebuggableConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteInspectorDebuggableConnection.h; path = inspector/remote/RemoteInspectorDebuggableConnection.h; sourceTree = "<group>"; }; 2222 A5BA15E5182340B300A82E69 /* RemoteInspectorDebuggableConnection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RemoteInspectorDebuggableConnection.mm; path = inspector/remote/RemoteInspectorDebuggableConnection.mm; sourceTree = "<group>"; }; 2223 A5BA15E6182340B300A82E69 /* RemoteInspectorXPCConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteInspectorXPCConnection.h; path = inspector/remote/RemoteInspectorXPCConnection.h; sourceTree = "<group>"; }; 2224 A5BA15E7182340B300A82E69 /* RemoteInspectorXPCConnection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RemoteInspectorXPCConnection.mm; path = inspector/remote/RemoteInspectorXPCConnection.mm; sourceTree = "<group>"; }; 2225 A5BA15EF182345AF00A82E69 /* RemoteInspectorDebuggable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteInspectorDebuggable.h; path = inspector/remote/RemoteInspectorDebuggable.h; sourceTree = "<group>"; }; 2202 2226 A700873717CBE85300C3E643 /* MapConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MapConstructor.cpp; sourceTree = "<group>"; }; 2203 2227 A700873817CBE85300C3E643 /* MapConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapConstructor.h; sourceTree = "<group>"; }; … … 2698 2722 0FEA09FC1705137F00BB722C /* ftl */, 2699 2723 142E312A134FF0A600AFADB5 /* heap */, 2724 A5BA15DF1823409200A82E69 /* inspector */, 2700 2725 1429D77A0ED20D7300B89619 /* interpreter */, 2701 2726 1429D92C0ED22D7000B89619 /* jit */, … … 3483 3508 14DE0D680D02431400AACCA2 /* JSGlobalObject.cpp */, 3484 3509 A8E894330CD0603F00367179 /* JSGlobalObject.h */, 3510 A59455901824744700CC3843 /* JSGlobalObjectDebuggable.cpp */, 3511 A59455911824744700CC3843 /* JSGlobalObjectDebuggable.h */, 3485 3512 BC756FC60E2031B200DE7D12 /* JSGlobalObjectFunctions.cpp */, 3486 3513 BC756FC70E2031B200DE7D12 /* JSGlobalObjectFunctions.h */, … … 4151 4178 sourceTree = "<group>"; 4152 4179 }; 4180 A5BA15DF1823409200A82E69 /* inspector */ = { 4181 isa = PBXGroup; 4182 children = ( 4183 A5BA15E01823409D00A82E69 /* remote */, 4184 A5945594182479EB00CC3843 /* InspectorFrontendChannel.h */, 4185 ); 4186 name = inspector; 4187 sourceTree = "<group>"; 4188 }; 4189 A5BA15E01823409D00A82E69 /* remote */ = { 4190 isa = PBXGroup; 4191 children = ( 4192 A5BA15E1182340B300A82E69 /* RemoteInspector.h */, 4193 A5BA15E2182340B300A82E69 /* RemoteInspector.mm */, 4194 A5BA15E3182340B300A82E69 /* RemoteInspectorConstants.h */, 4195 A5BA15EF182345AF00A82E69 /* RemoteInspectorDebuggable.h */, 4196 A594558E18245EDE00CC3843 /* RemoteInspectorDebuggable.cpp */, 4197 A5BA15E4182340B300A82E69 /* RemoteInspectorDebuggableConnection.h */, 4198 A5BA15E5182340B300A82E69 /* RemoteInspectorDebuggableConnection.mm */, 4199 A5BA15E6182340B300A82E69 /* RemoteInspectorXPCConnection.h */, 4200 A5BA15E7182340B300A82E69 /* RemoteInspectorXPCConnection.mm */, 4201 ); 4202 name = remote; 4203 sourceTree = "<group>"; 4204 }; 4153 4205 /* End PBXGroup section */ 4154 4206 … … 4221 4273 14816E1C154CC56C00B8054C /* BlockAllocator.h in Headers */, 4222 4274 BC18C3EC0E16F5CD00B34460 /* BooleanObject.h in Headers */, 4275 A5BA15EA182340B400A82E69 /* RemoteInspectorConstants.h in Headers */, 4223 4276 0FB7F39715ED8E4600F167B2 /* Butterfly.h in Headers */, 4224 4277 0FB7F39815ED8E4600F167B2 /* ButterflyInlines.h in Headers */, … … 4291 4344 0F05C3B41683CF9200BAF45B /* DFGArrayifySlowPathGenerator.h in Headers */, 4292 4345 0F63948515E4811B006A597C /* DFGArrayMode.h in Headers */, 4346 A5BA15EB182340B400A82E69 /* RemoteInspectorDebuggableConnection.h in Headers */, 4293 4347 A7D9A29517A0BC7400EE2618 /* DFGAtTailAbstractState.h in Headers */, 4294 4348 0F714CA516EA92F200F3EBEB /* DFGBackwardsPropagationPhase.h in Headers */, … … 4366 4420 0FC0976A1468A6F700CF2442 /* DFGOSRExit.h in Headers */, 4367 4421 0F235BEC17178E7300690C7F /* DFGOSRExitBase.h in Headers */, 4422 A5BA15ED182340B400A82E69 /* RemoteInspectorXPCConnection.h in Headers */, 4368 4423 0FFB921C16D02F110055A5DB /* DFGOSRExitCompilationInfo.h in Headers */, 4369 4424 0FC0977114693AF500CF2442 /* DFGOSRExitCompiler.h in Headers */, … … 4424 4479 0FEA0A1D1708B00700BB722C /* FTLAbstractHeap.h in Headers */, 4425 4480 0FEA0A1F1708B00700BB722C /* FTLAbstractHeapRepository.h in Headers */, 4481 A59455931824744700CC3843 /* JSGlobalObjectDebuggable.h in Headers */, 4426 4482 0FEA0A0A170513DB00BB722C /* FTLCapabilities.h in Headers */, 4427 4483 0FEA0A231709606900BB722C /* FTLCommonValues.h in Headers */, … … 4516 4572 0F0776BF14FF002B00102332 /* JITCompilationEffort.h in Headers */, 4517 4573 0FAF7EFE165BA91F000C8455 /* JITDisassembler.h in Headers */, 4574 A5BA15F0182345AF00A82E69 /* RemoteInspectorDebuggable.h in Headers */, 4518 4575 0F46808214BA572D00BFE272 /* JITExceptions.h in Headers */, 4519 4576 0FB14E1F18124ACE009B6B4D /* JITInlineCacheGenerator.h in Headers */, … … 4687 4744 142D6F1213539A4100B02E86 /* MarkStack.h in Headers */, 4688 4745 C21122E315DD9AB300790E3A /* MarkStackInlines.h in Headers */, 4746 A5945595182479EB00CC3843 /* InspectorFrontendChannel.h in Headers */, 4689 4747 8612E4CD152389EC00C836BE /* MatchResult.h in Headers */, 4690 4748 BC18C43C0E16F5CD00B34460 /* MathObject.h in Headers */, … … 4855 4913 14E84F9F14EE1ACC00D6D5D4 /* WeakBlock.h in Headers */, 4856 4914 14BFCE6910CDB1FC00364CCE /* WeakGCMap.h in Headers */, 4915 A5BA15E8182340B300A82E69 /* RemoteInspector.h in Headers */, 4857 4916 14F7256614EE265E00B1652B /* WeakHandleOwner.h in Headers */, 4858 4917 14E84FA214EE1ACC00D6D5D4 /* WeakImpl.h in Headers */, … … 5450 5509 86DB64640F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp in Sources */, 5451 5510 0F56A1D515001CF4002992B1 /* ExecutionCounter.cpp in Sources */, 5511 A59455921824744700CC3843 /* JSGlobalObjectDebuggable.cpp in Sources */, 5452 5512 0FB105851675480F00F8AB6E /* ExitKind.cpp in Sources */, 5453 5513 0FEA0A1C1708B00700BB722C /* FTLAbstractHeap.cpp in Sources */, … … 5611 5671 0F4680CC14BBB17A00BFE272 /* LowLevelInterpreter.cpp in Sources */, 5612 5672 14B723B212D7DA46003BD5ED /* MachineStackMarker.cpp in Sources */, 5673 A594558F18245EFD00CC3843 /* RemoteInspectorDebuggable.cpp in Sources */, 5613 5674 0FEB3ECF16237F6C00AB67AD /* MacroAssembler.cpp in Sources */, 5614 5675 86C568E011A213EE0007F7F0 /* MacroAssemblerARM.cpp in Sources */, … … 5738 5799 14E84FA014EE1ACC00D6D5D4 /* WeakSet.cpp in Sources */, 5739 5800 0FC8150B14043C0E00CFA603 /* WriteBarrierSupport.cpp in Sources */, 5801 A5BA15E9182340B300A82E69 /* RemoteInspector.mm in Sources */, 5802 A5BA15EC182340B400A82E69 /* RemoteInspectorDebuggableConnection.mm in Sources */, 5803 A5BA15EE182340B400A82E69 /* RemoteInspectorXPCConnection.mm in Sources */, 5740 5804 A7E5AB3A1799E4B200D2833D /* X86Disassembler.cpp in Sources */, 5741 5805 863C6D9C1521111A00585E4E /* YarrCanonicalizeUCS2.cpp in Sources */, -
trunk/Source/JavaScriptCore/inspector/InspectorFrontendChannel.h
r160098 r160099 1 1 /* 2 * Copyright (C) 201 1 Google Inc.All rights reserved.2 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 11 11 * documentation and/or other materials provided with the distribution. 12 12 * 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER,INC. ``AS IS'' AND ANY13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY 14 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER,INC. OR16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR 17 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, … … 21 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 25 … … 27 27 #define InspectorFrontendChannel_h 28 28 29 #include <wtf/ Forward.h>29 #include <wtf/text/WTFString.h> 30 30 31 namespace WebCore{31 namespace Inspector { 32 32 33 33 class InspectorFrontendChannel { … … 37 37 }; 38 38 39 } // namespace WebCore39 } // namespace Inspector 40 40 41 41 #endif // !defined(InspectorFrontendChannel_h) -
trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h
r160098 r160099 24 24 */ 25 25 26 #ifndef WebInspectorRelayDefinitions_h27 #define WebInspectorRelayDefinitions_h26 #ifndef RemoteInspectorConstants_h 27 #define RemoteInspectorConstants_h 28 28 29 29 // WIRConstants are "Web Inspector Relay" constants shared between 30 // the WebInspector framework on the debugger side, webinspectord,31 // and WebKit on the debuggable applicationside.30 // the WebInspector framework on the OS X side, webinspectord, and 31 // iOS WebKit on the device side. 32 32 33 33 #define WIRSimulatorTCPPortNumber 27753 -
trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorDebuggable.cpp
r160098 r160099 1 1 /* 2 * Copyright (C) 201 1Apple Inc. All Rights Reserved.2 * Copyright (C) 2013 Apple Inc. All Rights Reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 @class WebInspectorRemoteChannel; 27 @class WebInspectorServerWebViewConnectionController; 26 #include "config.h" 27 #include "RemoteInspectorDebuggable.h" 28 28 29 @interface WebInspectorServerWebViewConnection : NSObject { 30 @private 31 WebInspectorRemoteChannel *_channel; 29 #if ENABLE(REMOTE_INSPECTOR) 32 30 33 WebInspectorServerWebViewConnectionController *_controller; // weak, the controller owns us. 34 NSString *_connectionIdentifier; 35 NSString *_destination; 36 NSNumber *_identifier; 31 #include "InspectorFrontendChannel.h" 32 #include "RemoteInspector.h" 33 34 namespace Inspector { 35 36 RemoteInspectorDebuggable::RemoteInspectorDebuggable() 37 : m_identifier(0) 38 , m_allowed(false) 39 { 37 40 } 38 41 39 - (id)initWithController:(WebInspectorServerWebViewConnectionController *)controller connectionIdentifier:(NSString *)connectionIdentifier destination:(NSString *)destination identifier:(NSNumber *)identifier; 40 - (BOOL)setupChannel; 41 - (NSString *)connectionIdentifier;42 - (NSNumber *)identifier; 42 RemoteInspectorDebuggable::~RemoteInspectorDebuggable() 43 { 44 RemoteInspector::shared().unregisterDebuggable(this); 45 } 43 46 44 // Messages from the InspectorServer. 45 - (void)receivedData:(NSDictionary *)dictionary; 46 - (void)receivedDidClose:(NSDictionary *)dictionary; 47 void RemoteInspectorDebuggable::init() 48 { 49 RemoteInspector::shared().registerDebuggable(this); 50 } 47 51 48 // Messages from the Channel. 49 - (void)clearChannel; 50 - (void)sendMessageToFrontend:(NSString *)message; 52 void RemoteInspectorDebuggable::update() 53 { 54 RemoteInspector::shared().updateDebuggable(this); 55 } 51 56 52 // Messages to the Channel. 53 - (void)sendMessageToBackend:(NSString *)message; 57 void RemoteInspectorDebuggable::setRemoteDebuggingAllowed(bool allowed) 58 { 59 if (m_allowed == allowed) 60 return; 54 61 55 @end 62 m_allowed = allowed; 63 64 update(); 65 } 66 67 RemoteInspectorDebuggableInfo RemoteInspectorDebuggable::info() const 68 { 69 RemoteInspectorDebuggableInfo info; 70 info.identifier = identifier(); 71 info.type = type(); 72 info.name = name(); 73 info.url = url(); 74 info.hasLocalDebugger = hasLocalDebugger(); 75 info.remoteDebuggingAllowed = remoteDebuggingAllowed(); 76 return info; 77 } 78 79 } // namespace Inspector 80 81 #endif // ENABLE(REMOTE_INSPECTOR) -
trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorXPCConnection.h
r160098 r160099 1 1 /* 2 * Copyright (C) 201 1Apple Inc. All Rights Reserved.2 * Copyright (C) 2013 Apple Inc. All Rights Reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #import <Foundation/Foundation.h> 26 #if ENABLE(REMOTE_INSPECTOR) 27 28 #ifndef RemoteInspectorXPCConnection_h 29 #define RemoteInspectorXPCConnection_h 30 31 #import <dispatch/dispatch.h> 32 #import <wtf/Noncopyable.h> 27 33 #import <xpc/xpc.h> 28 34 29 @class WebInspectorXPCWrapper; 35 OBJC_CLASS NSString; 36 OBJC_CLASS NSDictionary; 30 37 31 @protocol WebInspectorXPCWrapperDelegate <NSObject> 32 - (void)xpcConnection:(WebInspectorXPCWrapper *)connection receivedMessage:(NSString *)messageName userInfo:(NSDictionary *)userInfo; 33 - (void)xpcConnectionFailed:(WebInspectorXPCWrapper *)connection; 34 @optional 35 - (void)xpcConnection:(WebInspectorXPCWrapper *)connection unhandledMessage:(xpc_object_t)message; 36 @end 38 namespace Inspector { 37 39 38 @interface WebInspectorXPCWrapper : NSObject 39 { 40 id <WebInspectorXPCWrapperDelegate> _delegate; 41 xpc_connection_t _connection; 42 NSString *_tag; 43 } 40 class RemoteInspectorXPCConnection { 41 WTF_MAKE_NONCOPYABLE(RemoteInspectorXPCConnection); 44 42 45 - (WebInspectorXPCWrapper *)initWithConnection:(xpc_connection_t)connection; 46 - (void)close; 47 - (void)sendMessage:(NSString *)messageName userInfo:(NSDictionary *)userInfo; 43 public: 44 class Client { 45 public: 46 virtual ~Client() { } 47 virtual void xpcConnectionReceivedMessage(RemoteInspectorXPCConnection*, NSString *messageName, NSDictionary *userInfo) = 0; 48 virtual void xpcConnectionFailed(RemoteInspectorXPCConnection*) = 0; 49 virtual void xpcConnectionUnhandledMessage(RemoteInspectorXPCConnection*, xpc_object_t) = 0; 50 }; 48 51 49 @property (nonatomic, assign) id <WebInspectorXPCWrapperDelegate> delegate; 50 @property (nonatomic, readonly) xpc_connection_t connection; 51 @property (nonatomic, readonly) BOOL available; 52 @property (nonatomic, copy) NSString *tag; 52 RemoteInspectorXPCConnection(xpc_connection_t, Client*); 53 virtual ~RemoteInspectorXPCConnection(); 53 54 54 @end 55 void close(); 56 void sendMessage(NSString *messageName, NSDictionary *userInfo); 57 58 private: 59 NSDictionary *deserializeMessage(xpc_object_t); 60 void handleEvent(xpc_object_t); 61 62 xpc_connection_t m_connection; 63 dispatch_queue_t m_queue; 64 Client* m_client; 65 }; 66 67 } // namespace Inspector 68 69 #endif // RemoteInspectorXPCConnection_h 70 71 #endif // ENABLE(REMOTE_INSPECTOR) -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r159798 r160099 126 126 #endif // ENABLE(PROMISES) 127 127 128 #if ENABLE(REMOTE_INSPECTOR) 129 #include "JSGlobalObjectDebuggable.h" 130 #include "RemoteInspector.h" 131 #endif 132 128 133 #include "JSGlobalObject.lut.h" 129 134 … … 187 192 188 193 m_debugger = 0; 194 195 #if ENABLE(REMOTE_INSPECTOR) 196 m_inspectorDebuggable = std::make_unique<JSGlobalObjectDebuggable>(*this); 197 m_inspectorDebuggable->init(); 198 m_inspectorDebuggable->setRemoteDebuggingAllowed(true); 199 #endif 189 200 190 201 reset(prototype()); … … 761 772 } 762 773 774 void JSGlobalObject::setRemoteDebuggingEnabled(bool enabled) 775 { 776 #if ENABLE(REMOTE_INSPECTOR) 777 m_inspectorDebuggable->setRemoteDebuggingAllowed(enabled); 778 #else 779 UNUSED_PARAM(enabled); 780 #endif 781 } 782 783 bool JSGlobalObject::remoteDebuggingEnabled() const 784 { 785 #if ENABLE(REMOTE_INSPECTOR) 786 return m_inspectorDebuggable->remoteDebuggingAllowed(); 787 #else 788 return false; 789 #endif 790 } 791 792 void JSGlobalObject::setName(const String& name) 793 { 794 m_name = name; 795 796 #if ENABLE(REMOTE_INSPECTOR) 797 m_inspectorDebuggable->update(); 798 #endif 799 } 800 763 801 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r159798 r160099 59 59 class GetterSetter; 60 60 class GlobalCodeBlock; 61 class JSGlobalObjectDebuggable; 61 62 class JSPromisePrototype; 62 63 class JSPromiseResolverPrototype; … … 230 231 void* m_specialPointers[Special::TableSize]; // Special pointers used by the LLInt and JIT. 231 232 233 String m_name; 234 232 235 Debugger* m_debugger; 236 237 #if ENABLE(REMOTE_INSPECTOR) 238 std::unique_ptr<JSGlobalObjectDebuggable> m_inspectorDebuggable; 239 #endif 233 240 234 241 RefPtr<WatchpointSet> m_masqueradesAsUndefinedWatchpoint; … … 421 428 #endif // ENABLE(PROMISES) 422 429 430 JS_EXPORT_PRIVATE void setRemoteDebuggingEnabled(bool); 431 JS_EXPORT_PRIVATE bool remoteDebuggingEnabled() const; 432 433 void setName(const String&); 434 const String& name() const { return m_name; } 435 423 436 JSArrayBufferPrototype* arrayBufferPrototype() const { return m_arrayBufferPrototype.get(); } 424 437 -
trunk/Source/JavaScriptCore/runtime/JSGlobalObjectDebuggable.cpp
r160098 r160099 1 1 /* 2 * Copyright (C) 201 1 Apple Inc. All Rights Reserved.2 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #i mport <Foundation/Foundation.h>27 #i mport <xpc/xpc.h>26 #include "config.h" 27 #include "JSGlobalObjectDebuggable.h" 28 28 29 @class WebInspectorXPCWrapper; 29 #if ENABLE(REMOTE_INSPECTOR) 30 30 31 @protocol WebInspectorXPCWrapperDelegate <NSObject> 32 - (void)xpcConnection:(WebInspectorXPCWrapper *)connection receivedMessage:(NSString *)messageName userInfo:(NSDictionary *)userInfo; 33 - (void)xpcConnectionFailed:(WebInspectorXPCWrapper *)connection; 34 @optional 35 - (void)xpcConnection:(WebInspectorXPCWrapper *)connection unhandledMessage:(xpc_object_t)message; 36 @end 31 #include "InspectorFrontendChannel.h" 32 #include "JSGlobalObject.h" 33 #include "RemoteInspector.h" 37 34 38 @interface WebInspectorXPCWrapper : NSObject 35 using namespace Inspector; 36 37 namespace JSC { 38 39 JSGlobalObjectDebuggable::JSGlobalObjectDebuggable(JSGlobalObject& globalObject) 40 : m_globalObject(globalObject) 39 41 { 40 id <WebInspectorXPCWrapperDelegate> _delegate;41 xpc_connection_t _connection;42 NSString *_tag;43 42 } 44 43 45 - (WebInspectorXPCWrapper *)initWithConnection:(xpc_connection_t)connection; 46 - (void)close; 47 - (void)sendMessage:(NSString *)messageName userInfo:(NSDictionary *)userInfo; 44 String JSGlobalObjectDebuggable::name() const 45 { 46 String name = m_globalObject.name(); 47 return name.isEmpty() ? ASCIILiteral("JSContext") : name; 48 } 48 49 49 @property (nonatomic, assign) id <WebInspectorXPCWrapperDelegate> delegate; 50 @property (nonatomic, readonly) xpc_connection_t connection; 51 @property (nonatomic, readonly) BOOL available; 52 @property (nonatomic, copy) NSString *tag; 50 void JSGlobalObjectDebuggable::connect(InspectorFrontendChannel*) 51 { 52 // FIXME: Implement. 53 // Create an InspectorController, InspectorFrontend, InspectorBackend, and Agents. 54 // "InspectorController::connectFrontend". 55 } 53 56 54 @end 57 void JSGlobalObjectDebuggable::disconnect() 58 { 59 // FIXME: Implement. 60 // "InspectorController::disconnectFrontend". 61 } 62 63 void JSGlobalObjectDebuggable::dispatchMessageFromRemoteFrontend(const String&) 64 { 65 // FIXME: Implement. 66 // "InspectorController::dispatchMessageFromFrontend" 67 } 68 69 } // namespace JSC 70 71 #endif // ENABLE(REMOTE_INSPECTOR) -
trunk/Source/JavaScriptCore/runtime/JSGlobalObjectDebuggable.h
r160098 r160099 1 1 /* 2 * Copyright (C) 201 1 Apple Inc. All Rights Reserved.2 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #import <wtf/HashMap.h> 26 #ifndef JSGlobalObjectDebuggable_h 27 #define JSGlobalObjectDebuggable_h 27 28 28 class WebInspectorClient; 29 #if ENABLE(REMOTE_INSPECTOR) 29 30 30 @protocol WebInspectorClientRegistryDelegate 31 - (void)didRegisterClient:(WebInspectorClient*)client; 32 - (void)didUnregisterClient:(WebInspectorClient*)client; 33 @end 31 #include "RemoteInspectorDebuggable.h" 32 #include <wtf/Noncopyable.h> 34 33 35 @interface WebInspectorClientRegistry : NSObject { 36 @private 37 unsigned _nextAvailablePageId; 38 HashMap<unsigned, WebInspectorClient*> _pageClientMap; 39 id <WebInspectorClientRegistryDelegate> _delegate; 40 } 34 namespace JSC { 41 35 42 @property (nonatomic, assign) id <WebInspectorClientRegistryDelegate> delegate;36 class JSGlobalObject; 43 37 44 + (WebInspectorClientRegistry *)sharedRegistry; 38 class JSGlobalObjectDebuggable FINAL : public Inspector::RemoteInspectorDebuggable { 39 WTF_MAKE_NONCOPYABLE(JSGlobalObjectDebuggable); 40 public: 41 JSGlobalObjectDebuggable(JSGlobalObject&); 42 ~JSGlobalObjectDebuggable() { } 45 43 46 - (void)registerClient:(WebInspectorClient*)client; 47 - (void)unregisterClient:(WebInspectorClient*)client; 48 - (WebInspectorClient*)clientForPageId:(unsigned)pageId; 49 - (NSDictionary *)inspectableWebViews; 44 virtual Inspector::RemoteInspectorDebuggable::DebuggableType type() const OVERRIDE { return Inspector::RemoteInspectorDebuggable::JavaScript; } 50 45 51 @end 46 virtual String name() const OVERRIDE; 47 virtual bool hasLocalDebugger() const OVERRIDE { return false; } 48 49 virtual void connect(Inspector::InspectorFrontendChannel*) OVERRIDE; 50 virtual void disconnect() OVERRIDE; 51 virtual void dispatchMessageFromRemoteFrontend(const String& message) OVERRIDE; 52 53 private: 54 JSGlobalObject& m_globalObject; 55 }; 56 57 } // namespace JSC 58 59 #endif // ENABLE(REMOTE_INSPECTOR) 60 61 #endif // !defined(JSGlobalObjectDebuggable_h) -
trunk/Source/WTF/ChangeLog
r160063 r160099 1 2013-12-03 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=124613 5 6 Reviewed by Timothy Hatcher. 7 8 * wtf/ios/WebCoreThread.cpp: 9 * wtf/ios/WebCoreThread.h: 10 Expose WebThreadRun/WebThreadRunSync iOS methods defined in WebCore through 11 WTF so that JavaScriptCore can use it. Another such method already existed. 12 1 13 2013-12-03 Mark Lam <mark.lam@apple.com> 2 14 -
trunk/Source/WTF/wtf/ios/WebCoreThread.cpp
r154307 r160099 29 29 #if USE(WEB_THREAD) 30 30 WTF_EXPORT_PRIVATE bool (*WebCoreWebThreadIsLockedOrDisabled)(void); 31 WTF_EXPORT_PRIVATE bool (*WebCoreWebThreadIsEnabled)(void); 32 WTF_EXPORT_PRIVATE void (*WebCoreWebThreadRun)(void (^block)()); 33 WTF_EXPORT_PRIVATE void (*WebCoreWebThreadRunSync)(void (^block)()); 31 34 #endif -
trunk/Source/WTF/wtf/ios/WebCoreThread.h
r154307 r160099 34 34 35 35 extern bool (*WebCoreWebThreadIsLockedOrDisabled)(void); 36 extern bool (*WebCoreWebThreadIsEnabled)(void); 37 extern void (*WebCoreWebThreadRun)(void (^block)()); 38 extern void (*WebCoreWebThreadRunSync)(void (^block)()); 36 39 37 40 #ifdef __cplusplus -
trunk/Source/WebCore/ChangeLog
r160098 r160099 1 2013-12-03 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=124613 5 6 Reviewed by Timothy Hatcher. 7 8 Make a WebCore::Page a "Web" Remote Debuggable. 9 10 * bindings/js/JSDOMGlobalObject.cpp: 11 Disable JavaScript context inspection on JSGlobalObjects inside WebCore::Page's. 12 13 * page/Page.cpp: 14 (WebCore::Page::Page): 15 (WebCore::Page::remoteInspectionAllowed): 16 (WebCore::Page::setRemoteInspectionAllowed): 17 (WebCore::Page::remoteInspectorInformationDidChange): 18 * page/Page.h: 19 * page/PageDebuggable.h: 20 * page/PageDebuggable.cpp: Added. 21 (WebCore::PageDebuggable::PageDebuggable): 22 (WebCore::PageDebuggable::name): 23 (WebCore::PageDebuggable::url): 24 (WebCore::PageDebuggable::hasLocalDebugger): 25 (WebCore::PageDebuggable::connect): 26 (WebCore::PageDebuggable::disconnect): 27 (WebCore::PageDebuggable::dispatchMessageFromRemoteFrontend): 28 (WebCore::PageDebuggable::setIndicating): 29 Make a page a "Web" debuggable. 30 31 * GNUmakefile.list.am: 32 * WebCore.exp.in: 33 * WebCore.vcxproj/WebCore.vcxproj: 34 * WebCore.vcxproj/WebCore.vcxproj.filters: 35 * WebCore.xcodeproj/project.pbxproj: 36 Misc. 37 38 * inspector/InspectorClient.h: 39 (WebCore::InspectorClient::indicate): 40 (WebCore::InspectorClient::hideIndicate): 41 Forward indicate methods to WebKit clients. 42 43 * loader/FrameLoader.cpp: 44 (WebCore::FrameLoader::didChangeTitle): 45 (WebCore::FrameLoader::dispatchDidCommitLoad): 46 Push updates when remote debuggable information like the Page's 47 URL or title change. 48 49 * ForwardingHeaders/inspector/InspectorFrontendChannel.h: 50 * inspector/InspectorForwarding.h: 51 Re-export Inspector::InspectorFrontendChannel as WebCore::InspectorFrontendChannel 52 to avoid needlessly updating code all over the place. 53 54 * inspector/CodeGeneratorInspectorStrings.py: 55 * inspector/InspectorWorkerAgent.cpp: 56 * inspector/WorkerInspectorController.cpp: 57 * testing/Internals.cpp: 58 Update include names. 59 60 * page/ContextMenuController.cpp: 61 (WebCore::ContextMenuController::populate): 62 Make the "Inspect Element" context menu work correctly when there is a 63 remote inspector instead of a local inspector. 64 1 65 2013-12-03 Joseph Pecoraro <pecoraro@apple.com> 2 66 -
trunk/Source/WebCore/GNUmakefile.list.am
r160030 r160099 3816 3816 Source/WebCore/inspector/InspectorDOMStorageAgent.cpp \ 3817 3817 Source/WebCore/inspector/InspectorDOMStorageAgent.h \ 3818 Source/WebCore/inspector/InspectorF rontendChannel.h \3818 Source/WebCore/inspector/InspectorForwarding.h \ 3819 3819 Source/WebCore/inspector/InspectorFrontendClient.h \ 3820 3820 Source/WebCore/inspector/InspectorFrontendClientLocal.cpp \ -
trunk/Source/WebCore/WebCore.exp.in
r160050 r160099 2805 2805 2806 2806 #if ENABLE(REMOTE_INSPECTOR) 2807 __ZN7WebCore4Page26setRemoteInspectionAllowedEb 2807 2808 __ZN7WebCore19InspectorController27dispatchMessageFromFrontendERKN3WTF6StringE 2808 2809 #endif -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r160030 r160099 20961 20961 <ClInclude Include="..\inspector\InspectorDOMDebuggerAgent.h" /> 20962 20962 <ClInclude Include="..\inspector\InspectorDOMStorageAgent.h" /> 20963 <ClInclude Include="..\inspector\InspectorF rontendChannel.h" />20963 <ClInclude Include="..\inspector\InspectorForwarding.h" /> 20964 20964 <ClInclude Include="..\inspector\InspectorFrontendClient.h" /> 20965 20965 <ClInclude Include="..\inspector\InspectorFrontendClientLocal.h" /> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
r160030 r160099 266 266 <UniqueIdentifier>{82ba9bb4-eaa0-4973-9bb3-a27667a1c167}</UniqueIdentifier> 267 267 </Filter> 268 <Filter Include="ForwardingHeaders\inspector"> 269 <UniqueIdentifier>{132bade2-0aab-6274-0adff-ae8aed5aed4}</UniqueIdentifier> 270 </Filter> 268 271 <Filter Include="history"> 269 272 <UniqueIdentifier>{6f39dedf-2d3a-414e-83fe-7bf64f911cfb}</UniqueIdentifier> … … 12232 12235 <Filter>ForwardingHeaders\heap</Filter> 12233 12236 </ClInclude> 12237 <ClInclude Include="..\ForwardingHeaders\inspector\InspectorForwarding.h"> 12238 <Filter>ForwardingHeaders\inspector</Filter> 12239 </ClInclude> 12234 12240 <ClInclude Include="..\history\BackForwardClient.h"> 12235 12241 <Filter>history</Filter> … … 12436 12442 <Filter>inspector</Filter> 12437 12443 </ClInclude> 12438 <ClInclude Include="..\inspector\InspectorF rontendChannel.h">12444 <ClInclude Include="..\inspector\InspectorForwarding.h"> 12439 12445 <Filter>inspector</Filter> 12440 12446 </ClInclude> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r160098 r160099 886 886 20D629261253690B00081543 /* InspectorInstrumentation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 20D629241253690B00081543 /* InspectorInstrumentation.cpp */; }; 887 887 20D629271253690B00081543 /* InspectorInstrumentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 20D629251253690B00081543 /* InspectorInstrumentation.h */; }; 888 227777601345DEA9008EA455 /* InspectorF rontendChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 2277775F1345DEA9008EA455 /* InspectorFrontendChannel.h */; settings = {ATTRIBUTES = (Private, ); }; };888 227777601345DEA9008EA455 /* InspectorForwarding.h in Headers */ = {isa = PBXBuildFile; fileRef = 2277775F1345DEA9008EA455 /* InspectorForwarding.h */; settings = {ATTRIBUTES = (Private, ); }; }; 889 889 228C284510D82500009D0D0E /* ScriptWrappable.h in Headers */ = {isa = PBXBuildFile; fileRef = 228C284410D82500009D0D0E /* ScriptWrappable.h */; settings = {ATTRIBUTES = (Private, ); }; }; 890 890 2292B27C1356669400CF11EF /* ImageBufferDataCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2292B27B1356669400CF11EF /* ImageBufferDataCG.cpp */; }; … … 3528 3528 A5732B0A136A161D005C8D7C /* DateComponents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5732B08136A161D005C8D7C /* DateComponents.cpp */; }; 3529 3529 A5732B0B136A161D005C8D7C /* DateComponents.h in Headers */ = {isa = PBXBuildFile; fileRef = A5732B09136A161D005C8D7C /* DateComponents.h */; }; 3530 A5A2AF0B1829734300DE1729 /* PageDebuggable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5A2AF091829734300DE1729 /* PageDebuggable.cpp */; }; 3531 A5A2AF0C1829734300DE1729 /* PageDebuggable.h in Headers */ = {isa = PBXBuildFile; fileRef = A5A2AF0A1829734300DE1729 /* PageDebuggable.h */; }; 3530 3532 A5ABB78713B904BC00F197E3 /* LineBreakIteratorPoolICU.h in Headers */ = {isa = PBXBuildFile; fileRef = A5ABB78613B904BC00F197E3 /* LineBreakIteratorPoolICU.h */; }; 3531 3533 A5AC4AEF18336975007114E0 /* InspectorBackendDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5AC4AED18336975007114E0 /* InspectorBackendDispatcher.cpp */; }; … … 7511 7513 20D629241253690B00081543 /* InspectorInstrumentation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorInstrumentation.cpp; sourceTree = "<group>"; }; 7512 7514 20D629251253690B00081543 /* InspectorInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorInstrumentation.h; sourceTree = "<group>"; }; 7513 2277775F1345DEA9008EA455 /* InspectorF rontendChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorFrontendChannel.h; sourceTree = "<group>"; };7515 2277775F1345DEA9008EA455 /* InspectorForwarding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorForwarding.h; sourceTree = "<group>"; }; 7514 7516 228C284410D82500009D0D0E /* ScriptWrappable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptWrappable.h; sourceTree = "<group>"; }; 7515 7517 2292B27B1356669400CF11EF /* ImageBufferDataCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageBufferDataCG.cpp; sourceTree = "<group>"; }; … … 10343 10345 A593CF7418402D4B00BFCE27 /* CodeGeneratorInspectorStrings.py */ = {isa = PBXFileReference; lastKnownFileType = text.script.python; path = CodeGeneratorInspectorStrings.py; sourceTree = "<group>"; }; 10344 10346 A593CF7518402D4B00BFCE27 /* combine-javascript-resources.pl */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; path = "combine-javascript-resources.pl"; sourceTree = "<group>"; }; 10347 A5A2AF091829734300DE1729 /* PageDebuggable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageDebuggable.cpp; sourceTree = "<group>"; }; 10348 A5A2AF0A1829734300DE1729 /* PageDebuggable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageDebuggable.h; sourceTree = "<group>"; }; 10345 10349 A5ABB78613B904BC00F197E3 /* LineBreakIteratorPoolICU.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineBreakIteratorPoolICU.h; sourceTree = "<group>"; }; 10346 10350 A5AC4AED18336975007114E0 /* InspectorBackendDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorBackendDispatcher.cpp; sourceTree = "<group>"; }; … … 14511 14515 7A74ECB8101839A500BF939E /* InspectorDOMStorageAgent.cpp */, 14512 14516 7A74ECB9101839A600BF939E /* InspectorDOMStorageAgent.h */, 14513 2277775F1345DEA9008EA455 /* InspectorF rontendChannel.h */,14517 2277775F1345DEA9008EA455 /* InspectorForwarding.h */, 14514 14518 F344C7121125B82C00F26EEE /* InspectorFrontendClient.h */, 14515 14519 F344C75711294FF600F26EEE /* InspectorFrontendClientLocal.cpp */, … … 15720 15724 DAACB3D916F2416400666135 /* PageConsole.cpp */, 15721 15725 DAACB3DA16F2416400666135 /* PageConsole.h */, 15726 A5A2AF091829734300DE1729 /* PageDebuggable.cpp */, 15727 A5A2AF0A1829734300DE1729 /* PageDebuggable.h */, 15722 15728 9302B0BC0D79F82900C7EE83 /* PageGroup.cpp */, 15723 15729 9302B0BE0D79F82C00C7EE83 /* PageGroup.h */, … … 23079 23085 E4D58EBB17B8F12800CBDCA8 /* ElementTraversal.h in Headers */, 23080 23086 93B77A380ADD792500EA4B81 /* FrameLoaderTypes.h in Headers */, 23087 A5A2AF0C1829734300DE1729 /* PageDebuggable.h in Headers */, 23081 23088 658436860AE01B7400E53753 /* FrameLoadRequest.h in Headers */, 23082 23089 628D214E12131EF40055DCFC /* FrameNetworkingContext.h in Headers */, … … 23367 23374 0705853417FDE6D9005F2BCB /* JSMediaTrackConstraints.h in Headers */, 23368 23375 578DA20E1520EB8C006141C1 /* InspectorFrontend.h in Headers */, 23369 227777601345DEA9008EA455 /* InspectorF rontendChannel.h in Headers */,23376 227777601345DEA9008EA455 /* InspectorForwarding.h in Headers */, 23370 23377 F344C7141125B82C00F26EEE /* InspectorFrontendClient.h in Headers */, 23371 23378 F344C75311294D9D00F26EEE /* InspectorFrontendClientLocal.h in Headers */, … … 27819 27826 C5A1EA7C152BCF04004D00B6 /* SimplifyMarkupCommand.cpp in Sources */, 27820 27827 FD00D7A414A3F61900734011 /* SincResampler.cpp in Sources */, 27828 A5A2AF0B1829734300DE1729 /* PageDebuggable.cpp in Sources */, 27821 27829 51327D6111A33A2B004F9D65 /* SinkDocument.cpp in Sources */, 27822 27830 49E911CC0EF86D47009D0CAF /* SkewTransformOperation.cpp in Sources */, -
trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
r159679 r160099 57 57 Base::finishCreation(vm); 58 58 ASSERT(inherits(info())); 59 60 #if ENABLE(REMOTE_INSPECTOR) 61 setRemoteDebuggingEnabled(false); 62 #endif 59 63 } 60 64 … … 63 67 Base::finishCreation(vm, thisValue); 64 68 ASSERT(inherits(info())); 69 70 #if ENABLE(REMOTE_INSPECTOR) 71 setRemoteDebuggingEnabled(false); 72 #endif 65 73 } 66 74 -
trunk/Source/WebCore/inspector/CodeGeneratorInspectorStrings.py
r159308 r160099 180 180 #include "InspectorAgent.h" 181 181 #include "InspectorValues.h" 182 #include "InspectorF rontendChannel.h"182 #include "InspectorForwarding.h" 183 183 #include <wtf/text/CString.h> 184 184 #include <wtf/text/WTFString.h> … … 201 201 #include "InspectorFrontend.h" 202 202 203 #include "InspectorF rontendChannel.h"203 #include "InspectorForwarding.h" 204 204 #include <wtf/text/CString.h> 205 205 #include <wtf/text/WTFString.h> -
trunk/Source/WebCore/inspector/InspectorBackendDispatcher.cpp
r159289 r160099 30 30 #if ENABLE(INSPECTOR) 31 31 32 #include "InspectorF rontendChannel.h"32 #include "InspectorForwarding.h" 33 33 #include "InspectorValues.h" 34 34 #include <wtf/text/CString.h> -
trunk/Source/WebCore/inspector/InspectorClient.h
r158415 r160099 53 53 virtual void hideHighlight() = 0; 54 54 55 virtual void indicate() { } 56 virtual void hideIndication() { } 57 55 58 virtual bool canClearBrowserCache() { return false; } 56 59 virtual void clearBrowserCache() { } -
trunk/Source/WebCore/inspector/InspectorController.cpp
r160012 r160099 85 85 , m_inspectorClient(inspectorClient) 86 86 , m_isUnderTest(false) 87 #if ENABLE(REMOTE_INSPECTOR) 88 , m_hasRemoteFrontend(false) 89 #endif 87 90 { 88 91 OwnPtr<InspectorAgent> inspectorAgentPtr(InspectorAgent::create(page, m_injectedScriptManager.get(), m_instrumentingAgents.get())); … … 149 152 150 153 m_agents.append(InspectorHeapProfilerAgent::create(m_instrumentingAgents.get(), m_injectedScriptManager.get())); 151 152 154 #endif 153 155 … … 204 206 } 205 207 208 bool InspectorController::hasLocalFrontend() const 209 { 210 #if ENABLE(REMOTE_INSPECTOR) 211 return hasFrontend() && !m_hasRemoteFrontend; 212 #else 213 return hasFrontend(); 214 #endif 215 } 216 217 bool InspectorController::hasRemoteFrontend() const 218 { 219 #if ENABLE(REMOTE_INSPECTOR) 220 return m_hasRemoteFrontend; 221 #else 222 return false; 223 #endif 224 } 225 206 226 bool InspectorController::hasInspectorFrontendClient() const 207 227 { … … 234 254 InspectorInstrumentation::registerInstrumentingAgents(m_instrumentingAgents.get()); 235 255 InspectorInstrumentation::frontendCreated(); 256 257 #if ENABLE(REMOTE_INSPECTOR) 258 if (!m_hasRemoteFrontend) 259 m_page->remoteInspectorInformationDidChange(); 260 #endif 236 261 } 237 262 … … 251 276 InspectorInstrumentation::frontendDeleted(); 252 277 InspectorInstrumentation::unregisterInstrumentingAgents(m_instrumentingAgents.get()); 278 279 #if ENABLE(REMOTE_INSPECTOR) 280 if (!m_hasRemoteFrontend) 281 m_page->remoteInspectorInformationDidChange(); 282 #endif 253 283 } 254 284 255 285 void InspectorController::show() 256 286 { 287 ASSERT(!hasRemoteFrontend()); 288 257 289 if (!enabled()) 258 290 return; … … 311 343 return; 312 344 313 show(); 345 if (!hasRemoteFrontend()) 346 show(); 314 347 315 348 m_domAgent->inspect(node); … … 346 379 { 347 380 return m_overlay->highlightedNode(); 381 } 382 383 void InspectorController::setIndicating(bool indicating) 384 { 385 // FIXME: For non-iOS clients, we should have InspectorOverlay do something here. 386 if (indicating) 387 m_inspectorClient->indicate(); 388 else 389 m_inspectorClient->hideIndication(); 348 390 } 349 391 -
trunk/Source/WebCore/inspector/InspectorController.h
r160013 r160099 92 92 void dispatchMessageFromFrontend(const String& message); 93 93 94 bool hasFrontend() const { return !!m_inspectorFrontendChannel; } 95 bool hasLocalFrontend() const; 96 bool hasRemoteFrontend() const; 97 94 98 void connectFrontend(InspectorFrontendChannel*); 95 99 void disconnectFrontend(); 96 100 void setProcessId(long); 101 102 #if ENABLE(REMOTE_INSPECTOR) 103 void setHasRemoteFrontend(bool hasRemote) { m_hasRemoteFrontend = hasRemote; } 104 #endif 97 105 98 106 void inspect(Node*); … … 101 109 void hideHighlight(); 102 110 Node* highlightedNode() const; 111 112 void setIndicating(bool); 103 113 104 114 PassRefPtr<InspectorObject> buildObjectForHighlightedNode() const; … … 152 162 InspectorAgentRegistry m_agents; 153 163 bool m_isUnderTest; 164 165 #if ENABLE(REMOTE_INSPECTOR) 166 bool m_hasRemoteFrontend; 167 #endif 154 168 }; 155 169 -
trunk/Source/WebCore/inspector/InspectorForwarding.h
r160098 r160099 1 1 /* 2 * Copyright (C) 2011 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2013 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 11 12 * documentation and/or other materials provided with the distribution. 12 13 * 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY14 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 14 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 17 18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, … … 24 25 */ 25 26 26 class WebInspectorClient; 27 @class WebInspectorServerWebViewConnection; 27 #ifndef InspectorForwarding_h 28 #define InspectorForwarding_h 28 29 29 @interface WebInspectorRemoteChannel : NSObject { 30 @private 31 WebInspectorServerWebViewConnection *_remote; 32 WebInspectorClient* _local;30 #include <inspector/InspectorFrontendChannel.h> 31 32 namespace WebCore { 33 class InspectorFrontendChannel : public Inspector::InspectorFrontendChannel { }; 33 34 } 34 35 35 + (WebInspectorRemoteChannel *)createChannelForPageId:(unsigned)pageId connection:(WebInspectorServerWebViewConnection *)connection; 36 37 - (void)closeFromLocalSide; 38 - (void)closeFromRemoteSide; 39 - (void)sendMessageToFrontend:(NSString *)message; 40 - (void)sendMessageToBackend:(NSString *)message; 41 42 @end 36 #endif // !defined(InspectorForwarding_h) -
trunk/Source/WebCore/inspector/InspectorWorkerAgent.cpp
r159679 r160099 35 35 #include "InspectorWorkerAgent.h" 36 36 37 #include "InspectorForwarding.h" 37 38 #include "InspectorFrontend.h" 38 #include "InspectorFrontendChannel.h"39 39 #include "InspectorValues.h" 40 40 #include "InstrumentingAgents.h" -
trunk/Source/WebCore/inspector/WorkerInspectorController.cpp
r159679 r160099 40 40 #include "InspectorClient.h" 41 41 #include "InspectorConsoleAgent.h" 42 #include "InspectorForwarding.h" 42 43 #include "InspectorFrontend.h" 43 #include "InspectorFrontendChannel.h"44 44 #include "InspectorHeapProfilerAgent.h" 45 45 #include "InspectorProfilerAgent.h" -
trunk/Source/WebCore/loader/FrameLoader.cpp
r159986 r160099 3320 3320 m_client.dispatchDidReceiveTitle(loader->title()); 3321 3321 } 3322 3323 #if ENABLE(REMOTE_INSPECTOR) 3324 if (m_frame.isMainFrame()) 3325 m_frame.page()->remoteInspectorInformationDidChange(); 3326 #endif 3322 3327 } 3323 3328 … … 3341 3346 InspectorInstrumentation::didCommitLoad(&m_frame, m_documentLoader.get()); 3342 3347 3343 if (m_frame.isMainFrame()) 3348 if (m_frame.isMainFrame()) { 3344 3349 m_frame.page()->featureObserver()->didCommitLoad(); 3345 3350 #if ENABLE(REMOTE_INSPECTOR) 3351 m_frame.page()->remoteInspectorInformationDidChange(); 3352 #endif 3353 } 3346 3354 } 3347 3355 -
trunk/Source/WebCore/page/ContextMenuController.cpp
r158629 r160099 893 893 } else { 894 894 #if ENABLE(INSPECTOR) 895 if (!(frame->page() && frame->page()->inspectorController()->hasInspectorFrontendClient())) {895 if (!(frame->page() && (frame->page()->inspectorController()->hasInspectorFrontendClient() || frame->page()->inspectorController()->hasRemoteFrontend()))) { 896 896 #endif 897 897 -
trunk/Source/WebCore/page/Page.cpp
r158461 r160099 60 60 #include "PageCache.h" 61 61 #include "PageConsole.h" 62 #include "PageDebuggable.h" 62 63 #include "PageGroup.h" 63 64 #include "PageThrottler.h" … … 187 188 , m_pageThrottler(std::make_unique<PageThrottler>(*this)) 188 189 , m_console(std::make_unique<PageConsole>(*this)) 190 #if ENABLE(REMOTE_INSPECTOR) 191 , m_inspectorDebuggable(std::make_unique<PageDebuggable>(*this)) 192 #endif 189 193 , m_lastSpatialNavigationCandidatesCount(0) // NOTE: Only called from Internals for Spatial Navigation testing. 190 194 , m_framesHandlingBeforeUnloadEvent(0) … … 203 207 #ifndef NDEBUG 204 208 pageCounter.increment(); 209 #endif 210 211 #if ENABLE(REMOTE_INSPECTOR) 212 m_inspectorDebuggable->init(); 205 213 #endif 206 214 } … … 1292 1300 #endif 1293 1301 1302 #if ENABLE(REMOTE_INSPECTOR) 1303 bool Page::remoteInspectionAllowed() const 1304 { 1305 return m_inspectorDebuggable->remoteDebuggingAllowed(); 1306 } 1307 1308 void Page::setRemoteInspectionAllowed(bool allowed) 1309 { 1310 m_inspectorDebuggable->setRemoteDebuggingAllowed(allowed); 1311 } 1312 1313 void Page::remoteInspectorInformationDidChange() const 1314 { 1315 m_inspectorDebuggable->update(); 1316 } 1317 #endif 1318 1294 1319 void Page::addLayoutMilestones(LayoutMilestones milestones) 1295 1320 { -
trunk/Source/WebCore/page/Page.h
r158416 r160099 81 81 class PageActivityAssertionToken; 82 82 class PageConsole; 83 class PageDebuggable; 83 84 class PageGroup; 84 85 class PageThrottler; … … 179 180 int subframeCount() const { checkSubframeCountConsistency(); return m_subframeCount; } 180 181 182 #if ENABLE(REMOTE_INSPECTOR) 183 bool remoteInspectionAllowed() const; 184 void setRemoteInspectionAllowed(bool); 185 void remoteInspectorInformationDidChange() const; 186 #endif 187 181 188 Chrome& chrome() const { return *m_chrome; } 182 189 DragCaretController& dragCaretController() const { return *m_dragCaretController; } … … 533 540 const std::unique_ptr<PageConsole> m_console; 534 541 542 #if ENABLE(REMOTE_INSPECTOR) 543 const std::unique_ptr<PageDebuggable> m_inspectorDebuggable; 544 #endif 545 535 546 HashSet<String> m_seenPlugins; 536 547 HashSet<String> m_seenMediaEngines; -
trunk/Source/WebCore/page/PageDebuggable.h
r160098 r160099 1 1 /* 2 * Copyright (C) 201 2 Apple Inc. All Rights Reserved.2 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 @class WebInspectorServer; 27 @class WebInspectorServerWebViewConnection; 28 @class WebInspectorXPCWrapper; 26 #ifndef PageDebuggable_h 27 #define PageDebuggable_h 29 28 30 @interface WebInspectorServerWebViewConnectionController : NSObject { 31 @private 32 WebInspectorServer *_server; // weak, the server should never deallocate. 33 NSMutableDictionary *_openConnections; 34 BOOL _hasScheduledPush; 35 } 29 #if ENABLE(REMOTE_INSPECTOR) 36 30 37 - (id)initWithServer:(WebInspectorServer *)server; 31 #include <JavaScriptCore/RemoteInspectorDebuggable.h> 32 #include <wtf/Noncopyable.h> 38 33 39 - (void)closeAllConnections; 34 namespace WebCore { 40 35 41 - (void)pushListing; 42 - (void)receivedMessage:(NSString *)messageName userInfo:(NSDictionary *)userInfo; 36 class Page; 43 37 44 - (void)connectionClosing:(WebInspectorServerWebViewConnection *)connection; 38 class PageDebuggable FINAL : public Inspector::RemoteInspectorDebuggable { 39 WTF_MAKE_NONCOPYABLE(PageDebuggable); 40 public: 41 PageDebuggable(Page&); 42 ~PageDebuggable() { } 45 43 46 - (void)sendMessageToFrontend:(NSString *)messageName userInfo:(NSDictionary *)userInfo; 44 virtual Inspector::RemoteInspectorDebuggable::DebuggableType type() const OVERRIDE { return Inspector::RemoteInspectorDebuggable::Web; } 47 45 48 @end 46 virtual String name() const OVERRIDE; 47 virtual String url() const OVERRIDE; 48 virtual bool hasLocalDebugger() const OVERRIDE; 49 50 virtual void connect(Inspector::InspectorFrontendChannel*) OVERRIDE; 51 virtual void disconnect() OVERRIDE; 52 virtual void dispatchMessageFromRemoteFrontend(const String& message) OVERRIDE; 53 virtual void setIndicating(bool) OVERRIDE; 54 55 private: 56 Page& m_page; 57 }; 58 59 } // namespace WebCore 60 61 #endif // ENABLE(REMOTE_INSPECTOR) 62 63 #endif // !defined(PageDebuggable_h) -
trunk/Source/WebCore/testing/Internals.cpp
r159679 r160099 60 60 #include "InspectorController.h" 61 61 #include "InspectorCounters.h" 62 #include "InspectorF rontendChannel.h"62 #include "InspectorForwarding.h" 63 63 #include "InspectorFrontendClientLocal.h" 64 64 #include "InspectorInstrumentation.h" -
trunk/Source/WebKit/ChangeLog
r160017 r160099 1 2013-12-03 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=124613 5 6 Reviewed by Timothy Hatcher. 7 8 * WebKit.xcodeproj/project.pbxproj: 9 1 10 2013-12-03 Brent Fulgham <bfulgham@apple.com> 2 11 -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r159831 r160099 379 379 A10C1D8E1820305E0036883A /* WebPDFViewPlaceholder.mm in Sources */ = {isa = PBXBuildFile; fileRef = A10C1D891820305E0036883A /* WebPDFViewPlaceholder.mm */; }; 380 380 A17A11B1180DC84800E5498C /* WebPluginPackagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = A17A11B0180DC84800E5498C /* WebPluginPackagePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 381 A5214FC713B975C8000015EF /* WebInspectorRemoteChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = A5214FC113B975C8000015EF /* WebInspectorRemoteChannel.h */; };382 A5214FC813B975C8000015EF /* WebInspectorRemoteChannel.mm in Sources */ = {isa = PBXBuildFile; fileRef = A5214FC213B975C8000015EF /* WebInspectorRemoteChannel.mm */; };383 A52209F813C53E75004BA7B1 /* WebInspectorRelayDefinitions.h in Headers */ = {isa = PBXBuildFile; fileRef = A52209F713C53E75004BA7B1 /* WebInspectorRelayDefinitions.h */; settings = {ATTRIBUTES = (Private, ); }; };384 A55E20FF14D7264C0031549E /* WebInspectorServerWebViewConnectionController.h in Headers */ = {isa = PBXBuildFile; fileRef = A55E20FD14D7264C0031549E /* WebInspectorServerWebViewConnectionController.h */; };385 A55E210014D7264C0031549E /* WebInspectorServerWebViewConnectionController.mm in Sources */ = {isa = PBXBuildFile; fileRef = A55E20FE14D7264C0031549E /* WebInspectorServerWebViewConnectionController.mm */; };386 381 A560946614D8AD2600799A8A /* WebIndicateLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = A560946414D8AD2600799A8A /* WebIndicateLayer.h */; }; 387 382 A560946714D8AD2600799A8A /* WebIndicateLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = A560946514D8AD2600799A8A /* WebIndicateLayer.mm */; }; 388 383 A5687BDA135B791A0074CBCB /* WebNodeHighlighter.h in Headers */ = {isa = PBXBuildFile; fileRef = A5687BD8135B791A0074CBCB /* WebNodeHighlighter.h */; }; 389 384 A5687BDB135B791A0074CBCB /* WebNodeHighlighter.mm in Sources */ = {isa = PBXBuildFile; fileRef = A5687BD9135B791A0074CBCB /* WebNodeHighlighter.mm */; }; 390 A57C28A713BAA5AD0070ACAB /* WebInspectorServerWebViewConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = A57C28A113BAA5AD0070ACAB /* WebInspectorServerWebViewConnection.h */; };391 A57C28A813BAA5AD0070ACAB /* WebInspectorServerWebViewConnection.mm in Sources */ = {isa = PBXBuildFile; fileRef = A57C28A213BAA5AD0070ACAB /* WebInspectorServerWebViewConnection.mm */; };392 A57C28A913BAA5AD0070ACAB /* WebInspectorServer.h in Headers */ = {isa = PBXBuildFile; fileRef = A57C28A313BAA5AD0070ACAB /* WebInspectorServer.h */; };393 A57C28AA13BAA5AD0070ACAB /* WebInspectorServer.mm in Sources */ = {isa = PBXBuildFile; fileRef = A57C28A413BAA5AD0070ACAB /* WebInspectorServer.mm */; };394 A57C28AB13BAA5AD0070ACAB /* WebInspectorXPCWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A57C28A513BAA5AD0070ACAB /* WebInspectorXPCWrapper.h */; settings = {ATTRIBUTES = (Private, ); }; };395 A57C28AC13BAA5AD0070ACAB /* WebInspectorXPCWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = A57C28A613BAA5AD0070ACAB /* WebInspectorXPCWrapper.m */; };396 385 A57E2F24120749E600048DF3 /* WebQuotaManager.h in Headers */ = {isa = PBXBuildFile; fileRef = A57E2F22120749E600048DF3 /* WebQuotaManager.h */; settings = {ATTRIBUTES = (Private, ); }; }; 397 A57EB78F13B97A4E008D691D /* WebInspectorClientRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = A57EB78D13B97A4E008D691D /* WebInspectorClientRegistry.h */; };398 A57EB79013B97A4E008D691D /* WebInspectorClientRegistry.mm in Sources */ = {isa = PBXBuildFile; fileRef = A57EB78E13B97A4E008D691D /* WebInspectorClientRegistry.mm */; };399 386 A58A5799143E727000125F50 /* WebOpenPanelResultListener.h in Headers */ = {isa = PBXBuildFile; fileRef = A58A5797143E727000125F50 /* WebOpenPanelResultListener.h */; }; 400 387 A58A579A143E727000125F50 /* WebOpenPanelResultListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = A58A5798143E727000125F50 /* WebOpenPanelResultListener.mm */; }; … … 779 766 A10C1D8F1820307D0036883A /* WebKit.iOS.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; name = WebKit.iOS.exp; path = ios/WebKit.iOS.exp; sourceTree = "<group>"; }; 780 767 A17A11B0180DC84800E5498C /* WebPluginPackagePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPluginPackagePrivate.h; sourceTree = "<group>"; }; 781 A5214FC113B975C8000015EF /* WebInspectorRemoteChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebInspectorRemoteChannel.h; path = remote/WebInspectorRemoteChannel.h; sourceTree = "<group>"; };782 A5214FC213B975C8000015EF /* WebInspectorRemoteChannel.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebInspectorRemoteChannel.mm; path = remote/WebInspectorRemoteChannel.mm; sourceTree = "<group>"; };783 A52209F713C53E75004BA7B1 /* WebInspectorRelayDefinitions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebInspectorRelayDefinitions.h; path = remote/WebInspectorRelayDefinitions.h; sourceTree = "<group>"; };784 A55E20FD14D7264C0031549E /* WebInspectorServerWebViewConnectionController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebInspectorServerWebViewConnectionController.h; path = remote/WebInspectorServerWebViewConnectionController.h; sourceTree = "<group>"; };785 A55E20FE14D7264C0031549E /* WebInspectorServerWebViewConnectionController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebInspectorServerWebViewConnectionController.mm; path = remote/WebInspectorServerWebViewConnectionController.mm; sourceTree = "<group>"; };786 768 A560946414D8AD2600799A8A /* WebIndicateLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebIndicateLayer.h; sourceTree = "<group>"; }; 787 769 A560946514D8AD2600799A8A /* WebIndicateLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebIndicateLayer.mm; sourceTree = "<group>"; }; 788 770 A5687BD8135B791A0074CBCB /* WebNodeHighlighter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNodeHighlighter.h; sourceTree = "<group>"; }; 789 771 A5687BD9135B791A0074CBCB /* WebNodeHighlighter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNodeHighlighter.mm; sourceTree = "<group>"; }; 790 A57C28A113BAA5AD0070ACAB /* WebInspectorServerWebViewConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebInspectorServerWebViewConnection.h; path = remote/WebInspectorServerWebViewConnection.h; sourceTree = "<group>"; };791 A57C28A213BAA5AD0070ACAB /* WebInspectorServerWebViewConnection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebInspectorServerWebViewConnection.mm; path = remote/WebInspectorServerWebViewConnection.mm; sourceTree = "<group>"; };792 A57C28A313BAA5AD0070ACAB /* WebInspectorServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebInspectorServer.h; path = remote/WebInspectorServer.h; sourceTree = "<group>"; };793 A57C28A413BAA5AD0070ACAB /* WebInspectorServer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebInspectorServer.mm; path = remote/WebInspectorServer.mm; sourceTree = "<group>"; };794 A57C28A513BAA5AD0070ACAB /* WebInspectorXPCWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebInspectorXPCWrapper.h; path = remote/WebInspectorXPCWrapper.h; sourceTree = "<group>"; };795 A57C28A613BAA5AD0070ACAB /* WebInspectorXPCWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WebInspectorXPCWrapper.m; path = remote/WebInspectorXPCWrapper.m; sourceTree = "<group>"; };796 772 A57E2F22120749E600048DF3 /* WebQuotaManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebQuotaManager.h; sourceTree = "<group>"; }; 797 A57EB78D13B97A4E008D691D /* WebInspectorClientRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebInspectorClientRegistry.h; path = remote/WebInspectorClientRegistry.h; sourceTree = "<group>"; };798 A57EB78E13B97A4E008D691D /* WebInspectorClientRegistry.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebInspectorClientRegistry.mm; path = remote/WebInspectorClientRegistry.mm; sourceTree = "<group>"; };799 773 A58A5797143E727000125F50 /* WebOpenPanelResultListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebOpenPanelResultListener.h; sourceTree = "<group>"; }; 800 774 A58A5798143E727000125F50 /* WebOpenPanelResultListener.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebOpenPanelResultListener.mm; sourceTree = "<group>"; }; … … 1053 1027 isa = PBXGroup; 1054 1028 children = ( 1055 A5214FBF13B97596000015EF /* remote */,1056 1029 5D7BF8120C2A1D90008CE06D /* WebInspector.h */, 1057 1030 5D7BF8130C2A1D90008CE06D /* WebInspector.mm */, … … 1508 1481 ); 1509 1482 name = ios; 1510 sourceTree = "<group>";1511 };1512 A5214FBF13B97596000015EF /* remote */ = {1513 isa = PBXGroup;1514 children = (1515 A57EB78D13B97A4E008D691D /* WebInspectorClientRegistry.h */,1516 A57EB78E13B97A4E008D691D /* WebInspectorClientRegistry.mm */,1517 A52209F713C53E75004BA7B1 /* WebInspectorRelayDefinitions.h */,1518 A5214FC113B975C8000015EF /* WebInspectorRemoteChannel.h */,1519 A5214FC213B975C8000015EF /* WebInspectorRemoteChannel.mm */,1520 A57C28A313BAA5AD0070ACAB /* WebInspectorServer.h */,1521 A57C28A413BAA5AD0070ACAB /* WebInspectorServer.mm */,1522 A57C28A113BAA5AD0070ACAB /* WebInspectorServerWebViewConnection.h */,1523 A57C28A213BAA5AD0070ACAB /* WebInspectorServerWebViewConnection.mm */,1524 A55E20FD14D7264C0031549E /* WebInspectorServerWebViewConnectionController.h */,1525 A55E20FE14D7264C0031549E /* WebInspectorServerWebViewConnectionController.mm */,1526 A57C28A513BAA5AD0070ACAB /* WebInspectorXPCWrapper.h */,1527 A57C28A613BAA5AD0070ACAB /* WebInspectorXPCWrapper.m */,1528 );1529 name = remote;1530 1483 sourceTree = "<group>"; 1531 1484 }; … … 1826 1779 5D7BF8140C2A1D90008CE06D /* WebInspector.h in Headers */, 1827 1780 06693DDC0BFBA85200216072 /* WebInspectorClient.h in Headers */, 1828 A57EB78F13B97A4E008D691D /* WebInspectorClientRegistry.h in Headers */,1829 1781 B804176F1217A83100466BAE /* WebInspectorFrontend.h in Headers */, 1830 1782 7A8FF0D11075024A00A80A08 /* WebInspectorPrivate.h in Headers */, 1831 A52209F813C53E75004BA7B1 /* WebInspectorRelayDefinitions.h in Headers */,1832 A5214FC713B975C8000015EF /* WebInspectorRemoteChannel.h in Headers */,1833 A57C28A913BAA5AD0070ACAB /* WebInspectorServer.h in Headers */,1834 A57C28A713BAA5AD0070ACAB /* WebInspectorServerWebViewConnection.h in Headers */,1835 A55E20FF14D7264C0031549E /* WebInspectorServerWebViewConnectionController.h in Headers */,1836 A57C28AB13BAA5AD0070ACAB /* WebInspectorXPCWrapper.h in Headers */,1837 1783 939810420824BF01008DF038 /* WebJavaScriptTextInputPanel.h in Headers */, 1838 1784 37D1DCA81065928C0068F7EF /* WebJSPDFDoc.h in Headers */, … … 2277 2223 06693DDD0BFBA85200216072 /* WebInspectorClient.mm in Sources */, 2278 2224 1C7B0C660EB2464D00A28502 /* WebInspectorClientCF.cpp in Sources */, 2279 A57EB79013B97A4E008D691D /* WebInspectorClientRegistry.mm in Sources */,2280 2225 B80417701217A83100466BAE /* WebInspectorFrontend.mm in Sources */, 2281 A5214FC813B975C8000015EF /* WebInspectorRemoteChannel.mm in Sources */,2282 A57C28AA13BAA5AD0070ACAB /* WebInspectorServer.mm in Sources */,2283 A57C28A813BAA5AD0070ACAB /* WebInspectorServerWebViewConnection.mm in Sources */,2284 A55E210014D7264C0031549E /* WebInspectorServerWebViewConnectionController.mm in Sources */,2285 A57C28AC13BAA5AD0070ACAB /* WebInspectorXPCWrapper.m in Sources */,2286 2226 A10C1D1918202F9C0036883A /* WebDefaultFormDelegate.m in Sources */, 2287 2227 939810E40824BF01008DF038 /* WebJavaScriptTextInputPanel.m in Sources */, -
trunk/Source/WebKit/blackberry/ChangeLog
r160023 r160099 1 2013-12-03 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=124613 5 6 Reviewed by Timothy Hatcher. 7 8 * WebCoreSupport/InspectorClientBlackBerry.h: 9 1 10 2013-12-03 Nick Diego Yamane <nick.yamane@openbossa.org> 2 11 -
trunk/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.h
r158415 r160099 22 22 23 23 #include "InspectorClient.h" 24 #include "InspectorF rontendChannel.h"24 #include "InspectorForwarding.h" 25 25 #include "InspectorOverlay.h" 26 26 #include "InspectorOverlayBlackBerry.h" -
trunk/Source/WebKit/cf/ChangeLog
r158050 r160099 1 2013-12-03 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=124613 5 6 Reviewed by Timothy Hatcher. 7 8 * WebCoreSupport/WebInspectorClientCF.cpp: 9 (WebInspectorClient::sendMessageToFrontend): 10 1 11 2013-10-25 Joseph Pecoraro <pecoraro@apple.com> 2 12 -
trunk/Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
r158050 r160099 92 92 } 93 93 94 #if !ENABLE(REMOTE_INSPECTOR)95 94 bool WebInspectorClient::sendMessageToFrontend(const String& message) 96 95 { 97 96 return doDispatchMessageOnFrontendPage(m_frontendPage, message); 98 97 } 99 #endif100 98 101 99 bool WebInspectorClient::inspectorAttachDisabled() -
trunk/Source/WebKit/efl/ChangeLog
r159730 r160099 1 2013-12-03 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=124613 5 6 Reviewed by Timothy Hatcher. 7 8 * WebCoreSupport/InspectorClientEfl.h: 9 1 10 2013-11-23 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 11 -
trunk/Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.h
r150680 r160099 36 36 37 37 #include "InspectorClient.h" 38 #include "InspectorF rontendChannel.h"38 #include "InspectorForwarding.h" 39 39 #include "InspectorFrontendClientLocal.h" 40 40 #include <Evas.h> -
trunk/Source/WebKit/gtk/ChangeLog
r159926 r160099 1 2013-12-03 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=124613 5 6 Reviewed by Timothy Hatcher. 7 8 * WebCoreSupport/InspectorClientGtk.h: 9 1 10 2013-12-02 Gustavo Noronha Silva <gustavo.noronha@collabora.com> 2 11 -
trunk/Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h
r150041 r160099 31 31 32 32 #include "InspectorClient.h" 33 #include "InspectorF rontendChannel.h"33 #include "InspectorForwarding.h" 34 34 #include "InspectorFrontendClientLocal.h" 35 35 #include "webkitwebinspector.h" -
trunk/Source/WebKit/ios/ChangeLog
r160044 r160099 1 2013-12-03 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=124613 5 6 Reviewed by Timothy Hatcher. 7 8 * WebCoreSupport/WebInspectorClientIOS.mm: 9 (WebInspectorClient::WebInspectorClient): 10 (WebInspectorClient::inspectorDestroyed): 11 1 12 2013-12-03 Ralph Thomas <ralpht@gmail.com> 2 13 -
trunk/Source/WebKit/ios/WebCoreSupport/WebInspectorClientIOS.mm
r158050 r160099 43 43 #import <wtf/PassOwnPtr.h> 44 44 45 #if ENABLE(REMOTE_INSPECTOR)46 #import "WebInspectorClientRegistry.h"47 #import "WebInspectorRemoteChannel.h"48 #endif49 50 45 using namespace WebCore; 51 46 … … 55 50 , m_frontendPage(0) 56 51 , m_frontendClient(0) 57 #if ENABLE(REMOTE_INSPECTOR)58 , m_remoteChannel(0)59 , m_pageId(0)60 #endif61 52 { 62 #if ENABLE(REMOTE_INSPECTOR)63 [[WebInspectorClientRegistry sharedRegistry] registerClient:this];64 #endif65 53 } 66 54 67 55 void WebInspectorClient::inspectorDestroyed() 68 56 { 69 #if ENABLE(REMOTE_INSPECTOR)70 [[WebInspectorClientRegistry sharedRegistry] unregisterClient:this];71 teardownRemoteConnection(true);72 #endif73 74 57 delete this; 75 58 } … … 117 100 } 118 101 119 #pragma mark -120 #pragma mark Remote Web Inspector Implementation121 122 #if ENABLE(REMOTE_INSPECTOR)123 bool WebInspectorClient::sendMessageToFrontend(const String& message)124 {125 if (m_remoteChannel) {126 [m_remoteChannel sendMessageToFrontend:message];127 return true;128 }129 130 // iOS does not have a local inspector. There should be no way to reach this.131 ASSERT_NOT_REACHED();132 notImplemented();133 134 return doDispatchMessageOnFrontendPage(m_frontendPage, message);135 }136 137 void WebInspectorClient::sendMessageToBackend(const String& message)138 {139 ASSERT(m_remoteChannel);140 141 Page* page = core(m_webView);142 page->inspectorController()->dispatchMessageFromFrontend(message);143 }144 145 bool WebInspectorClient::setupRemoteConnection(WebInspectorRemoteChannel *remoteChannel)146 {147 // There is already a local session, do not allow a remote session.148 if (hasLocalSession())149 return false;150 151 // There is already a remote session, do not allow a new remote session.152 if (m_remoteChannel)153 return false;154 155 m_remoteChannel = remoteChannel;156 157 Page* page = core(m_webView);158 page->inspectorController()->connectFrontend(this);159 160 // Force developer extras to be enabled in WebCore when a remote connection starts.161 if (page->settings())162 page->settings()->setDeveloperExtrasEnabled(true);163 164 return true;165 }166 167 void WebInspectorClient::teardownRemoteConnection(bool fromLocalSide)168 {169 ASSERT(WebThreadIsLockedOrDisabled());170 if (!m_remoteChannel)171 return;172 173 if (fromLocalSide)174 [m_remoteChannel closeFromLocalSide];175 176 Page* page = core(m_webView);177 if (page) {178 page->inspectorController()->disconnectFrontend();179 180 // Restore developer extras setting in WebCore.181 if (page && page->settings())182 page->settings()->setDeveloperExtrasEnabled([[m_webView preferences] developerExtrasEnabled]);183 }184 185 if (fromLocalSide)186 [m_remoteChannel release];187 188 m_remoteChannel = 0;189 }190 191 bool WebInspectorClient::hasLocalSession() const192 {193 return m_frontendPage != 0;194 }195 196 bool WebInspectorClient::canBeRemotelyInspected() const197 {198 return [m_webView canBeRemotelyInspected];199 }200 201 WebView *WebInspectorClient::inspectedWebView()202 {203 return m_webView;204 }205 #endif206 207 102 208 103 #pragma mark - -
trunk/Source/WebKit/mac/ChangeLog
r160015 r160099 1 2013-12-03 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=124613 5 6 Reviewed by Timothy Hatcher. 7 8 Remove the old ENABLE(REMOTE_INSPECTOR) connection management implementation. 9 10 * WebCoreSupport/WebInspectorClient.h: 11 * WebCoreSupport/WebInspectorClient.mm: 12 (WebInspectorClient::indicate): 13 (WebInspectorClient::hideIndicate): 14 Hook up WebView indication through this new path. 15 16 * WebCoreSupport/WebFrameLoaderClient.mm: 17 (WebFrameLoaderClient::dispatchDidReceiveTitle): 18 * WebCoreSupport/WebInspectorClient.h: 19 * WebCoreSupport/WebInspectorClient.mm: 20 (WebInspectorClient::WebInspectorClient): 21 (WebInspectorClient::inspectorDestroyed): 22 * WebInspector/remote/WebInspectorClientRegistry.h: Removed. 23 * WebInspector/remote/WebInspectorClientRegistry.mm: Removed. 24 * WebInspector/remote/WebInspectorRelayDefinitions.h: Removed. 25 * WebInspector/remote/WebInspectorRemoteChannel.h: Removed. 26 * WebInspector/remote/WebInspectorRemoteChannel.mm: Removed. 27 * WebInspector/remote/WebInspectorServer.h: Removed. 28 * WebInspector/remote/WebInspectorServer.mm: Removed. 29 * WebInspector/remote/WebInspectorServerWebViewConnection.h: Removed. 30 * WebInspector/remote/WebInspectorServerWebViewConnection.mm: Removed. 31 * WebInspector/remote/WebInspectorServerWebViewConnectionController.h: Removed. 32 * WebInspector/remote/WebInspectorServerWebViewConnectionController.mm: Removed. 33 * WebInspector/remote/WebInspectorXPCWrapper.h: Removed. 34 * WebInspector/remote/WebInspectorXPCWrapper.m: Removed. 35 * WebKit.exp: 36 * WebView/WebView.mm: 37 (-[WebView _commonInitializationWithFrameName:groupName:]): 38 (+[WebView _enableRemoteInspector]): 39 (+[WebView _disableRemoteInspector]): 40 (+[WebView _disableAutoStartRemoteInspector]): 41 (+[WebView _isRemoteInspectorEnabled]): 42 (+[WebView _hasRemoteInspectorSession]): 43 (-[WebView allowsRemoteInspection]): 44 (-[WebView setAllowsRemoteInspection:]): 45 (-[WebView setIndicatingForRemoteInspector:]): 46 (-[WebView setHostApplicationBundleId:name:]): 47 (-[WebView _didCommitLoadForFrame:]): 48 * WebView/WebViewData.h: 49 * WebView/WebViewData.mm: 50 (-[WebViewPrivate init]): 51 (-[WebViewPrivate dealloc]): 52 * WebView/WebViewInternal.h: 53 * WebView/WebViewPrivate.h: 54 Remove old REMOTE_INSPECTOR. 55 1 56 2013-12-02 Chris Fleizach <cfleizach@apple.com> 2 57 -
trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
r159001 r160099 139 139 #endif 140 140 141 #if ENABLE(REMOTE_INSPECTOR)142 #import "WebInspectorServer.h"143 #endif144 145 141 using namespace WebCore; 146 142 using namespace HTMLNames; … … 622 618 // FIXME: use direction of title. 623 619 CallFrameLoadDelegate(implementations->didReceiveTitleForFrameFunc, webView, @selector(webView:didReceiveTitle:forFrame:), (NSString *)title.string(), m_webFrame.get()); 624 625 #if ENABLE(REMOTE_INSPECTOR)626 BOOL isMainFrame = [webView mainFrame] == m_webFrame.get();627 if (isMainFrame)628 [[WebView sharedWebInspectorServer] pushListing];629 #endif630 620 } 631 621 -
trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h
r158884 r160099 28 28 29 29 #import <WebCore/InspectorClient.h> 30 #import <WebCore/InspectorF rontendChannel.h>30 #import <WebCore/InspectorForwarding.h> 31 31 #import <WebCore/InspectorFrontendClientLocal.h> 32 32 … … 74 74 virtual void hideHighlight() OVERRIDE; 75 75 76 virtual void indicate() OVERRIDE; 77 virtual void hideIndication() OVERRIDE; 78 76 79 virtual void didSetSearchingForNode(bool) OVERRIDE; 77 80 … … 86 89 void releaseFrontend(); 87 90 88 #if ENABLE(REMOTE_INSPECTOR)89 void sendMessageToBackend(const String&);90 91 bool setupRemoteConnection(WebInspectorRemoteChannel *remoteChannel);92 void teardownRemoteConnection(bool fromLocalSide);93 94 unsigned pageId() const { return m_pageId; }95 void setPageId(unsigned pageId) { m_pageId = pageId; }96 97 bool hasLocalSession() const;98 99 bool canBeRemotelyInspected() const;100 101 WebView *inspectedWebView();102 #endif103 104 91 private: 105 92 PassOwnPtr<WebCore::InspectorFrontendClientLocal::Settings> createFrontendSettings(); … … 109 96 WebCore::Page* m_frontendPage; 110 97 WebInspectorFrontendClient* m_frontendClient; 111 112 #if ENABLE(REMOTE_INSPECTOR)113 WebInspectorRemoteChannel *m_remoteChannel;114 unsigned m_pageId;115 #endif116 98 }; 117 99 -
trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
r158884 r160099 56 56 #import <wtf/text/Base64.h> 57 57 58 #if ENABLE(REMOTE_INSPECTOR)59 #import "WebInspectorClientRegistry.h"60 #import "WebInspectorRemoteChannel.h"61 #endif62 63 58 SOFT_LINK_STAGED_FRAMEWORK(WebInspectorUI, PrivateFrameworks, A) 64 59 … … 136 131 , m_frontendPage(0) 137 132 , m_frontendClient(0) 138 #if ENABLE(REMOTE_INSPECTOR) 139 , m_remoteChannel(0) 140 , m_pageId(0) 141 #endif 142 { 143 #if ENABLE(REMOTE_INSPECTOR) 144 [[WebInspectorClientRegistry sharedRegistry] registerClient:this]; 145 #endif 133 { 146 134 } 147 135 148 136 void WebInspectorClient::inspectorDestroyed() 149 137 { 150 #if ENABLE(REMOTE_INSPECTOR)151 [[WebInspectorClientRegistry sharedRegistry] unregisterClient:this];152 teardownRemoteConnection(true);153 #endif154 155 138 closeInspectorFrontend(); 156 139 delete this; … … 198 181 } 199 182 183 void WebInspectorClient::indicate() 184 { 185 [m_webView setIndicatingForRemoteInspector:YES]; 186 } 187 188 void WebInspectorClient::hideIndication() 189 { 190 [m_webView setIndicatingForRemoteInspector:NO]; 191 } 192 200 193 void WebInspectorClient::didSetSearchingForNode(bool enabled) 201 194 { … … 215 208 m_frontendPage = 0; 216 209 } 217 218 #if ENABLE(REMOTE_INSPECTOR)219 bool WebInspectorClient::sendMessageToFrontend(const String& message)220 {221 if (m_remoteChannel) {222 [m_remoteChannel sendMessageToFrontend:message];223 return true;224 }225 226 return doDispatchMessageOnFrontendPage(m_frontendPage, message);227 }228 229 void WebInspectorClient::sendMessageToBackend(const String& message)230 {231 ASSERT(m_remoteChannel);232 233 Page* page = core(m_webView);234 page->inspectorController()->dispatchMessageFromFrontend(message);235 }236 237 bool WebInspectorClient::setupRemoteConnection(WebInspectorRemoteChannel *remoteChannel)238 {239 // There is already a local session, do not allow a remote session.240 if (hasLocalSession())241 return false;242 243 // There is already a remote session, do not allow a new remote session.244 if (m_remoteChannel)245 return false;246 247 ASSERT([[m_webView preferences] developerExtrasEnabled]);248 249 m_remoteChannel = remoteChannel;250 251 Page* page = core(m_webView);252 page->inspectorController()->connectFrontend(this);253 254 return true;255 }256 257 void WebInspectorClient::teardownRemoteConnection(bool fromLocalSide)258 {259 if (!m_remoteChannel)260 return;261 262 if (fromLocalSide)263 [m_remoteChannel closeFromLocalSide];264 265 if (Page* page = core(m_webView))266 page->inspectorController()->disconnectFrontend();267 268 if (fromLocalSide)269 [m_remoteChannel release];270 271 m_remoteChannel = 0;272 }273 274 bool WebInspectorClient::hasLocalSession() const275 {276 return m_frontendPage != 0;277 }278 279 bool WebInspectorClient::canBeRemotelyInspected() const280 {281 return [m_webView canBeRemotelyInspected];282 }283 284 WebView *WebInspectorClient::inspectedWebView()285 {286 return m_webView;287 }288 #endif289 210 290 211 -
trunk/Source/WebKit/mac/WebKit.exp
r158884 r160099 23 23 .objc_class_name_WebIconDatabase 24 24 .objc_class_name_WebInspector 25 .objc_class_name_WebInspectorXPCWrapper26 25 .objc_class_name_WebJavaScriptTextInputPanel 27 26 .objc_class_name_WebKeyGenerator -
trunk/Source/WebKit/mac/WebView/WebView.mm
r159856 r160099 213 213 214 214 #if ENABLE(REMOTE_INSPECTOR) 215 #import "WebInspectorServer.h"216 215 #if PLATFORM(IOS) 217 216 #import "WebIndicateLayer.h" … … 392 391 #endif 393 392 394 #if ENABLE(REMOTE_INSPECTOR)395 static BOOL autoStartRemoteInspector = YES;396 #endif397 398 393 @interface NSObject (WebValidateWithoutDelegate) 399 394 - (BOOL)validateUserInterfaceItemWithoutDelegate:(id <NSValidatedUserInterfaceItem>)item; … … 526 521 527 522 #if ENABLE(REMOTE_INSPECTOR) 523 // FIXME: Legacy, remove this, switch to something from JavaScriptCore Inspector::RemoteInspectorServer. 528 524 NSString *_WebViewRemoteInspectorHasSessionChangedNotification = @"_WebViewRemoteInspectorHasSessionChangedNotification"; 529 525 #endif … … 767 763 Settings::setShouldRespectPriorityInCSSAttributeSetters(shouldRespectPriorityInCSSAttributeSetters()); 768 764 769 #if ENABLE(REMOTE_INSPECTOR)770 if (autoStartRemoteInspector)771 [WebView _enableRemoteInspector];772 #endif773 774 765 didOneTimeInitialization = true; 775 766 } … … 797 788 #if ENABLE(MEDIA_STREAM) 798 789 WebCore::provideUserMediaTo(_private->page, new WebUserMediaClient(self)); 790 #endif 791 792 #if ENABLE(REMOTE_INSPECTOR) 793 _private->page->setRemoteInspectionAllowed(true); 799 794 #endif 800 795 … … 1268 1263 1269 1264 #if ENABLE(REMOTE_INSPECTOR) 1270 + (WebInspectorServer *)sharedWebInspectorServer1271 {1272 static WebInspectorServer *sharedServer = [[WebInspectorServer alloc] init];1273 return sharedServer;1274 }1275 1276 1265 + (void)_enableRemoteInspector 1277 1266 { 1278 [[WebView sharedWebInspectorServer] start];1267 // FIXME: Move this to a new Inspector::RemoteInspectorServer interface or remove it. 1279 1268 } 1280 1269 1281 1270 + (void)_disableRemoteInspector 1282 1271 { 1283 [[WebView sharedWebInspectorServer] stop];1272 // FIXME: Move this to a new Inspector::RemoteInspectorServer interface or remove it. 1284 1273 } 1285 1274 1286 1275 + (void)_disableAutoStartRemoteInspector 1287 1276 { 1288 autoStartRemoteInspector = NO;1277 // FIXME: Move this to a new Inspector::RemoteInspectorServer interface or remove it. 1289 1278 } 1290 1279 1291 1280 + (BOOL)_isRemoteInspectorEnabled 1292 1281 { 1293 return [[WebView sharedWebInspectorServer] isEnabled]; 1282 // FIXME: Move this to a new Inspector::RemoteInspectorServer interface or remove it. 1283 return NO; 1294 1284 } 1295 1285 1296 1286 + (BOOL)_hasRemoteInspectorSession 1297 1287 { 1298 return [[WebView sharedWebInspectorServer] hasActiveDebugSession]; 1299 } 1300 1301 - (BOOL)canBeRemotelyInspected 1302 { 1303 #if !PLATFORM(IOS) 1304 if (![[self preferences] developerExtrasEnabled]) 1305 return NO; 1306 #endif 1307 1308 return [self allowsRemoteInspection]; 1288 // FIXME: Move this to a new Inspector::RemoteInspectorServer interface or remove it. 1289 return NO; 1309 1290 } 1310 1291 1311 1292 - (BOOL)allowsRemoteInspection 1312 1293 { 1313 return _private->allowsRemoteInspection; 1294 // FIXME: Move this to a new API. 1295 return NO; 1314 1296 } 1315 1297 1316 1298 - (void)setAllowsRemoteInspection:(BOOL)allow 1317 1299 { 1318 if (_private->allowsRemoteInspection == allow) 1319 return; 1320 1321 _private->allowsRemoteInspection = allow; 1322 1323 [[WebView sharedWebInspectorServer] pushListing]; 1300 // FIXME: Move this to a new API. 1324 1301 } 1325 1302 … … 1341 1318 } 1342 1319 #else 1343 // FIXME: Needs implementation. 1344 #endif 1345 } 1346 1347 - (void)setRemoteInspectorUserInfo:(NSDictionary *)userInfo 1348 { 1349 if ([_private->remoteInspectorUserInfo isEqualToDictionary:userInfo]) 1350 return; 1351 1352 [_private->remoteInspectorUserInfo release]; 1353 _private->remoteInspectorUserInfo = [userInfo copy]; 1354 1355 [[WebView sharedWebInspectorServer] pushListing]; 1356 } 1357 1358 - (NSDictionary *)remoteInspectorUserInfo 1359 { 1360 return _private->remoteInspectorUserInfo; 1320 // FIXME: Needs implementation or put an implementation in WebCore::InspectorOverlay. 1321 #endif 1361 1322 } 1362 1323 … … 1364 1325 - (void)setHostApplicationBundleId:(NSString *)bundleId name:(NSString *)name 1365 1326 { 1327 // FIXME: This has not yet been ported to Inspector::RemoteInspectorServer. 1328 1366 1329 if (![_private->hostApplicationBundleId isEqualToString:bundleId]) { 1367 1330 [_private->hostApplicationBundleId release]; … … 2119 2082 [self _didChangeValueForKey: _WebMainFrameURLKey]; 2120 2083 [NSApp setWindowsNeedUpdate:YES]; 2121 #if ENABLE(REMOTE_INSPECTOR)2122 [[WebView sharedWebInspectorServer] pushListing];2123 #endif2124 2084 } 2125 2085 -
trunk/Source/WebKit/mac/WebView/WebViewData.h
r158137 r160099 209 209 210 210 #if ENABLE(REMOTE_INSPECTOR) 211 BOOL allowsRemoteInspection;212 NSDictionary *remoteInspectorUserInfo;213 211 #if PLATFORM(IOS) 214 212 WebIndicateLayer *indicateLayer; -
trunk/Source/WebKit/mac/WebView/WebViewData.mm
r159001 r160099 100 100 #endif 101 101 102 #if ENABLE(REMOTE_INSPECTOR)103 allowsRemoteInspection = YES;104 #endif105 106 102 shouldCloseWithWindow = objc_collectingEnabled(); 107 103 … … 136 132 137 133 #if ENABLE(REMOTE_INSPECTOR) 138 [remoteInspectorUserInfo release];139 134 #if PLATFORM(IOS) 140 135 [indicateLayer release]; -
trunk/Source/WebKit/mac/WebView/WebViewInternal.h
r158050 r160099 62 62 @class WebDownload; 63 63 @class WebNodeHighlight; 64 #if ENABLE(REMOTE_INSPECTOR)65 @class WebInspectorServer;66 #endif67 64 68 65 #ifdef __cplusplus … … 218 215 #endif 219 216 220 #if ENABLE(REMOTE_INSPECTOR)221 + (WebInspectorServer *)sharedWebInspectorServer;222 #endif223 224 217 // Conversion functions between WebCore root view coordinates and web view coordinates. 225 218 - (NSPoint)_convertPointFromRootView:(NSPoint)point; -
trunk/Source/WebKit/mac/WebView/WebViewPrivate.h
r158050 r160099 78 78 79 79 #if ENABLE_REMOTE_INSPECTOR 80 // FIXME: Legacy, remove this, switch to something from JavaScriptCore Inspector::RemoteInspectorServer. 80 81 // Notification when the number of inspector sessions becomes non-zero or returns to 0. 81 82 // Check the current state via -[WebView _hasRemoteInspectorSession]. … … 264 265 265 266 /*! 266 @method canBeRemotelyInspected267 @result Looks at all the factors of this WebView and returns whether or not268 this WebView should allow a Remote Web Inspector to attach to it. This takes269 into account -allowsRemoteInspection, Private Browsing, and potentially other270 factors.271 */272 - (BOOL)canBeRemotelyInspected;273 274 /*!275 267 @method allowsRemoteInspection 276 268 @result Returns whether or not this WebView will allow a Remote Web Inspector … … 293 285 */ 294 286 - (void)setIndicatingForRemoteInspector:(BOOL)enabled; 295 296 /*297 @method setRemoteInspectorUserInfo298 @param tag The dictionary to be associated with the WebView.299 @abstract Developer specified dictionary for the WebView that will be300 sent to the Remote Debugger. The dictionary must contain property301 list serializable values.302 */303 - (void)setRemoteInspectorUserInfo:(NSDictionary *)userInfo;304 305 /*!306 @method remoteInspectorUserInfo307 @result Returns the dictionary associated with this WebView.308 */309 - (NSDictionary *)remoteInspectorUserInfo;310 287 #endif 311 288 -
trunk/Source/WebKit/win/ChangeLog
r159768 r160099 1 2013-12-03 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=124613 5 6 Reviewed by Timothy Hatcher. 7 8 * WebCoreSupport/WebInspectorClient.h: 9 1 10 2013-11-25 peavo@outlook.com <peavo@outlook.com> 2 11 -
trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h
r150041 r160099 32 32 #include <WebCore/COMPtr.h> 33 33 #include <WebCore/InspectorClient.h> 34 #include <WebCore/InspectorF rontendChannel.h>34 #include <WebCore/InspectorForwarding.h> 35 35 #include <WebCore/InspectorFrontendClientLocal.h> 36 36 #include <WebCore/WindowMessageListener.h> -
trunk/Source/WebKit/wince/ChangeLog
r158616 r160099 1 2013-12-03 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=124613 5 6 Reviewed by Timothy Hatcher. 7 8 * WebCoreSupport/InspectorClientWinCE.h: 9 1 10 2013-11-04 Zhuang Zhigang <zhuangzg@cn.fujitsu.com> 2 11 -
trunk/Source/WebKit/wince/WebCoreSupport/InspectorClientWinCE.h
r158501 r160099 27 27 28 28 #include "InspectorClient.h" 29 #include "InspectorF rontendChannel.h"29 #include "InspectorForwarding.h" 30 30 31 31 class WebView; -
trunk/Source/WebKit2/ChangeLog
r160097 r160099 1 2013-12-03 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=124613 5 6 Reviewed by Timothy Hatcher. 7 8 * WebProcess/WebCoreSupport/WebInspectorClient.h: 9 * WebProcess/WebPage/WebInspector.cpp: 10 Updated includes. 11 12 * WebProcess/WebPage/WebPage.cpp: 13 (WebKit::WebPage::WebPage): 14 * WebProcess/com.apple.WebProcess.sb.in: 15 Allow the WebProcess to access the "com.apple.webinspector" named 16 XPC service to expose its WebCore::Page's to remote debuggers. 17 1 18 2013-12-04 David Farler <dfarler@apple.com> 2 19 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h
r150578 r160099 32 32 33 33 #include <WebCore/InspectorClient.h> 34 #include <WebCore/InspectorF rontendChannel.h>34 #include <WebCore/InspectorForwarding.h> 35 35 36 36 namespace WebCore { -
trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp
r157323 r160099 35 35 #include "WebProcess.h" 36 36 #include <WebCore/InspectorController.h> 37 #include <WebCore/InspectorF rontendChannel.h>37 #include <WebCore/InspectorForwarding.h> 38 38 #include <WebCore/InspectorFrontendClient.h> 39 39 #include <WebCore/MainFrame.h> -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r160050 r160099 346 346 #endif 347 347 348 #if ENABLE(REMOTE_INSPECTOR) 349 m_page->setRemoteInspectionAllowed(true); 350 #endif 351 348 352 m_page->setCanStartMedia(false); 349 353 m_mayStartMediaWhenInWindow = parameters.mayStartMediaWhenInWindow; -
trunk/Source/WebKit2/WebProcess/com.apple.WebProcess.sb.in
r158330 r160099 139 139 140 140 #endif 141 142 ;; Remote Web Inspector 143 (allow mach-lookup 144 (global-name "com.apple.webinspector")) 141 145 142 146 ;; Various services required by AppKit and other frameworks
Note:
See TracChangeset
for help on using the changeset viewer.