Web Inspector: Push More Inspector Required Classes Down into JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=125324

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* CMakeLists.txt:
* GNUmakefile.am:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.vcxproj/JavaScriptCoreCommon.props:
* JavaScriptCore.vcxproj/copy-files.cmd:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bindings/ScriptFunctionCall.cpp: Renamed from Source/WebCore/bindings/js/ScriptFunctionCall.cpp.
* bindings/ScriptFunctionCall.h: Renamed from Source/WebCore/bindings/js/ScriptFunctionCall.h.
* bindings/ScriptObject.cpp: Copied from Source/WebCore/inspector/WorkerConsoleAgent.cpp.
* bindings/ScriptObject.h: Renamed from Source/WebCore/inspector/InspectorBaseAgent.h.
* bindings/ScriptValue.cpp: Renamed from Source/WebCore/bindings/js/ScriptValue.cpp.
* bindings/ScriptValue.h: Renamed from Source/WebCore/bindings/js/ScriptValue.h.
* inspector/InspectorAgentBase.h: Copied from Source/WebCore/inspector/InspectorAgentRegistry.h.
* inspector/InspectorAgentRegistry.cpp: Renamed from Source/WebCore/inspector/InspectorAgentRegistry.cpp.
* inspector/InspectorBackendDispatcher.h: Renamed from Source/WebCore/inspector/InspectorBackendDispatcher.h.
(Inspector::InspectorSupplementalBackendDispatcher::InspectorSupplementalBackendDispatcher):
(Inspector::InspectorSupplementalBackendDispatcher::~InspectorSupplementalBackendDispatcher):
* inspector/InspectorValues.cpp: Renamed from Source/WebCore/inspector/InspectorValues.cpp.
* inspector/InspectorValues.h: Renamed from Source/WebCore/inspector/InspectorValues.h.

Source/WebCore:

Part 1: Push down core inspector classes.

  - Move InspectAgentBase, InspectorAgentRegistry, InspectorBackendDispatcher, InspectorValues
    down to JavaScriptCore and into the Inspector namespace.
  - Add forwarding headers for JavaScriptCore/inspector files.
  - Use the Inspector namespace where appropriate.
  - Rename InspectorBaseAgent to InspectorAgentBase for clarity.

Part 2: Push Script wrapper classes down into JavaScriptCore/bindings.

  - Move ScriptObject and ScriptValue into JavaScriptCore but namespace Deprecated
  - Add forwarding headers
  - Use Deprecated::ScriptObject and Deprecated::ScriptValue everywhere.

Part 3: Push Down ScriptFunctionCall

  - Move ScriptFunctionCall to JavaScriptCore/bindings into namespace Deprecated.
  - Give constructor a function to all for a different JSC::call, because
    WebCore ScriptFunctionCall's use JSMainThreadExecState when isMainThread.
  - Prefer Deprecated::ScriptFunctionCall everywhere it is used in WebCore.

Part 4: Extract InspectorTypeBuilder helper functions

  - There is a chunk of InspectorTypeBuilder that never changes. Extract it into
    its own file, InspectorTypeBuilder.h in JSC/inspector, Inspector namespace.
  - This moves TypeBuilder from namespace WebCore to namespace Inspector
  - Rename the WebCore generated InspectorTypeBuilder to InspectorWebTypeBuilders,
    eventually the CodeGenerator script will do this for more then TypeBuilders
    and there will be "JS" TypeBuilders and "Web" TypeBuilders files.

No new tests. No change in functionality, just moving things around.

* CMakeLists.txt:
* ForwardingHeaders/bindings/ScriptFunctionCall.h: Added.
* ForwardingHeaders/bindings/ScriptObject.h: Added.
* ForwardingHeaders/bindings/ScriptValue.h: Added.
* ForwardingHeaders/inspector/InspectorAgentBase.h: Added.
* ForwardingHeaders/inspector/InspectorAgentRegistry.h: Added.
* ForwardingHeaders/inspector/InspectorBackendDispatcher.h: Added.
* ForwardingHeaders/inspector/InspectorTypeBuilder.h: Added.
* ForwardingHeaders/inspector/InspectorValues.h: Added.
* GNUmakefile.am:
* GNUmakefile.list.am:
* Modules/indexeddb/IDBAny.cpp:
(WebCore::IDBAny::scriptValue):
(WebCore::IDBAny::IDBAny):
* Modules/indexeddb/IDBAny.h:
* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::key):
(WebCore::IDBCursor::primaryKey):
(WebCore::IDBCursor::value):
(WebCore::IDBCursor::update):
(WebCore::IDBCursor::continueFunction):
(WebCore::IDBCursor::setValueReady):
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::cmp):
* Modules/indexeddb/IDBFactory.h:
* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::count):
(WebCore::IDBIndex::openKeyCursor):
(WebCore::IDBIndex::get):
(WebCore::IDBIndex::getKey):
* Modules/indexeddb/IDBIndex.h:
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::openKeyCursor):
* Modules/indexeddb/IDBKeyRange.cpp:
(WebCore::IDBKeyRange::lowerValue):
(WebCore::IDBKeyRange::upperValue):
(WebCore::IDBKeyRange::only):
(WebCore::IDBKeyRange::lowerBound):
(WebCore::IDBKeyRange::upperBound):
(WebCore::IDBKeyRange::bound):
* Modules/indexeddb/IDBKeyRange.h:
(WebCore::IDBKeyRange::lowerBound):
(WebCore::IDBKeyRange::upperBound):
(WebCore::IDBKeyRange::bound):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::get):
(WebCore::generateIndexKeysForValue):
(WebCore::IDBObjectStore::add):
(WebCore::IDBObjectStore::put):
(WebCore::IDBObjectStore::deleteFunction):
(WebCore::IDBObjectStore::openCursor):
(WebCore::IDBObjectStore::count):
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::setResultCursor):
(WebCore::IDBRequest::onSuccess):
(WebCore::IDBRequest::onSuccessInternal):
* Modules/indexeddb/IDBRequest.h:
* Modules/mediastream/CapabilityRange.cpp:
(WebCore::scriptValue):
(WebCore::CapabilityRange::min):
(WebCore::CapabilityRange::max):
* Modules/mediastream/CapabilityRange.h:
* Modules/mediastream/MediaTrackConstraint.h:
* Modules/mediastream/RTCIceCandidate.cpp:
* Modules/plugins/QuickTimePluginReplacement.cpp:
* Modules/plugins/QuickTimePluginReplacement.h:
* UseJSC.cmake:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/Dictionary.h:
(WebCore::Dictionary::getEventListener):
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::createIDBKeyFromScriptValueAndKeyPath):
(WebCore::injectIDBKeyIntoScriptValue):
(WebCore::canInjectIDBKeyIntoScriptValue):
(WebCore::deserializeIDBValue):
(WebCore::deserializeIDBValueBuffer):
(WebCore::idbKeyToScriptValue):
(WebCore::scriptValueToIDBKey):
* bindings/js/IDBBindingUtilities.h:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue):
* bindings/js/JSDictionary.h:
* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::JSHTMLCanvasElement::getContext):
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::InjectedScriptHost::scriptValueAsNode):
(WebCore::InjectedScriptHost::nodeAsScriptValue):
(WebCore::JSInjectedScriptHost::inspectedObject):
(WebCore::JSInjectedScriptHost::inspect):
* bindings/js/JSInjectedScriptManager.cpp:
(WebCore::InjectedScriptManager::createInjectedScript):
* bindings/js/JSMainThreadExecState.cpp:
(WebCore::functionCallHandlerFromAnyThread):
* bindings/js/JSMainThreadExecState.h:
(WebCore::JSMainThreadExecState::currentState):
* bindings/js/JSMessageEventCustom.cpp:
(WebCore::JSMessageEvent::data):
(WebCore::handleInitMessageEvent):
* bindings/js/ScheduledAction.cpp:
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptArguments):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::evaluate):
(WebCore::ScriptController::executeScriptInWorld):
(WebCore::ScriptController::executeScript):
(WebCore::ScriptController::executeIfJavaScriptURL):
* bindings/js/ScriptController.h:
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::setScriptSource):
(WebCore::ScriptDebugServer::updateCallStack):
(WebCore::ScriptDebugServer::dispatchDidPause):
(WebCore::ScriptDebugServer::runScript):
* bindings/js/ScriptDebugServer.h:
* bindings/js/ScriptGlobalObject.cpp: Renamed from Source/WebCore/bindings/js/ScriptObject.cpp.
(WebCore::handleException):
(WebCore::ScriptGlobalObject::set):
(WebCore::ScriptGlobalObject::get):
(WebCore::ScriptGlobalObject::remove):
* bindings/js/ScriptGlobalObject.h: Copied from Source/WebCore/inspector/ScriptCallStack.h.
(WebCore::ScriptGlobalObject::ScriptGlobalObject):
* bindings/js/ScriptObject.h: Removed.
* bindings/js/ScriptProfile.cpp:
(WebCore::buildInspectorObjectFor):
(WebCore::ScriptProfile::buildInspectorObjectForHead):
(WebCore::ScriptProfile::buildInspectorObjectForBottomUpHead):
* bindings/js/ScriptProfile.h:
* bindings/js/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::objectByHeapObjectId):
(WebCore::ScriptProfiler::getHeapObjectId):
* bindings/js/ScriptProfiler.h:
* bindings/js/ScriptState.h:
* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::deserializeForInspector):
(WebCore::SerializedScriptValue::serialize):
(WebCore::SerializedScriptValue::deserialize):
* bindings/js/SerializedScriptValue.h:
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
(WebCore::WorkerScriptController::setException):
* bindings/js/WorkerScriptController.h:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjAnyAttribute):
* dom/CustomEvent.cpp:
(WebCore::CustomEvent::initCustomEvent):
* dom/CustomEvent.h:
(WebCore::CustomEvent::detail):
* dom/MessageEvent.cpp:
(WebCore::MessageEvent::MessageEvent):
(WebCore::MessageEvent::initMessageEvent):
* dom/MessageEvent.h:
(WebCore::MessageEvent::create):
(WebCore::MessageEvent::dataAsScriptValue):
* dom/PopStateEvent.h:
(WebCore::PopStateEvent::state):
* dom/ScriptElement.cpp:
* html/HTMLMediaElement.cpp:
* html/parser/XSSAuditor.cpp:
* html/parser/XSSAuditorDelegate.cpp:
* inspector/CodeGeneratorInspector.py:
(RawTypes.BaseType.get_raw_validator_call_text):
(RawTypes.Object.get_array_item_raw_c_type_text):
(RawTypes.Any.get_array_item_raw_c_type_text):
(RawTypes.Array.get_array_item_raw_c_type_text):
(CommandReturnPassModel.OptOutput.get_return_var_type):
(CommandReturnPassModel.OptOutput.get_output_parameter_type):
(TypeModel.ExactlyInt.get_input_param_type_text):
(TypeModel.ExactlyInt.get_opt_output_type_):
(TypeModel.init_class):
(TypeBindings.create_named_type_declaration.Helper):
(TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder):
(TypeBindings.create_type_declaration_.EnumBinding.get_setter_value_expression_pattern):
(TypeBindings.create_type_declaration_.ClassBinding.get_code_generator.CodeGenerator.generate_type_builder):
(Inspector):
(ArrayBinding.get_array_item_c_type_text):
(Generator.go):
(Generator.process_command):
* inspector/CodeGeneratorInspectorStrings.py:
(void):
(InspectorFrontend_h):
(InspectorBackendDispatchers_h):
* inspector/ConsoleMessage.cpp:
(WebCore::messageSourceValue):
(WebCore::messageTypeValue):
(WebCore::messageLevelValue):
(WebCore::ConsoleMessage::addToFrontend):
* inspector/ConsoleMessage.h:
* inspector/ContentSearchUtils.cpp:
(WebCore::ContentSearchUtils::buildObjectForSearchMatch):
(WebCore::ContentSearchUtils::searchInTextByLines):
* inspector/ContentSearchUtils.h:
* inspector/InjectedScript.cpp:
(WebCore::InjectedScript::InjectedScript):
(WebCore::InjectedScript::evaluate):
(WebCore::InjectedScript::callFunctionOn):
(WebCore::InjectedScript::evaluateOnCallFrame):
(WebCore::InjectedScript::getFunctionDetails):
(WebCore::InjectedScript::getProperties):
(WebCore::InjectedScript::getInternalProperties):
(WebCore::InjectedScript::nodeForObjectId):
(WebCore::InjectedScript::releaseObject):
(WebCore::InjectedScript::wrapCallFrames):
(WebCore::InjectedScript::wrapObject):
(WebCore::InjectedScript::wrapTable):
(WebCore::InjectedScript::wrapNode):
(WebCore::InjectedScript::findObjectById):
(WebCore::InjectedScript::inspectNode):
(WebCore::InjectedScript::releaseObjectGroup):
(WebCore::InjectedScript::nodeAsScriptValue):
* inspector/InjectedScript.h:
* inspector/InjectedScriptBase.cpp:
(WebCore::InjectedScriptBase::InjectedScriptBase):
(WebCore::InjectedScriptBase::initialize):
(WebCore::InjectedScriptBase::injectedScriptObject):
(WebCore::InjectedScriptBase::callFunctionWithEvalEnabled):
(WebCore::InjectedScriptBase::makeCall):
(WebCore::InjectedScriptBase::makeEvalCall):
* inspector/InjectedScriptBase.h:
* inspector/InjectedScriptCanvasModule.cpp:
(WebCore::InjectedScriptCanvasModule::wrapCanvas2DContext):
(WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
(WebCore::InjectedScriptCanvasModule::callWrapContextFunction):
(WebCore::InjectedScriptCanvasModule::markFrameEnd):
(WebCore::InjectedScriptCanvasModule::callStartCapturingFunction):
(WebCore::InjectedScriptCanvasModule::callVoidFunctionWithTraceLogIdArgument):
(WebCore::InjectedScriptCanvasModule::traceLog):
(WebCore::InjectedScriptCanvasModule::replayTraceLog):
(WebCore::InjectedScriptCanvasModule::resourceInfo):
(WebCore::InjectedScriptCanvasModule::resourceState):
* inspector/InjectedScriptCanvasModule.h:
* inspector/InjectedScriptHost.cpp:
(WebCore::InjectedScriptHost::inspectImpl):
(WebCore::InjectedScriptHost::InspectableObject::get):
* inspector/InjectedScriptHost.h:
* inspector/InjectedScriptManager.cpp:
(WebCore::InjectedScriptManager::injectedScriptFor):
* inspector/InjectedScriptManager.h:
* inspector/InjectedScriptModule.cpp:
(WebCore::InjectedScriptModule::ensureInjected):
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
(WebCore::InspectorAgent::didCreateFrontendAndBackend):
(WebCore::InspectorAgent::inspect):
* inspector/InspectorAgent.h:
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
(WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend):
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
(WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
(WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
(WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
(WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::SelectorProfile::toInspectorObject):
(WebCore::InspectorCSSAgent::InspectorCSSAgent):
(WebCore::InspectorCSSAgent::didCreateFrontendAndBackend):
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::getInlineStylesForNode):
(WebCore::InspectorCSSAgent::getComputedStyleForNode):
(WebCore::InspectorCSSAgent::getAllStyleSheets):
(WebCore::InspectorCSSAgent::getStyleSheet):
(WebCore::InspectorCSSAgent::setStyleText):
(WebCore::InspectorCSSAgent::setPropertyText):
(WebCore::InspectorCSSAgent::toggleProperty):
(WebCore::InspectorCSSAgent::setRuleSelector):
(WebCore::InspectorCSSAgent::addRule):
(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
(WebCore::InspectorCSSAgent::getNamedFlowCollection):
(WebCore::InspectorCSSAgent::stopSelectorProfiler):
(WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
(WebCore::InspectorCSSAgent::asInspectorStyleSheet):
(WebCore::InspectorCSSAgent::collectStyleSheets):
(WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
(WebCore::InspectorCSSAgent::detectOrigin):
(WebCore::InspectorCSSAgent::buildObjectForRule):
(WebCore::InspectorCSSAgent::buildArrayForRuleList):
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
(WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
(WebCore::InspectorCSSAgent::buildArrayForRegions):
(WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
(WebCore::InspectorCanvasAgent::didCreateFrontendAndBackend):
(WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation):
(WebCore::InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation):
(WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
(WebCore::InspectorCanvasAgent::injectedScriptCanvasModule):
* inspector/InspectorCanvasAgent.h:
* inspector/InspectorCanvasInstrumentation.h:
(WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
(WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
* inspector/InspectorClient.cpp:
* inspector/InspectorClient.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
(WebCore::InspectorConsoleAgent::didCreateFrontendAndBackend):
(WebCore::InspectableHeapObject::get):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorController.cpp:
* inspector/InspectorController.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::InspectorDOMAgent):
(WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
(WebCore::InspectorDOMAgent::getDocument):
(WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
(WebCore::InspectorDOMAgent::querySelectorAll):
(WebCore::InspectorDOMAgent::pushNodePathToFrontend):
(WebCore::InspectorDOMAgent::getEventListenersForNode):
(WebCore::InspectorDOMAgent::getSearchResults):
(WebCore::InspectorDOMAgent::resolveNode):
(WebCore::InspectorDOMAgent::getAttributes):
(WebCore::InspectorDOMAgent::buildObjectForNode):
(WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
(WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
(WebCore::InspectorDOMAgent::didCommitLoad):
(WebCore::InspectorDOMAgent::didInsertDOMNode):
(WebCore::InspectorDOMAgent::styleAttributeInvalidated):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
(WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend):
(WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
(WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend):
(WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
(WebCore::InspectorDOMStorageAgent::storageId):
(WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
(WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend):
(WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDatabaseResource.cpp:
(WebCore::InspectorDatabaseResource::bind):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
(WebCore::InspectorDebuggerAgent::didCreateFrontendAndBackend):
(WebCore::breakpointActionTypeForString):
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::setBreakpoint):
(WebCore::InspectorDebuggerAgent::resolveBreakpoint):
(WebCore::scriptToInspectorObject):
(WebCore::InspectorDebuggerAgent::searchInContent):
(WebCore::InspectorDebuggerAgent::setScriptSource):
(WebCore::InspectorDebuggerAgent::getFunctionDetails):
(WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
(WebCore::InspectorDebuggerAgent::compileScript):
(WebCore::InspectorDebuggerAgent::runScript):
(WebCore::InspectorDebuggerAgent::currentCallFrames):
(WebCore::InspectorDebuggerAgent::didParseSource):
(WebCore::InspectorDebuggerAgent::didPause):
(WebCore::InspectorDebuggerAgent::didContinue):
(WebCore::InspectorDebuggerAgent::clear):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorForwarding.h:
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::evaluateAsBoolean):
* inspector/InspectorFrontendHost.cpp:
(WebCore::FrontendMenuProvider::create):
(WebCore::FrontendMenuProvider::disconnect):
(WebCore::FrontendMenuProvider::FrontendMenuProvider):
(WebCore::FrontendMenuProvider::contextMenuItemSelected):
(WebCore::FrontendMenuProvider::contextMenuCleared):
(WebCore::InspectorFrontendHost::showContextMenu):
* inspector/InspectorHeapProfilerAgent.cpp:
(WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
(WebCore::InspectorHeapProfilerAgent::didCreateFrontendAndBackend):
(WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
(WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
(WebCore::InspectorHeapProfilerAgent::getObjectByHeapObjectId):
(WebCore::InspectorHeapProfilerAgent::getHeapObjectId):
* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent):
(WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend):
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorInputAgent.cpp:
(WebCore::InspectorInputAgent::InspectorInputAgent):
(WebCore::InspectorInputAgent::didCreateFrontendAndBackend):
* inspector/InspectorInputAgent.h:
* inspector/InspectorInstrumentation.cpp:
* inspector/InspectorInstrumentation.h:
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
(WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend):
(WebCore::InspectorLayerTreeAgent::layersForNode):
(WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
(WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
(WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
(WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::didCreateFrontendAndBackend):
(WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorOverlay.cpp:
* inspector/InspectorOverlay.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::resourceTypeJson):
(WebCore::InspectorPageAgent::cachedResourceTypeJson):
(WebCore::InspectorPageAgent::InspectorPageAgent):
(WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
(WebCore::buildObjectForCookie):
(WebCore::buildArrayForCookies):
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::getResourceTree):
(WebCore::InspectorPageAgent::searchInResource):
(WebCore::buildObjectForSearchResult):
(WebCore::InspectorPageAgent::searchInResources):
(WebCore::InspectorPageAgent::buildObjectForFrame):
(WebCore::InspectorPageAgent::buildObjectForFrameTree):
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
(WebCore::InspectorProfilerAgent::createProfileHeader):
(WebCore::InspectorProfilerAgent::createSnapshotHeader):
(WebCore::InspectorProfilerAgent::getProfileHeaders):
(WebCore::InspectorProfilerAgent::getCPUProfile):
(WebCore::InspectorProfilerAgent::didCreateFrontendAndBackend):
(WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
(WebCore::InspectorProfilerAgent::getHeapObjectId):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didCreateFrontendAndBackend):
(WebCore::buildObjectForTiming):
(WebCore::buildObjectForResourceRequest):
(WebCore::buildObjectForResourceResponse):
(WebCore::buildObjectForCachedResource):
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::didReceiveResponse):
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
(WebCore::InspectorResourceAgent::buildInitiatorObject):
(WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
(WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
(WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
(WebCore::InspectorResourceAgent::didSendWebSocketFrame):
(WebCore::InspectorResourceAgent::InspectorResourceAgent):
* inspector/InspectorResourceAgent.h:
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
(WebCore::buildErrorRangeObject):
(WebCore::InspectorRuntimeAgent::parse):
(WebCore::InspectorRuntimeAgent::evaluate):
(WebCore::InspectorRuntimeAgent::callFunctionOn):
(WebCore::InspectorRuntimeAgent::getProperties):
* inspector/InspectorRuntimeAgent.h:
* inspector/InspectorStyleSheet.cpp:
(WebCore::buildSourceRangeObject):
(WebCore::buildMediaObject):
(WebCore::fillMediaListChain):
(WebCore::InspectorStyle::buildObjectForStyle):
(WebCore::InspectorStyle::buildArrayForComputedStyle):
(WebCore::InspectorStyle::styleWithProperties):
(WebCore::InspectorStyleSheet::create):
(WebCore::InspectorStyleSheet::InspectorStyleSheet):
(WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
(WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
(WebCore::selectorsFromSource):
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::InspectorStyleSheet::buildObjectForStyle):
(WebCore::InspectorStyleSheet::resourceStyleSheetText):
(WebCore::InspectorStyleSheet::buildArrayForRuleList):
(WebCore::InspectorStyleSheetForInlineStyle::create):
(WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
* inspector/InspectorStyleSheet.h:
(WebCore::InspectorCSSId::InspectorCSSId):
(WebCore::InspectorStyleSheet::canBind):
* inspector/InspectorStyleTextEditor.cpp:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
(WebCore::toProtocol):
(WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
(WebCore::InspectorTimelineAgent::setDOMCounters):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
(WebCore::InspectorTimelineAgent::sendEvent):
* inspector/InspectorTimelineAgent.h:
(WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
* inspector/InspectorWebAgentBase.h: Renamed from Source/WebCore/inspector/InspectorAgentRegistry.h.
(WebCore::InspectorAgentBase::InspectorAgentBase):
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
(WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
* inspector/InspectorWorkerAgent.h:
* inspector/InstrumentingAgents.cpp:
* inspector/NetworkResourcesData.cpp:
* inspector/PageConsoleAgent.cpp:
(WebCore::InspectableNode::get):
* inspector/PageDebuggerAgent.cpp:
* inspector/PageDebuggerAgent.h:
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::didCreateFrontendAndBackend):
* inspector/PageRuntimeAgent.h:
* inspector/ScriptArguments.cpp:
(WebCore::ScriptArguments::create):
(WebCore::ScriptArguments::ScriptArguments):
(WebCore::ScriptArguments::argumentAt):
(WebCore::ScriptArguments::getFirstArgumentAsString):
* inspector/ScriptArguments.h:
* inspector/ScriptCallFrame.cpp:
(WebCore::ScriptCallFrame::buildInspectorObject):
* inspector/ScriptCallFrame.h:
* inspector/ScriptCallStack.cpp:
(WebCore::ScriptCallStack::buildInspectorArray):
* inspector/ScriptCallStack.h:
* inspector/ScriptDebugListener.h:
* inspector/TimelineRecordFactory.cpp:
* inspector/TimelineRecordFactory.h:
(WebCore::TimelineRecordFactory::createWebSocketCreateData):
(WebCore::TimelineRecordFactory::createGenericWebSocketData):
* inspector/WorkerConsoleAgent.cpp:
* inspector/WorkerDebuggerAgent.cpp:
* inspector/WorkerInspectorController.cpp:
* inspector/WorkerInspectorController.h:
* inspector/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend):
* inspector/WorkerRuntimeAgent.h:
* page/Console.cpp:
* page/ContentSecurityPolicy.cpp:
* page/Frame.cpp:
* page/PageConsole.cpp:
* plugins/PluginView.cpp:
(WebCore::PluginView::performRequest):
* testing/Internals.cpp:
(WebCore::Internals::parserMetaData):
* testing/Internals.h:
* workers/SharedWorkerGlobalScope.cpp:
(WebCore::createConnectEvent):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::importScripts):
* workers/WorkerThread.cpp:
* xml/XMLTreeViewer.cpp:
* xml/parser/XMLDocumentParser.cpp:
* xml/parser/XMLDocumentParserLibxml2.cpp:

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/blackberry:

* Api/WebPage.cpp:

Source/WebKit/efl:

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
* ewk/ewk_frame.cpp:

Source/WebKit/gtk:

* webkit/webkitwebview.cpp:

Source/WebKit/mac:

* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
* WebCoreSupport/WebInspectorClient.mm:
* WebView/WebFrame.mm:
* WebView/WebView.mm:

Source/WebKit/win:

* WebFrame.cpp:
* WebView.cpp:

Source/WebKit2:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performJavaScriptURLRequest):
* WebProcess/WebPage/WebInspector.cpp:
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebPage.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/inspector/CodeGeneratorInspector.py b/Source/WebCore/inspector/CodeGeneratorInspector.py
index a995530..a1db1b7 100755
--- a/Source/WebCore/inspector/CodeGeneratorInspector.py
+++ b/Source/WebCore/inspector/CodeGeneratorInspector.py
@@ -262,7 +262,7 @@
 
         @classmethod
         def get_raw_validator_call_text(cls):
-            return "RuntimeCastHelper::assertType<InspectorValue::Type%s>" % cls.get_validate_method_params().template_type
+            return "RuntimeCastHelper::assertType<Inspector::InspectorValue::Type%s>" % cls.get_validate_method_params().template_type
 
     class String(BaseType):
         @staticmethod
@@ -451,7 +451,7 @@
 
         @staticmethod
         def get_array_item_raw_c_type_text():
-            return "InspectorObject"
+            return "Inspector::InspectorObject"
 
         @staticmethod
         def get_raw_type_model():
@@ -486,7 +486,7 @@
 
         @staticmethod
         def get_array_item_raw_c_type_text():
-            return "InspectorValue"
+            return "Inspector::InspectorValue"
 
         @staticmethod
         def get_raw_type_model():
@@ -529,7 +529,7 @@
 
         @staticmethod
         def get_array_item_raw_c_type_text():
-            return "InspectorArray"
+            return "Inspector::InspectorArray"
 
         @staticmethod
         def get_raw_type_model():
@@ -590,7 +590,7 @@
             self.var_type = var_type
 
         def get_return_var_type(self):
-            return "TypeBuilder::OptOutput<%s>" % self.var_type
+            return "Inspector::TypeBuilder::OptOutput<%s>" % self.var_type
 
         @staticmethod
         def get_output_argument_prefix():
@@ -601,7 +601,7 @@
             return "%s.getValue()"
 
         def get_output_parameter_type(self):
-            return "TypeBuilder::OptOutput<%s>*" % self.var_type
+            return "Inspector::TypeBuilder::OptOutput<%s>*" % self.var_type
 
         @staticmethod
         def get_set_return_condition():
@@ -712,10 +712,10 @@
             TypeModel.ValueType.__init__(self, "int", False)
 
         def get_input_param_type_text(self):
-            return "TypeBuilder::ExactlyInt"
+            return "Inspector::TypeBuilder::ExactlyInt"
 
         def get_opt_output_type_(self):
-            return "TypeBuilder::ExactlyInt"
+            return "Inspector::TypeBuilder::ExactlyInt"
 
     @classmethod
     def init_class(cls):
@@ -726,9 +726,9 @@
             cls.Int = cls.ValueType("int", False)
         cls.Number = cls.ValueType("double", False)
         cls.String = cls.ValueType("String", True,)
-        cls.Object = cls.RefPtrBased("InspectorObject")
-        cls.Array = cls.RefPtrBased("InspectorArray")
-        cls.Any = cls.RefPtrBased("InspectorValue")
+        cls.Object = cls.RefPtrBased("Inspector::InspectorObject")
+        cls.Array = cls.RefPtrBased("Inspector::InspectorArray")
+        cls.Any = cls.RefPtrBased("Inspector::InspectorValue")
 
 TypeModel.init_class()
 
@@ -837,8 +837,8 @@
 
         class Helper:
             is_ad_hoc = False
-            full_name_prefix_for_use = "TypeBuilder::" + context_domain_name + "::"
-            full_name_prefix_for_impl = "TypeBuilder::" + context_domain_name + "::"
+            full_name_prefix_for_use = "Inspector::TypeBuilder::" + context_domain_name + "::"
+            full_name_prefix_for_impl = "Inspector::TypeBuilder::" + context_domain_name + "::"
 
             @staticmethod
             def write_doc(writer):
@@ -928,7 +928,7 @@
 
                                 if enum_binding_cls.need_internal_runtime_cast_:
                                     writer.append("#if %s\n" % VALIDATOR_IFDEF_NAME)
-                                    writer.newline("    static void assertCorrectValue(InspectorValue* value);\n")
+                                    writer.newline("    static void assertCorrectValue(Inspector::InspectorValue* value);\n")
                                     writer.append("#endif  // %s\n" % VALIDATOR_IFDEF_NAME)
 
                                     validator_writer = generate_context.validator_writer
@@ -938,7 +938,7 @@
                                     if domain_guard:
                                         domain_guard.generate_open(validator_writer)
 
-                                    validator_writer.newline("void %s%s::assertCorrectValue(InspectorValue* value)\n" % (helper.full_name_prefix_for_impl, enum_name))
+                                    validator_writer.newline("void %s%s::assertCorrectValue(Inspector::InspectorValue* value)\n" % (helper.full_name_prefix_for_impl, enum_name))
                                     validator_writer.newline("{\n")
                                     validator_writer.newline("    WTF::String s;\n")
                                     validator_writer.newline("    bool cast_res = value->asString(&s);\n")
@@ -980,7 +980,7 @@
 
                     @staticmethod
                     def get_setter_value_expression_pattern():
-                        return "TypeBuilder::getEnumConstantValue(%s)"
+                        return "Inspector::TypeBuilder::getEnumConstantValue(%s)"
 
                     @staticmethod
                     def reduce_to_raw_type():
@@ -1172,9 +1172,9 @@
                                 writer.append(class_name)
                                 writer.append(" : public ")
                                 if is_open_type:
-                                    writer.append("InspectorObject")
+                                    writer.append("Inspector::InspectorObject")
                                 else:
-                                    writer.append("InspectorObjectBase")
+                                    writer.append("Inspector::InspectorObjectBase")
                                 writer.append(" {\n")
                                 writer.newline("public:\n")
                                 ad_hoc_type_writer = writer.insert_writer("    ")
@@ -1234,7 +1234,7 @@
 
                                 writer.newline_multiline(CodeGeneratorInspectorStrings.class_binding_builder_part_4)
 
-                                writer.newline("    typedef TypeBuilder::StructItemTraits ItemTraits;\n")
+                                writer.newline("    typedef Inspector::TypeBuilder::StructItemTraits ItemTraits;\n")
 
                                 for prop_data in resolve_data.optional_properties:
                                     prop_name = prop_data.p["name"]
@@ -1251,25 +1251,25 @@
 
 
                                     if setter_name in INSPECTOR_OBJECT_SETTER_NAMES:
-                                        writer.newline("    using InspectorObjectBase::%s;\n\n" % setter_name)
+                                        writer.newline("    using Inspector::InspectorObjectBase::%s;\n\n" % setter_name)
 
                                 if class_binding_cls.need_user_runtime_cast_:
-                                    writer.newline("    static PassRefPtr<%s> runtimeCast(PassRefPtr<InspectorValue> value)\n" % class_name)
+                                    writer.newline("    static PassRefPtr<%s> runtimeCast(PassRefPtr<Inspector::InspectorValue> value)\n" % class_name)
                                     writer.newline("    {\n")
-                                    writer.newline("        RefPtr<InspectorObject> object;\n")
+                                    writer.newline("        RefPtr<Inspector::InspectorObject> object;\n")
                                     writer.newline("        bool castRes = value->asObject(&object);\n")
                                     writer.newline("        ASSERT_UNUSED(castRes, castRes);\n")
                                     writer.append("#if %s\n" % VALIDATOR_IFDEF_NAME)
                                     writer.newline("        assertCorrectValue(object.get());\n")
                                     writer.append("#endif  // %s\n" % VALIDATOR_IFDEF_NAME)
-                                    writer.newline("        COMPILE_ASSERT(sizeof(%s) == sizeof(InspectorObjectBase), type_cast_problem);\n" % class_name)
-                                    writer.newline("        return static_cast<%s*>(static_cast<InspectorObjectBase*>(object.get()));\n" % class_name)
+                                    writer.newline("        COMPILE_ASSERT(sizeof(%s) == sizeof(Inspector::InspectorObjectBase), type_cast_problem);\n" % class_name)
+                                    writer.newline("        return static_cast<%s*>(static_cast<Inspector::InspectorObjectBase*>(object.get()));\n" % class_name)
                                     writer.newline("    }\n")
                                     writer.append("\n")
 
                                 if class_binding_cls.need_internal_runtime_cast_:
                                     writer.append("#if %s\n" % VALIDATOR_IFDEF_NAME)
-                                    writer.newline("    static void assertCorrectValue(InspectorValue* value);\n")
+                                    writer.newline("    static void assertCorrectValue(Inspector::InspectorValue* value);\n")
                                     writer.append("#endif  // %s\n" % VALIDATOR_IFDEF_NAME)
 
                                     closed_field_set = (context_domain_name + "." + class_name) not in TYPES_WITH_OPEN_FIELD_LIST_SET
@@ -1281,7 +1281,7 @@
                                     if domain_guard:
                                         domain_guard.generate_open(validator_writer)
 
-                                    validator_writer.newline("void %s%s::assertCorrectValue(InspectorValue* value)\n" % (helper.full_name_prefix_for_impl, class_name))
+                                    validator_writer.newline("void %s%s::assertCorrectValue(Inspector::InspectorValue* value)\n" % (helper.full_name_prefix_for_impl, class_name))
                                     validator_writer.newline("{\n")
                                     validator_writer.newline("    RefPtr<InspectorObject> object;\n")
                                     validator_writer.newline("    bool castRes = value->asObject(&object);\n")
@@ -1519,7 +1519,7 @@
 
                     @classmethod
                     def get_array_item_c_type_text(cls):
-                        return replace_right_shift("TypeBuilder::Array<%s>" % cls.resolve_data_.item_type_binding.get_array_item_c_type_text())
+                        return replace_right_shift("Inspector::TypeBuilder::Array<%s>" % cls.resolve_data_.item_type_binding.get_array_item_c_type_text())
 
                     @staticmethod
                     def get_setter_value_expression_pattern():
@@ -1900,10 +1900,10 @@
             dispatcher_name = "Inspector" + Capitalizer.lower_camel_case_to_upper(domain_name) + "BackendDispatcher"
             agent_interface_name = dispatcher_name + "Handler"
 
-            Generator.backend_dispatcher_interface_list.append("class %s FINAL : public InspectorSupplementalBackendDispatcher {\n" % dispatcher_name)
+            Generator.backend_dispatcher_interface_list.append("class %s FINAL : public Inspector::InspectorSupplementalBackendDispatcher {\n" % dispatcher_name)
             Generator.backend_dispatcher_interface_list.append("public:\n")
-            Generator.backend_dispatcher_interface_list.append("    static PassRefPtr<%s> create(InspectorBackendDispatcher*, %s*);\n" % (dispatcher_name, agent_interface_name))
-            Generator.backend_dispatcher_interface_list.append("    virtual void dispatch(long callId, const String& method, PassRefPtr<InspectorObject> message) OVERRIDE;\n")
+            Generator.backend_dispatcher_interface_list.append("    static PassRefPtr<%s> create(Inspector::InspectorBackendDispatcher*, %s*);\n" % (dispatcher_name, agent_interface_name))
+            Generator.backend_dispatcher_interface_list.append("    virtual void dispatch(long callId, const String& method, PassRefPtr<Inspector::InspectorObject> message) OVERRIDE;\n")
             Generator.backend_dispatcher_interface_list.append("private:\n")
 
             Generator.backend_handler_interface_list.append("class %s {\n" % agent_interface_name)
@@ -1922,7 +1922,7 @@
             Generator.backend_handler_interface_list.append("};\n\n")
 
             Generator.backend_dispatcher_interface_list.append("private:\n")
-            Generator.backend_dispatcher_interface_list.append("    %s(InspectorBackendDispatcher*, %s*);\n" % (dispatcher_name, agent_interface_name))
+            Generator.backend_dispatcher_interface_list.append("    %s(Inspector::InspectorBackendDispatcher*, %s*);\n" % (dispatcher_name, agent_interface_name))
             Generator.backend_dispatcher_interface_list.append("    %s* m_agent;\n" % agent_interface_name)
             Generator.backend_dispatcher_interface_list.append("};\n\n")
 
@@ -2003,7 +2003,7 @@
         Generator.backend_handler_interface_list.append(ad_hoc_type_output)
         ad_hoc_type_writer = Writer(ad_hoc_type_output, "    ")
 
-        Generator.backend_dispatcher_interface_list.append("    void %s(long callId, const InspectorObject& message);\n" % json_command_name)
+        Generator.backend_dispatcher_interface_list.append("    void %s(long callId, const Inspector::InspectorObject& message);\n" % json_command_name)
 
         Generator.backend_handler_interface_list.append("    virtual void %s(ErrorString*" % json_command_name)
 
@@ -2098,9 +2098,9 @@
                                            Generator.backend_method_implementation_list, Templates.callback_method,
                                            {"callbackName": callback_name, "handlerName": agent_interface_name})
 
-            callback_writer.newline("class " + callback_name + " : public InspectorBackendDispatcher::CallbackBase {\n")
+            callback_writer.newline("class " + callback_name + " : public Inspector::InspectorBackendDispatcher::CallbackBase {\n")
             callback_writer.newline("public:\n")
-            callback_writer.newline("    " + callback_name + "(PassRefPtr<InspectorBackendDispatcher>, int id);\n")
+            callback_writer.newline("    " + callback_name + "(PassRefPtr<Inspector::InspectorBackendDispatcher>, int id);\n")
             callback_writer.newline("    void sendSuccess(" + ", ".join(decl_parameter_list) + ");\n")
             callback_writer.newline("};\n")
 
@@ -2109,7 +2109,7 @@
             method_dispatch_handling.append("    RefPtr<%s::%s> callback = adoptRef(new %s::%s(m_backendDispatcher,callId));\n" % (agent_interface_name, callback_name, agent_interface_name, callback_name))
             method_ending_handling.append("    if (error.length()) {\n")
             method_ending_handling.append("        callback->disable();\n")
-            method_ending_handling.append("        m_backendDispatcher->reportProtocolError(&callId, InspectorBackendDispatcher::ServerError, error);\n")
+            method_ending_handling.append("        m_backendDispatcher->reportProtocolError(&callId, Inspector::InspectorBackendDispatcher::ServerError, error);\n")
             method_ending_handling.append("        return;\n")
             method_ending_handling.append("    }")
 
@@ -2413,8 +2413,8 @@
 frontend_h_file = SmartOutput(output_header_dirname + "/InspectorFrontend.h")
 frontend_cpp_file = SmartOutput(output_cpp_dirname + "/InspectorFrontend.cpp")
 
-typebuilder_h_file = SmartOutput(output_header_dirname + "/InspectorTypeBuilder.h")
-typebuilder_cpp_file = SmartOutput(output_cpp_dirname + "/InspectorTypeBuilder.cpp")
+typebuilder_h_file = SmartOutput(output_header_dirname + "/InspectorWebTypeBuilders.h")
+typebuilder_cpp_file = SmartOutput(output_cpp_dirname + "/InspectorWebTypeBuilders.cpp")
 
 backend_js_file = SmartOutput(output_js_dirname + "/InspectorBackendCommands.js")
 
diff --git a/Source/WebCore/inspector/CodeGeneratorInspectorStrings.py b/Source/WebCore/inspector/CodeGeneratorInspectorStrings.py
index 7a518a8..01fe512 100644
--- a/Source/WebCore/inspector/CodeGeneratorInspectorStrings.py
+++ b/Source/WebCore/inspector/CodeGeneratorInspectorStrings.py
@@ -70,7 +70,7 @@
 {
     Ref<${dispatcherName}> protect(*this);
 
-    typedef void (${dispatcherName}::*CallHandler)(long callId, const InspectorObject& message);
+    typedef void (${dispatcherName}::*CallHandler)(long callId, const Inspector::InspectorObject& message);
     typedef HashMap<String, CallHandler> DispatchMap;
     DEFINE_STATIC_LOCAL(DispatchMap, dispatchMap, ());
     if (dispatchMap.isEmpty()) {
@@ -112,7 +112,7 @@
 """)
 
 callback_method = (
-"""${handlerName}::${callbackName}::${callbackName}(PassRefPtr<InspectorBackendDispatcher> backendDispatcher, int id) : InspectorBackendDispatcher::CallbackBase(backendDispatcher, id) { }
+"""${handlerName}::${callbackName}::${callbackName}(PassRefPtr<InspectorBackendDispatcher> backendDispatcher, int id) : Inspector::InspectorBackendDispatcher::CallbackBase(backendDispatcher, id) { }
 
 void ${handlerName}::${callbackName}::sendSuccess(${parameters})
 {
@@ -125,15 +125,14 @@
 """#ifndef InspectorFrontend_h
 #define InspectorFrontend_h
 
-#include "InspectorTypeBuilder.h"
-#include "InspectorValues.h"
+#include "InspectorWebTypeBuilders.h"
+#include "InspectorForwarding.h"
+#include <inspector/InspectorValues.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
 
-class InspectorFrontendChannel;
-
 #if ENABLE(INSPECTOR)
 
 $domainClassList
@@ -149,16 +148,13 @@
 """#ifndef InspectorBackendDispatchers_h
 #define InspectorBackendDispatchers_h
 
-#include "InspectorBackendDispatcher.h"
-#include "InspectorTypeBuilder.h"
+#include "InspectorWebTypeBuilders.h"
+#include <inspector/InspectorBackendDispatcher.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
 
-class InspectorObject;
-class InspectorArray;
-
 typedef String ErrorString;
 
 $handlerInterfaces
@@ -178,11 +174,13 @@
 #include "InspectorBackendDispatchers.h"
 
 #include "InspectorAgent.h"
-#include "InspectorValues.h"
 #include "InspectorForwarding.h"
+#include <inspector/InspectorValues.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 $methods
@@ -200,10 +198,11 @@
 
 #include "InspectorFrontend.h"
 
-#include "InspectorForwarding.h"
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 $methods
@@ -215,291 +214,20 @@
 
 typebuilder_h = (
 """
-#ifndef InspectorTypeBuilder_h
-#define InspectorTypeBuilder_h
+// FIXME: TYPE.
+#ifndef InspectorWebTypeBuilders_h
+#define InspectorWebTypeBuilders_h
 
 #if ENABLE(INSPECTOR)
 
-#include "InspectorValues.h"
+#include <inspector/InspectorTypeBuilder.h>
 #include <wtf/Assertions.h>
 #include <wtf/PassRefPtr.h>
 
-namespace WebCore {
+namespace Inspector {
 
 namespace TypeBuilder {
 
-template<typename T>
-class OptOutput {
-public:
-    OptOutput() : m_assigned(false) { }
-
-    void operator=(T value)
-    {
-        m_value = value;
-        m_assigned = true;
-    }
-
-    bool isAssigned() { return m_assigned; }
-
-    T getValue()
-    {
-        ASSERT(isAssigned());
-        return m_value;
-    }
-
-private:
-    T m_value;
-    bool m_assigned;
-
-    WTF_MAKE_NONCOPYABLE(OptOutput);
-};
-
-
-// A small transient wrapper around int type, that can be used as a funciton parameter type
-// cleverly disallowing C++ implicit casts from float or double.
-class ExactlyInt {
-public:
-    template<typename T>
-    ExactlyInt(T t) : m_value(cast_to_int<T>(t)) {}
-
-    ExactlyInt() {}
-
-    operator int() { return m_value; }
-private:
-    int m_value;
-
-    template<typename T>
-    static int cast_to_int(T) { return T::default_case_cast_is_not_supported(); }
-};
-
-template<>
-inline int ExactlyInt::cast_to_int<int>(int i) { return i; }
-
-template<>
-inline int ExactlyInt::cast_to_int<unsigned int>(unsigned int i) { return i; }
-
-class RuntimeCastHelper {
-public:
-#if $validatorIfdefName
-    template<InspectorValue::Type TYPE>
-    static void assertType(InspectorValue* value)
-    {
-        ASSERT(value->type() == TYPE);
-    }
-    static void assertAny(InspectorValue*);
-    static void assertInt(InspectorValue* value);
-#endif
-};
-
-
-// This class provides "Traits" type for the input type T. It is programmed using C++ template specialization
-// technique. By default it simply takes "ItemTraits" type from T, but it doesn't work with the base types.
-template<typename T>
-struct ArrayItemHelper {
-    typedef typename T::ItemTraits Traits;
-};
-
-template<typename T>
-class Array : public InspectorArrayBase {
-private:
-    Array() { }
-
-    InspectorArray* openAccessors() {
-        COMPILE_ASSERT(sizeof(InspectorArray) == sizeof(Array<T>), cannot_cast);
-        return static_cast<InspectorArray*>(static_cast<InspectorArrayBase*>(this));
-    }
-
-public:
-    void addItem(PassRefPtr<T> value)
-    {
-        ArrayItemHelper<T>::Traits::pushRefPtr(this->openAccessors(), value);
-    }
-
-    void addItem(T value)
-    {
-        ArrayItemHelper<T>::Traits::pushRaw(this->openAccessors(), value);
-    }
-
-    static PassRefPtr<Array<T>> create()
-    {
-        return adoptRef(new Array<T>());
-    }
-
-    static PassRefPtr<Array<T>> runtimeCast(PassRefPtr<InspectorValue> value)
-    {
-        RefPtr<InspectorArray> array;
-        bool castRes = value->asArray(&array);
-        ASSERT_UNUSED(castRes, castRes);
-#if $validatorIfdefName
-        assertCorrectValue(array.get());
-#endif  // $validatorIfdefName
-        COMPILE_ASSERT(sizeof(Array<T>) == sizeof(InspectorArray), type_cast_problem);
-        return static_cast<Array<T>*>(static_cast<InspectorArrayBase*>(array.get()));
-    }
-
-#if $validatorIfdefName
-    static void assertCorrectValue(InspectorValue* value)
-    {
-        RefPtr<InspectorArray> array;
-        bool castRes = value->asArray(&array);
-        ASSERT_UNUSED(castRes, castRes);
-        for (unsigned i = 0; i < array->length(); i++)
-            ArrayItemHelper<T>::Traits::template assertCorrectValue<T>(array->get(i).get());
-    }
-
-#endif // $validatorIfdefName
-};
-
-struct StructItemTraits {
-    static void pushRefPtr(InspectorArray* array, PassRefPtr<InspectorValue> value)
-    {
-        array->pushValue(value);
-    }
-
-#if $validatorIfdefName
-    template<typename T>
-    static void assertCorrectValue(InspectorValue* value) {
-        T::assertCorrectValue(value);
-    }
-#endif  // $validatorIfdefName
-};
-
-template<>
-struct ArrayItemHelper<String> {
-    struct Traits {
-        static void pushRaw(InspectorArray* array, const String& value)
-        {
-            array->pushString(value);
-        }
-
-#if $validatorIfdefName
-        template<typename T>
-        static void assertCorrectValue(InspectorValue* value) {
-            RuntimeCastHelper::assertType<InspectorValue::TypeString>(value);
-        }
-#endif  // $validatorIfdefName
-    };
-};
-
-template<>
-struct ArrayItemHelper<int> {
-    struct Traits {
-        static void pushRaw(InspectorArray* array, int value)
-        {
-            array->pushInt(value);
-        }
-
-#if $validatorIfdefName
-        template<typename T>
-        static void assertCorrectValue(InspectorValue* value) {
-            RuntimeCastHelper::assertInt(value);
-        }
-#endif  // $validatorIfdefName
-    };
-};
-
-template<>
-struct ArrayItemHelper<double> {
-    struct Traits {
-        static void pushRaw(InspectorArray* array, double value)
-        {
-            array->pushNumber(value);
-        }
-
-#if $validatorIfdefName
-        template<typename T>
-        static void assertCorrectValue(InspectorValue* value) {
-            RuntimeCastHelper::assertType<InspectorValue::TypeNumber>(value);
-        }
-#endif  // $validatorIfdefName
-    };
-};
-
-template<>
-struct ArrayItemHelper<bool> {
-    struct Traits {
-        static void pushRaw(InspectorArray* array, bool value)
-        {
-            array->pushBoolean(value);
-        }
-
-#if $validatorIfdefName
-        template<typename T>
-        static void assertCorrectValue(InspectorValue* value) {
-            RuntimeCastHelper::assertType<InspectorValue::TypeBoolean>(value);
-        }
-#endif  // $validatorIfdefName
-    };
-};
-
-template<>
-struct ArrayItemHelper<InspectorValue> {
-    struct Traits {
-        static void pushRefPtr(InspectorArray* array, PassRefPtr<InspectorValue> value)
-        {
-            array->pushValue(value);
-        }
-
-#if $validatorIfdefName
-        template<typename T>
-        static void assertCorrectValue(InspectorValue* value) {
-            RuntimeCastHelper::assertAny(value);
-        }
-#endif  // $validatorIfdefName
-    };
-};
-
-template<>
-struct ArrayItemHelper<InspectorObject> {
-    struct Traits {
-        static void pushRefPtr(InspectorArray* array, PassRefPtr<InspectorValue> value)
-        {
-            array->pushValue(value);
-        }
-
-#if $validatorIfdefName
-        template<typename T>
-        static void assertCorrectValue(InspectorValue* value) {
-            RuntimeCastHelper::assertType<InspectorValue::TypeObject>(value);
-        }
-#endif  // $validatorIfdefName
-    };
-};
-
-template<>
-struct ArrayItemHelper<InspectorArray> {
-    struct Traits {
-        static void pushRefPtr(InspectorArray* array, PassRefPtr<InspectorArray> value)
-        {
-            array->pushArray(value);
-        }
-
-#if $validatorIfdefName
-        template<typename T>
-        static void assertCorrectValue(InspectorValue* value) {
-            RuntimeCastHelper::assertType<InspectorValue::TypeArray>(value);
-        }
-#endif  // $validatorIfdefName
-    };
-};
-
-template<typename T>
-struct ArrayItemHelper<TypeBuilder::Array<T>> {
-    struct Traits {
-        static void pushRefPtr(InspectorArray* array, PassRefPtr<TypeBuilder::Array<T>> value)
-        {
-            array->pushValue(value);
-        }
-
-#if $validatorIfdefName
-        template<typename S>
-        static void assertCorrectValue(InspectorValue* value) {
-            S::assertCorrectValue(value);
-        }
-#endif  // $validatorIfdefName
-    };
-};
-
 ${forwards}
 
 String getEnumConstantValue(int code);
@@ -507,12 +235,11 @@
 ${typeBuilders}
 } // namespace TypeBuilder
 
-
-} // namespace WebCore
+} // namespace Inspector
 
 #endif // ENABLE(INSPECTOR)
 
-#endif // !defined(InspectorTypeBuilder_h)
+#endif // !defined(InspectorWebTypeBuilders_h)
 
 """)
 
@@ -522,10 +249,12 @@
 #include "config.h"
 #if ENABLE(INSPECTOR)
 
-#include "InspectorTypeBuilder.h"
+#include "InspectorWebTypeBuilders.h"
 #include <wtf/text/CString.h>
 
-namespace WebCore {
+using namespace Inspector;
+
+namespace Inspector {
 
 namespace TypeBuilder {
 
@@ -542,25 +271,11 @@
 
 #if $validatorIfdefName
 
-void TypeBuilder::RuntimeCastHelper::assertAny(InspectorValue*)
-{
-    // No-op.
-}
-
-
-void TypeBuilder::RuntimeCastHelper::assertInt(InspectorValue* value)
-{
-    double v;
-    bool castRes = value->asNumber(&v);
-    ASSERT_UNUSED(castRes, castRes);
-    ASSERT(static_cast<double>(static_cast<int>(v)) == v);
-}
-
 $validatorCode
 
 #endif // $validatorIfdefName
 
-} // namespace WebCore
+} // namespace Inspector
 
 #endif // ENABLE(INSPECTOR)
 """)
@@ -584,14 +299,14 @@
     template<int STATE>
     class Builder {
     private:
-        RefPtr<InspectorObject> m_result;
+        RefPtr<Inspector::InspectorObject> m_result;
 
         template<int STEP> Builder<STATE | STEP>& castState()
         {
             return *reinterpret_cast<Builder<STATE | STEP>*>(this);
         }
 
-        Builder(PassRefPtr</*%s*/InspectorObject> ptr)
+        Builder(PassRefPtr</*%s*/Inspector::InspectorObject> ptr)
         {
             COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
             m_result = ptr;
@@ -613,7 +328,7 @@
         operator RefPtr<%s>& ()
         {
             COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
-            COMPILE_ASSERT(sizeof(%s) == sizeof(InspectorObject), cannot_cast);
+            COMPILE_ASSERT(sizeof(%s) == sizeof(Inspector::InspectorObject), cannot_cast);
             return *reinterpret_cast<RefPtr<%s>*>(&m_result);
         }
 
@@ -628,6 +343,6 @@
 class_binding_builder_part_4 = (
 """    static Builder<NoFieldsSet> create()
     {
-        return Builder<NoFieldsSet>(InspectorObject::create());
+        return Builder<NoFieldsSet>(Inspector::InspectorObject::create());
     }
 """)
diff --git a/Source/WebCore/inspector/ConsoleMessage.cpp b/Source/WebCore/inspector/ConsoleMessage.cpp
index 0c970b8..6fb85d0 100644
--- a/Source/WebCore/inspector/ConsoleMessage.cpp
+++ b/Source/WebCore/inspector/ConsoleMessage.cpp
@@ -38,14 +38,16 @@
 #include "IdentifiersFactory.h"
 #include "InjectedScript.h"
 #include "InjectedScriptManager.h"
-#include "InspectorValues.h"
 #include "ScriptArguments.h"
 #include "ScriptCallFrame.h"
 #include "ScriptCallStack.h"
 #include "ScriptCallStackFactory.h"
-#include "ScriptValue.h"
+#include <bindings/ScriptValue.h>
+#include <inspector/InspectorValues.h>
 #include <wtf/MainThread.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 ConsoleMessage::ConsoleMessage(bool canGenerateCallStack, MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned long requestIdentifier)
@@ -139,57 +141,57 @@
 }
 
 // Keep in sync with inspector/front-end/ConsoleView.js
-static TypeBuilder::Console::ConsoleMessage::Source::Enum messageSourceValue(MessageSource source)
+static Inspector::TypeBuilder::Console::ConsoleMessage::Source::Enum messageSourceValue(MessageSource source)
 {
     switch (source) {
-    case XMLMessageSource: return TypeBuilder::Console::ConsoleMessage::Source::XML;
-    case JSMessageSource: return TypeBuilder::Console::ConsoleMessage::Source::Javascript;
-    case NetworkMessageSource: return TypeBuilder::Console::ConsoleMessage::Source::Network;
-    case ConsoleAPIMessageSource: return TypeBuilder::Console::ConsoleMessage::Source::ConsoleAPI;
-    case StorageMessageSource: return TypeBuilder::Console::ConsoleMessage::Source::Storage;
-    case AppCacheMessageSource: return TypeBuilder::Console::ConsoleMessage::Source::Appcache;
-    case RenderingMessageSource: return TypeBuilder::Console::ConsoleMessage::Source::Rendering;
-    case CSSMessageSource: return TypeBuilder::Console::ConsoleMessage::Source::CSS;
-    case SecurityMessageSource: return TypeBuilder::Console::ConsoleMessage::Source::Security;
-    case OtherMessageSource: return TypeBuilder::Console::ConsoleMessage::Source::Other;
+    case XMLMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::XML;
+    case JSMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::Javascript;
+    case NetworkMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::Network;
+    case ConsoleAPIMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::ConsoleAPI;
+    case StorageMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::Storage;
+    case AppCacheMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::Appcache;
+    case RenderingMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::Rendering;
+    case CSSMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::CSS;
+    case SecurityMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::Security;
+    case OtherMessageSource: return Inspector::TypeBuilder::Console::ConsoleMessage::Source::Other;
     }
-    return TypeBuilder::Console::ConsoleMessage::Source::Other;
+    return Inspector::TypeBuilder::Console::ConsoleMessage::Source::Other;
 }
 
-static TypeBuilder::Console::ConsoleMessage::Type::Enum messageTypeValue(MessageType type)
+static Inspector::TypeBuilder::Console::ConsoleMessage::Type::Enum messageTypeValue(MessageType type)
 {
     switch (type) {
-    case LogMessageType: return TypeBuilder::Console::ConsoleMessage::Type::Log;
-    case ClearMessageType: return TypeBuilder::Console::ConsoleMessage::Type::Clear;
-    case DirMessageType: return TypeBuilder::Console::ConsoleMessage::Type::Dir;
-    case DirXMLMessageType: return TypeBuilder::Console::ConsoleMessage::Type::DirXML;
-    case TableMessageType: return TypeBuilder::Console::ConsoleMessage::Type::Table;
-    case TraceMessageType: return TypeBuilder::Console::ConsoleMessage::Type::Trace;
-    case StartGroupMessageType: return TypeBuilder::Console::ConsoleMessage::Type::StartGroup;
-    case StartGroupCollapsedMessageType: return TypeBuilder::Console::ConsoleMessage::Type::StartGroupCollapsed;
-    case EndGroupMessageType: return TypeBuilder::Console::ConsoleMessage::Type::EndGroup;
-    case AssertMessageType: return TypeBuilder::Console::ConsoleMessage::Type::Assert;
-    case TimingMessageType: return TypeBuilder::Console::ConsoleMessage::Type::Timing;
-    case ProfileMessageType: return TypeBuilder::Console::ConsoleMessage::Type::Profile;
-    case ProfileEndMessageType: return TypeBuilder::Console::ConsoleMessage::Type::ProfileEnd;
+    case LogMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Log;
+    case ClearMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Clear;
+    case DirMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Dir;
+    case DirXMLMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::DirXML;
+    case TableMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Table;
+    case TraceMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Trace;
+    case StartGroupMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::StartGroup;
+    case StartGroupCollapsedMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::StartGroupCollapsed;
+    case EndGroupMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::EndGroup;
+    case AssertMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Assert;
+    case TimingMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Timing;
+    case ProfileMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Profile;
+    case ProfileEndMessageType: return Inspector::TypeBuilder::Console::ConsoleMessage::Type::ProfileEnd;
     }
-    return TypeBuilder::Console::ConsoleMessage::Type::Log;
+    return Inspector::TypeBuilder::Console::ConsoleMessage::Type::Log;
 }
 
-static TypeBuilder::Console::ConsoleMessage::Level::Enum messageLevelValue(MessageLevel level)
+static Inspector::TypeBuilder::Console::ConsoleMessage::Level::Enum messageLevelValue(MessageLevel level)
 {
     switch (level) {
-    case DebugMessageLevel: return TypeBuilder::Console::ConsoleMessage::Level::Debug;
-    case LogMessageLevel: return TypeBuilder::Console::ConsoleMessage::Level::Log;
-    case WarningMessageLevel: return TypeBuilder::Console::ConsoleMessage::Level::Warning;
-    case ErrorMessageLevel: return TypeBuilder::Console::ConsoleMessage::Level::Error;
+    case DebugMessageLevel: return Inspector::TypeBuilder::Console::ConsoleMessage::Level::Debug;
+    case LogMessageLevel: return Inspector::TypeBuilder::Console::ConsoleMessage::Level::Log;
+    case WarningMessageLevel: return Inspector::TypeBuilder::Console::ConsoleMessage::Level::Warning;
+    case ErrorMessageLevel: return Inspector::TypeBuilder::Console::ConsoleMessage::Level::Error;
     }
-    return TypeBuilder::Console::ConsoleMessage::Level::Log;
+    return Inspector::TypeBuilder::Console::ConsoleMessage::Level::Log;
 }
 
 void ConsoleMessage::addToFrontend(InspectorConsoleFrontendDispatcher* consoleFrontendDispatcher, InjectedScriptManager* injectedScriptManager, bool generatePreview)
 {
-    RefPtr<TypeBuilder::Console::ConsoleMessage> jsonObj = TypeBuilder::Console::ConsoleMessage::create()
+    RefPtr<Inspector::TypeBuilder::Console::ConsoleMessage> jsonObj = Inspector::TypeBuilder::Console::ConsoleMessage::create()
         .setSource(messageSourceValue(m_source))
         .setLevel(messageLevelValue(m_level))
         .setText(m_message);
@@ -204,11 +206,11 @@
     if (m_arguments && m_arguments->argumentCount()) {
         InjectedScript injectedScript = injectedScriptManager->injectedScriptFor(m_arguments->globalState());
         if (!injectedScript.hasNoValue()) {
-            RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::RemoteObject>> jsonArgs = TypeBuilder::Array<TypeBuilder::Runtime::RemoteObject>::create();
+            RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::RemoteObject>> jsonArgs = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::RemoteObject>::create();
             if (m_type == TableMessageType && generatePreview && m_arguments->argumentCount()) {
-                ScriptValue table = m_arguments->argumentAt(0);
-                ScriptValue columns = m_arguments->argumentCount() > 1 ? m_arguments->argumentAt(1) : ScriptValue();
-                RefPtr<TypeBuilder::Runtime::RemoteObject> inspectorValue = injectedScript.wrapTable(table, columns);
+                Deprecated::ScriptValue table = m_arguments->argumentAt(0);
+                Deprecated::ScriptValue columns = m_arguments->argumentCount() > 1 ? m_arguments->argumentAt(1) : Deprecated::ScriptValue();
+                RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> inspectorValue = injectedScript.wrapTable(table, columns);
                 if (!inspectorValue) {
                     ASSERT_NOT_REACHED();
                     return;
@@ -216,7 +218,7 @@
                 jsonArgs->addItem(inspectorValue);
             } else {
                 for (unsigned i = 0; i < m_arguments->argumentCount(); ++i) {
-                    RefPtr<TypeBuilder::Runtime::RemoteObject> inspectorValue = injectedScript.wrapObject(m_arguments->argumentAt(i), "console", generatePreview);
+                    RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> inspectorValue = injectedScript.wrapObject(m_arguments->argumentAt(i), "console", generatePreview);
                     if (!inspectorValue) {
                         ASSERT_NOT_REACHED();
                         return;
diff --git a/Source/WebCore/inspector/ConsoleMessage.h b/Source/WebCore/inspector/ConsoleMessage.h
index 07f88b6..7fd16fc 100644
--- a/Source/WebCore/inspector/ConsoleMessage.h
+++ b/Source/WebCore/inspector/ConsoleMessage.h
@@ -38,15 +38,17 @@
 #include <wtf/Forward.h>
 #include <wtf/Vector.h>
 
+namespace Inspector {
+class InspectorObject;
+}
+
 namespace WebCore {
 
 class DOMWindow;
 class InjectedScriptManager;
-class InspectorObject;
 class ScriptArguments;
 class ScriptCallFrame;
 class ScriptCallStack;
-class ScriptValue;
 
 class ConsoleMessage {
     WTF_MAKE_NONCOPYABLE(ConsoleMessage); WTF_MAKE_FAST_ALLOCATED;
diff --git a/Source/WebCore/inspector/ContentSearchUtils.cpp b/Source/WebCore/inspector/ContentSearchUtils.cpp
index 03a805f..ea1a0e4 100644
--- a/Source/WebCore/inspector/ContentSearchUtils.cpp
+++ b/Source/WebCore/inspector/ContentSearchUtils.cpp
@@ -31,14 +31,14 @@
 #if ENABLE(INSPECTOR)
 
 #include "ContentSearchUtils.h"
-
-#include "InspectorValues.h"
 #include "RegularExpression.h"
-
+#include <inspector/InspectorValues.h>
 #include <wtf/BumpPointerAllocator.h>
 #include <wtf/StdLibExtras.h>
 #include <yarr/Yarr.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 namespace ContentSearchUtils {
 
@@ -120,9 +120,9 @@
     return result.release();
 }
 
-static PassRefPtr<TypeBuilder::Page::SearchMatch> buildObjectForSearchMatch(int lineNumber, const String& lineContent)
+static PassRefPtr<Inspector::TypeBuilder::Page::SearchMatch> buildObjectForSearchMatch(int lineNumber, const String& lineContent)
 {
-    return TypeBuilder::Page::SearchMatch::create()
+    return Inspector::TypeBuilder::Page::SearchMatch::create()
         .setLineNumber(lineNumber)
         .setLineContent(lineContent)
         .release();
@@ -153,9 +153,9 @@
     return result;
 }
 
-PassRefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch>> searchInTextByLines(const String& text, const String& query, const bool caseSensitive, const bool isRegex)
+PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::SearchMatch>> searchInTextByLines(const String& text, const String& query, const bool caseSensitive, const bool isRegex)
 {
-    RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch>> result = TypeBuilder::Array<TypeBuilder::Page::SearchMatch>::create();
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::SearchMatch>> result = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::SearchMatch>::create();
 
     RegularExpression regex = ContentSearchUtils::createSearchRegex(query, caseSensitive, isRegex);
     Vector<pair<int, String>> matches = getRegularExpressionMatchesByLines(regex, text);
diff --git a/Source/WebCore/inspector/ContentSearchUtils.h b/Source/WebCore/inspector/ContentSearchUtils.h
index 60ad678..311b620 100644
--- a/Source/WebCore/inspector/ContentSearchUtils.h
+++ b/Source/WebCore/inspector/ContentSearchUtils.h
@@ -31,21 +31,20 @@
 
 #if ENABLE(INSPECTOR)
 
-#include "InspectorTypeBuilder.h"
+#include "InspectorWebTypeBuilders.h"
 #include <wtf/Vector.h>
 #include <wtf/text/TextPosition.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
 
-class InspectorArray;
 class RegularExpression;
 
 namespace ContentSearchUtils {
 
 RegularExpression createSearchRegex(const String& query, bool caseSensitive, bool isRegex);
 int countRegularExpressionMatches(const RegularExpression&, const String&);
-PassRefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch>> searchInTextByLines(const String& text, const String& query, const bool caseSensitive, const bool isRegex);
+PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::SearchMatch>> searchInTextByLines(const String& text, const String& query, const bool caseSensitive, const bool isRegex);
 TextPosition textPositionFromOffset(size_t offset, const Vector<size_t>& lineEndings);
 PassOwnPtr<Vector<size_t>> lineEndings(const String&);
 
diff --git a/Source/WebCore/inspector/InjectedScript.cpp b/Source/WebCore/inspector/InjectedScript.cpp
index 77f780c..99ba9df 100644
--- a/Source/WebCore/inspector/InjectedScript.cpp
+++ b/Source/WebCore/inspector/InjectedScript.cpp
@@ -36,18 +36,21 @@
 
 #include "InjectedScriptHost.h"
 #include "InjectedScriptModule.h"
-#include "InspectorValues.h"
+#include "JSMainThreadExecState.h"
 #include "Node.h"
-#include "ScriptFunctionCall.h"
-#include "SerializedScriptValue.h"
+#include <bindings/ScriptFunctionCall.h>
+#include <bindings/ScriptObject.h>
+#include <inspector/InspectorValues.h>
 #include <wtf/text/WTFString.h>
 
-using WebCore::TypeBuilder::Array;
-using WebCore::TypeBuilder::Debugger::CallFrame;
-using WebCore::TypeBuilder::Runtime::PropertyDescriptor;
-using WebCore::TypeBuilder::Runtime::InternalPropertyDescriptor;
-using WebCore::TypeBuilder::Debugger::FunctionDetails;
-using WebCore::TypeBuilder::Runtime::RemoteObject;
+using Inspector::TypeBuilder::Array;
+using Inspector::TypeBuilder::Debugger::CallFrame;
+using Inspector::TypeBuilder::Debugger::FunctionDetails;
+using Inspector::TypeBuilder::Runtime::PropertyDescriptor;
+using Inspector::TypeBuilder::Runtime::InternalPropertyDescriptor;
+using Inspector::TypeBuilder::Runtime::RemoteObject;
+
+using namespace Inspector;
 
 namespace WebCore {
 
@@ -56,14 +59,14 @@
 {
 }
 
-InjectedScript::InjectedScript(ScriptObject injectedScriptObject, InspectedStateAccessCheck accessCheck)
+InjectedScript::InjectedScript(Deprecated::ScriptObject injectedScriptObject, InspectedStateAccessCheck accessCheck)
     : InjectedScriptBase("InjectedScript", injectedScriptObject, accessCheck)
 {
 }
 
-void InjectedScript::evaluate(ErrorString* errorString, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>* result, TypeBuilder::OptOutput<bool>* wasThrown)
+void InjectedScript::evaluate(ErrorString* errorString, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>* result, Inspector::TypeBuilder::OptOutput<bool>* wasThrown)
 {
-    ScriptFunctionCall function(injectedScriptObject(), "evaluate");
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "evaluate", WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(expression);
     function.appendArgument(objectGroup);
     function.appendArgument(includeCommandLineAPI);
@@ -72,9 +75,9 @@
     makeEvalCall(errorString, function, result, wasThrown);
 }
 
-void InjectedScript::callFunctionOn(ErrorString* errorString, const String& objectId, const String& expression, const String& arguments, bool returnByValue, bool generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>* result, TypeBuilder::OptOutput<bool>* wasThrown)
+void InjectedScript::callFunctionOn(ErrorString* errorString, const String& objectId, const String& expression, const String& arguments, bool returnByValue, bool generatePreview, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>* result, Inspector::TypeBuilder::OptOutput<bool>* wasThrown)
 {
-    ScriptFunctionCall function(injectedScriptObject(), "callFunctionOn");
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "callFunctionOn", WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(objectId);
     function.appendArgument(expression);
     function.appendArgument(arguments);
@@ -83,9 +86,9 @@
     makeEvalCall(errorString, function, result, wasThrown);
 }
 
-void InjectedScript::evaluateOnCallFrame(ErrorString* errorString, const ScriptValue& callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, RefPtr<RemoteObject>* result, TypeBuilder::OptOutput<bool>* wasThrown)
+void InjectedScript::evaluateOnCallFrame(ErrorString* errorString, const Deprecated::ScriptValue& callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, RefPtr<RemoteObject>* result, Inspector::TypeBuilder::OptOutput<bool>* wasThrown)
 {
-    ScriptFunctionCall function(injectedScriptObject(), "evaluateOnCallFrame");
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "evaluateOnCallFrame", WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(callFrames);
     function.appendArgument(callFrameId);
     function.appendArgument(expression);
@@ -98,7 +101,7 @@
 
 void InjectedScript::getFunctionDetails(ErrorString* errorString, const String& functionId, RefPtr<FunctionDetails>* result)
 {
-    ScriptFunctionCall function(injectedScriptObject(), "getFunctionDetails");
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "getFunctionDetails", WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(functionId);
     RefPtr<InspectorValue> resultValue;
     makeCall(function, &resultValue);
@@ -112,7 +115,7 @@
 
 void InjectedScript::getProperties(ErrorString* errorString, const String& objectId, bool ownProperties, RefPtr<Array<PropertyDescriptor>>* properties)
 {
-    ScriptFunctionCall function(injectedScriptObject(), "getProperties");
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "getProperties", WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(objectId);
     function.appendArgument(ownProperties);
 
@@ -127,7 +130,7 @@
 
 void InjectedScript::getInternalProperties(ErrorString* errorString, const String& objectId, RefPtr<Array<InternalPropertyDescriptor>>* properties)
 {
-    ScriptFunctionCall function(injectedScriptObject(), "getInternalProperties");
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "getInternalProperties", WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(objectId);
 
     RefPtr<InspectorValue> result;
@@ -146,11 +149,11 @@
     if (hasNoValue() || !canAccessInspectedWindow())
         return 0;
 
-    ScriptFunctionCall function(injectedScriptObject(), "nodeForObjectId");
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "nodeForObjectId", WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(objectId);
 
     bool hadException = false;
-    ScriptValue resultValue = callFunctionWithEvalEnabled(function, hadException);
+    Deprecated::ScriptValue resultValue = callFunctionWithEvalEnabled(function, hadException);
     ASSERT(!hadException);
 
     return InjectedScriptHost::scriptValueAsNode(resultValue);
@@ -158,20 +161,20 @@
 
 void InjectedScript::releaseObject(const String& objectId)
 {
-    ScriptFunctionCall function(injectedScriptObject(), "releaseObject");
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "releaseObject", WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(objectId);
     RefPtr<InspectorValue> result;
     makeCall(function, &result);
 }
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
-PassRefPtr<Array<CallFrame>> InjectedScript::wrapCallFrames(const ScriptValue& callFrames)
+PassRefPtr<Array<CallFrame>> InjectedScript::wrapCallFrames(const Deprecated::ScriptValue& callFrames)
 {
     ASSERT(!hasNoValue());
-    ScriptFunctionCall function(injectedScriptObject(), "wrapCallFrames");
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "wrapCallFrames", WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(callFrames);
     bool hadException = false;
-    ScriptValue callFramesValue = callFunctionWithEvalEnabled(function, hadException);
+    Deprecated::ScriptValue callFramesValue = callFunctionWithEvalEnabled(function, hadException);
     ASSERT(!hadException);
     RefPtr<InspectorValue> result = callFramesValue.toInspectorValue(scriptState());
     if (result->type() == InspectorValue::TypeArray)
@@ -180,26 +183,26 @@
 }
 #endif
 
-PassRefPtr<TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapObject(const ScriptValue& value, const String& groupName, bool generatePreview) const
+PassRefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapObject(const Deprecated::ScriptValue& value, const String& groupName, bool generatePreview) const
 {
     ASSERT(!hasNoValue());
-    ScriptFunctionCall wrapFunction(injectedScriptObject(), "wrapObject");
+    Deprecated::ScriptFunctionCall wrapFunction(injectedScriptObject(), "wrapObject");
     wrapFunction.appendArgument(value);
     wrapFunction.appendArgument(groupName);
     wrapFunction.appendArgument(canAccessInspectedWindow());
     wrapFunction.appendArgument(generatePreview);
     bool hadException = false;
-    ScriptValue r = callFunctionWithEvalEnabled(wrapFunction, hadException);
+    Deprecated::ScriptValue r = callFunctionWithEvalEnabled(wrapFunction, hadException);
     if (hadException)
         return 0;
     RefPtr<InspectorObject> rawResult = r.toInspectorValue(scriptState())->asObject();
-    return TypeBuilder::Runtime::RemoteObject::runtimeCast(rawResult);
+    return Inspector::TypeBuilder::Runtime::RemoteObject::runtimeCast(rawResult);
 }
 
-PassRefPtr<TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapTable(const ScriptValue& table, const ScriptValue& columns) const
+PassRefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapTable(const Deprecated::ScriptValue& table, const Deprecated::ScriptValue& columns) const
 {
     ASSERT(!hasNoValue());
-    ScriptFunctionCall wrapFunction(injectedScriptObject(), "wrapTable");
+    Deprecated::ScriptFunctionCall wrapFunction(injectedScriptObject(), "wrapTable");
     wrapFunction.appendArgument(canAccessInspectedWindow());
     wrapFunction.appendArgument(table);
     if (columns.hasNoValue())
@@ -207,26 +210,26 @@
     else
         wrapFunction.appendArgument(columns);
     bool hadException = false;
-    ScriptValue r = callFunctionWithEvalEnabled(wrapFunction, hadException);
+    Deprecated::ScriptValue r = callFunctionWithEvalEnabled(wrapFunction, hadException);
     if (hadException)
         return 0;
     RefPtr<InspectorObject> rawResult = r.toInspectorValue(scriptState())->asObject();
-    return TypeBuilder::Runtime::RemoteObject::runtimeCast(rawResult);
+    return Inspector::TypeBuilder::Runtime::RemoteObject::runtimeCast(rawResult);
 }
 
-PassRefPtr<TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapNode(Node* node, const String& groupName)
+PassRefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapNode(Node* node, const String& groupName)
 {
     return wrapObject(nodeAsScriptValue(node), groupName);
 }
 
-ScriptValue InjectedScript::findObjectById(const String& objectId) const
+Deprecated::ScriptValue InjectedScript::findObjectById(const String& objectId) const
 {
     ASSERT(!hasNoValue());
-    ScriptFunctionCall function(injectedScriptObject(), "findObjectById");
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "findObjectById", WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(objectId);
 
     bool hadException = false;
-    ScriptValue resultValue = callFunctionWithEvalEnabled(function, hadException);
+    Deprecated::ScriptValue resultValue = callFunctionWithEvalEnabled(function, hadException);
     ASSERT(!hadException);
     return resultValue;
 }
@@ -234,7 +237,7 @@
 void InjectedScript::inspectNode(Node* node)
 {
     ASSERT(!hasNoValue());
-    ScriptFunctionCall function(injectedScriptObject(), "inspectNode");
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "inspectNode", WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(nodeAsScriptValue(node));
     RefPtr<InspectorValue> result;
     makeCall(function, &result);
@@ -243,14 +246,14 @@
 void InjectedScript::releaseObjectGroup(const String& objectGroup)
 {
     ASSERT(!hasNoValue());
-    ScriptFunctionCall releaseFunction(injectedScriptObject(), "releaseObjectGroup");
+    Deprecated::ScriptFunctionCall releaseFunction(injectedScriptObject(), "releaseObjectGroup", WebCore::functionCallHandlerFromAnyThread);
     releaseFunction.appendArgument(objectGroup);
     bool hadException = false;
     callFunctionWithEvalEnabled(releaseFunction, hadException);
     ASSERT(!hadException);
 }
 
-ScriptValue InjectedScript::nodeAsScriptValue(Node* node)
+Deprecated::ScriptValue InjectedScript::nodeAsScriptValue(Node* node)
 {
     return InjectedScriptHost::nodeAsScriptValue(scriptState(), node);
 }
diff --git a/Source/WebCore/inspector/InjectedScript.h b/Source/WebCore/inspector/InjectedScript.h
index 9b6ad2f..fd9b9e5 100644
--- a/Source/WebCore/inspector/InjectedScript.h
+++ b/Source/WebCore/inspector/InjectedScript.h
@@ -33,19 +33,21 @@
 
 #include "InjectedScriptBase.h"
 #include "InjectedScriptManager.h"
-#include "InspectorTypeBuilder.h"
+#include "InspectorWebTypeBuilders.h"
 #include "ScriptArguments.h"
-#include "ScriptObject.h"
 #include <wtf/Forward.h>
 #include <wtf/Noncopyable.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefPtr.h>
 
+namespace Deprecated {
+class ScriptObject;
+}
+
 namespace WebCore {
 
 class InjectedScriptModule;
 class Node;
-class SerializedScriptValue;
 
 #if ENABLE(INSPECTOR)
 
@@ -60,40 +62,40 @@
                   bool includeCommandLineAPI,
                   bool returnByValue,
                   bool generatePreview,
-                  RefPtr<TypeBuilder::Runtime::RemoteObject>* result,
-                  TypeBuilder::OptOutput<bool>* wasThrown);
+                  RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>* result,
+                  Inspector::TypeBuilder::OptOutput<bool>* wasThrown);
     void callFunctionOn(ErrorString*,
                         const String& objectId,
                         const String& expression,
                         const String& arguments,
                         bool returnByValue,
                         bool generatePreview,
-                        RefPtr<TypeBuilder::Runtime::RemoteObject>* result,
-                        TypeBuilder::OptOutput<bool>* wasThrown);
+                        RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>* result,
+                        Inspector::TypeBuilder::OptOutput<bool>* wasThrown);
     void evaluateOnCallFrame(ErrorString*,
-                             const ScriptValue& callFrames,
+                             const Deprecated::ScriptValue& callFrames,
                              const String& callFrameId,
                              const String& expression,
                              const String& objectGroup,
                              bool includeCommandLineAPI,
                              bool returnByValue,
                              bool generatePreview,
-                             RefPtr<TypeBuilder::Runtime::RemoteObject>* result,
-                             TypeBuilder::OptOutput<bool>* wasThrown);
-    void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<TypeBuilder::Debugger::FunctionDetails>* result);
-    void getProperties(ErrorString*, const String& objectId, bool ownProperties, RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::PropertyDescriptor>>* result);
-    void getInternalProperties(ErrorString*, const String& objectId, RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::InternalPropertyDescriptor>>* result);
+                             RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>* result,
+                             Inspector::TypeBuilder::OptOutput<bool>* wasThrown);
+    void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<Inspector::TypeBuilder::Debugger::FunctionDetails>* result);
+    void getProperties(ErrorString*, const String& objectId, bool ownProperties, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::PropertyDescriptor>>* result);
+    void getInternalProperties(ErrorString*, const String& objectId, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::InternalPropertyDescriptor>>* result);
     Node* nodeForObjectId(const String& objectId);
     void releaseObject(const String& objectId);
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
-    PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame>> wrapCallFrames(const ScriptValue&);
+    PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::CallFrame>> wrapCallFrames(const Deprecated::ScriptValue&);
 #endif
 
-    PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapObject(const ScriptValue&, const String& groupName, bool generatePreview = false) const;
-    PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapTable(const ScriptValue& table, const ScriptValue& columns) const;
-    PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapNode(Node*, const String& groupName);
-    ScriptValue findObjectById(const String& objectId) const;
+    PassRefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> wrapObject(const Deprecated::ScriptValue&, const String& groupName, bool generatePreview = false) const;
+    PassRefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> wrapTable(const Deprecated::ScriptValue& table, const Deprecated::ScriptValue& columns) const;
+    PassRefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> wrapNode(Node*, const String& groupName);
+    Deprecated::ScriptValue findObjectById(const String& objectId) const;
 
     void inspectNode(Node*);
     void releaseObjectGroup(const String&);
@@ -101,9 +103,9 @@
 private:
     friend class InjectedScriptModule;
     friend InjectedScript InjectedScriptManager::injectedScriptFor(JSC::ExecState*);
-    InjectedScript(ScriptObject, InspectedStateAccessCheck);
+    InjectedScript(Deprecated::ScriptObject, InspectedStateAccessCheck);
 
-    ScriptValue nodeAsScriptValue(Node*);
+    Deprecated::ScriptValue nodeAsScriptValue(Node*);
 };
 
 #endif
diff --git a/Source/WebCore/inspector/InjectedScriptBase.cpp b/Source/WebCore/inspector/InjectedScriptBase.cpp
index d9fba40..63f2917 100644
--- a/Source/WebCore/inspector/InjectedScriptBase.cpp
+++ b/Source/WebCore/inspector/InjectedScriptBase.cpp
@@ -35,12 +35,14 @@
 #include "InjectedScriptBase.h"
 
 #include "InspectorInstrumentation.h"
-#include "InspectorValues.h"
-#include "ScriptFunctionCall.h"
+#include <bindings/ScriptFunctionCall.h>
+#include <inspector/InspectorValues.h>
 #include <runtime/JSGlobalObject.h>
 #include <wtf/text/WTFString.h>
 
-using WebCore::TypeBuilder::Runtime::RemoteObject;
+using Inspector::TypeBuilder::Runtime::RemoteObject;
+
+using namespace Inspector;
 
 namespace WebCore {
 
@@ -50,14 +52,14 @@
 {
 }
 
-InjectedScriptBase::InjectedScriptBase(const String& name, ScriptObject injectedScriptObject, InspectedStateAccessCheck accessCheck)
+InjectedScriptBase::InjectedScriptBase(const String& name, Deprecated::ScriptObject injectedScriptObject, InspectedStateAccessCheck accessCheck)
     : m_name(name)
     , m_injectedScriptObject(injectedScriptObject)
     , m_inspectedStateAccessCheck(accessCheck)
 {
 }
 
-void InjectedScriptBase::initialize(ScriptObject injectedScriptObject, InspectedStateAccessCheck accessCheck)
+void InjectedScriptBase::initialize(Deprecated::ScriptObject injectedScriptObject, InspectedStateAccessCheck accessCheck)
 {
     m_injectedScriptObject = injectedScriptObject;
     m_inspectedStateAccessCheck = accessCheck;
@@ -68,12 +70,12 @@
     return m_inspectedStateAccessCheck(m_injectedScriptObject.scriptState());
 }
 
-const ScriptObject& InjectedScriptBase::injectedScriptObject() const
+const Deprecated::ScriptObject& InjectedScriptBase::injectedScriptObject() const
 {
     return m_injectedScriptObject;
 }
 
-ScriptValue InjectedScriptBase::callFunctionWithEvalEnabled(ScriptFunctionCall& function, bool& hadException) const
+Deprecated::ScriptValue InjectedScriptBase::callFunctionWithEvalEnabled(Deprecated::ScriptFunctionCall& function, bool& hadException) const
 {
     ScriptExecutionContext* scriptExecutionContext = scriptExecutionContextFromExecState(m_injectedScriptObject.scriptState());
     InspectorInstrumentationCookie cookie = InspectorInstrumentation::willCallFunction(scriptExecutionContext, name(), 1);
@@ -87,7 +89,7 @@
             scriptState->lexicalGlobalObject()->setEvalEnabled(true);
     }
 
-    ScriptValue resultValue = function.call(hadException);
+    Deprecated::ScriptValue resultValue = function.call(hadException);
 
     if (evalIsDisabled)
         scriptState->lexicalGlobalObject()->setEvalEnabled(false);
@@ -96,7 +98,7 @@
     return resultValue;
 }
 
-void InjectedScriptBase::makeCall(ScriptFunctionCall& function, RefPtr<InspectorValue>* result)
+void InjectedScriptBase::makeCall(Deprecated::ScriptFunctionCall& function, RefPtr<InspectorValue>* result)
 {
     if (hasNoValue() || !canAccessInspectedWindow()) {
         *result = InspectorValue::null();
@@ -104,7 +106,7 @@
     }
 
     bool hadException = false;
-    ScriptValue resultValue = callFunctionWithEvalEnabled(function, hadException);
+    Deprecated::ScriptValue resultValue = callFunctionWithEvalEnabled(function, hadException);
 
     ASSERT(!hadException);
     if (!hadException) {
@@ -115,7 +117,7 @@
         *result = InspectorString::create("Exception while making a call.");
 }
 
-void InjectedScriptBase::makeEvalCall(ErrorString* errorString, ScriptFunctionCall& function, RefPtr<TypeBuilder::Runtime::RemoteObject>* objectResult, TypeBuilder::OptOutput<bool>* wasThrown)
+void InjectedScriptBase::makeEvalCall(ErrorString* errorString, Deprecated::ScriptFunctionCall& function, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>* objectResult, Inspector::TypeBuilder::OptOutput<bool>* wasThrown)
 {
     RefPtr<InspectorValue> result;
     makeCall(function, &result);
@@ -139,7 +141,7 @@
         *errorString = "Internal error: result is not a pair of value and wasThrown flag";
         return;
     }
-    *objectResult = TypeBuilder::Runtime::RemoteObject::runtimeCast(resultObj);
+    *objectResult = Inspector::TypeBuilder::Runtime::RemoteObject::runtimeCast(resultObj);
     *wasThrown = wasThrownVal;
 }
 
diff --git a/Source/WebCore/inspector/InjectedScriptBase.h b/Source/WebCore/inspector/InjectedScriptBase.h
index 796f6c0..75f5256 100644
--- a/Source/WebCore/inspector/InjectedScriptBase.h
+++ b/Source/WebCore/inspector/InjectedScriptBase.h
@@ -31,15 +31,20 @@
 #ifndef InjectedScriptBase_h
 #define InjectedScriptBase_h
 
-#include "InspectorTypeBuilder.h"
-#include "ScriptObject.h"
+#include "InspectorWebTypeBuilders.h"
+#include <bindings/ScriptObject.h>
 #include <wtf/Forward.h>
 #include <wtf/RefPtr.h>
 
-namespace WebCore {
-
-class InspectorValue;
+namespace Deprecated {
 class ScriptFunctionCall;
+}
+
+namespace Inspector {
+class InspectorValue;
+}
+
+namespace WebCore {
 
 typedef String ErrorString;
 
@@ -56,18 +61,18 @@
 protected:
     typedef bool (*InspectedStateAccessCheck)(JSC::ExecState*);
     InjectedScriptBase(const String& name);
-    InjectedScriptBase(const String& name, ScriptObject, InspectedStateAccessCheck);
+    InjectedScriptBase(const String& name, Deprecated::ScriptObject, InspectedStateAccessCheck);
 
-    void initialize(ScriptObject, InspectedStateAccessCheck);
+    void initialize(Deprecated::ScriptObject, InspectedStateAccessCheck);
     bool canAccessInspectedWindow() const;
-    const ScriptObject& injectedScriptObject() const;
-    ScriptValue callFunctionWithEvalEnabled(ScriptFunctionCall&, bool& hadException) const;
-    void makeCall(ScriptFunctionCall&, RefPtr<InspectorValue>* result);
-    void makeEvalCall(ErrorString*, ScriptFunctionCall&, RefPtr<TypeBuilder::Runtime::RemoteObject>* result, TypeBuilder::OptOutput<bool>* wasThrown);
+    const Deprecated::ScriptObject& injectedScriptObject() const;
+    Deprecated::ScriptValue callFunctionWithEvalEnabled(Deprecated::ScriptFunctionCall&, bool& hadException) const;
+    void makeCall(Deprecated::ScriptFunctionCall&, RefPtr<Inspector::InspectorValue>* result);
+    void makeEvalCall(ErrorString*, Deprecated::ScriptFunctionCall&, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>* result, Inspector::TypeBuilder::OptOutput<bool>* wasThrown);
 
 private:
     String m_name;
-    ScriptObject m_injectedScriptObject;
+    Deprecated::ScriptObject m_injectedScriptObject;
     InspectedStateAccessCheck m_inspectedStateAccessCheck;
 };
 
diff --git a/Source/WebCore/inspector/InjectedScriptCanvasModule.cpp b/Source/WebCore/inspector/InjectedScriptCanvasModule.cpp
index fad798b..58be739 100644
--- a/Source/WebCore/inspector/InjectedScriptCanvasModule.cpp
+++ b/Source/WebCore/inspector/InjectedScriptCanvasModule.cpp
@@ -37,15 +37,19 @@
 #include "InjectedScript.h"
 #include "InjectedScriptCanvasModuleSource.h"
 #include "InjectedScriptManager.h"
-#include "ScriptFunctionCall.h"
-#include "ScriptObject.h"
+#include "JSMainThreadExecState.h"
+#include <bindings/ScriptFunctionCall.h>
+#include <bindings/ScriptObject.h>
+#include <inspector/InspectorValues.h>
 
-using WebCore::TypeBuilder::Array;
-using WebCore::TypeBuilder::Canvas::ResourceId;
-using WebCore::TypeBuilder::Canvas::ResourceInfo;
-using WebCore::TypeBuilder::Canvas::ResourceState;
-using WebCore::TypeBuilder::Canvas::TraceLog;
-using WebCore::TypeBuilder::Canvas::TraceLogId;
+using Inspector::TypeBuilder::Array;
+using Inspector::TypeBuilder::Canvas::ResourceId;
+using Inspector::TypeBuilder::Canvas::ResourceInfo;
+using Inspector::TypeBuilder::Canvas::ResourceState;
+using Inspector::TypeBuilder::Canvas::TraceLog;
+using Inspector::TypeBuilder::Canvas::TraceLogId;
+
+using namespace Inspector;
 
 namespace WebCore {
 
@@ -66,34 +70,34 @@
     return String(reinterpret_cast<const char*>(InjectedScriptCanvasModuleSource_js), sizeof(InjectedScriptCanvasModuleSource_js));
 }
 
-ScriptObject InjectedScriptCanvasModule::wrapCanvas2DContext(const ScriptObject& context)
+Deprecated::ScriptObject InjectedScriptCanvasModule::wrapCanvas2DContext(const Deprecated::ScriptObject& context)
 {
     return callWrapContextFunction("wrapCanvas2DContext", context);
 }
 
 #if ENABLE(WEBGL)
-ScriptObject InjectedScriptCanvasModule::wrapWebGLContext(const ScriptObject& glContext)
+Deprecated::ScriptObject InjectedScriptCanvasModule::wrapWebGLContext(const Deprecated::ScriptObject& glContext)
 {
     return callWrapContextFunction("wrapWebGLContext", glContext);
 }
 #endif // ENABLE(WEBGL)
 
-ScriptObject InjectedScriptCanvasModule::callWrapContextFunction(const String& functionName, const ScriptObject& context)
+Deprecated::ScriptObject InjectedScriptCanvasModule::callWrapContextFunction(const String& functionName, const Deprecated::ScriptObject& context)
 {
-    ScriptFunctionCall function(injectedScriptObject(), functionName);
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), functionName, WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(context);
     bool hadException = false;
-    ScriptValue resultValue = callFunctionWithEvalEnabled(function, hadException);
+    Deprecated::ScriptValue resultValue = callFunctionWithEvalEnabled(function, hadException);
     if (hadException || resultValue.hasNoValue() || !resultValue.isObject()) {
         ASSERT_NOT_REACHED();
-        return ScriptObject();
+        return Deprecated::ScriptObject();
     }
-    return ScriptObject(context.scriptState(), resultValue);
+    return Deprecated::ScriptObject(context.scriptState(), resultValue);
 }
 
 void InjectedScriptCanvasModule::markFrameEnd()
 {
-    ScriptFunctionCall function(injectedScriptObject(), "markFrameEnd");
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "markFrameEnd", WebCore::functionCallHandlerFromAnyThread);
     RefPtr<InspectorValue> resultValue;
     makeCall(function, &resultValue);
     ASSERT(resultValue);
@@ -111,7 +115,7 @@
 
 void InjectedScriptCanvasModule::callStartCapturingFunction(const String& functionName, ErrorString* errorString, TraceLogId* traceLogId)
 {
-    ScriptFunctionCall function(injectedScriptObject(), functionName);
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), functionName, WebCore::functionCallHandlerFromAnyThread);
     RefPtr<InspectorValue> resultValue;
     makeCall(function, &resultValue);
     if (!resultValue || resultValue->type() != InspectorValue::TypeString || !resultValue->asString(traceLogId))
@@ -130,7 +134,7 @@
 
 void InjectedScriptCanvasModule::callVoidFunctionWithTraceLogIdArgument(const String& functionName, ErrorString* errorString, const TraceLogId& traceLogId)
 {
-    ScriptFunctionCall function(injectedScriptObject(), functionName);
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), functionName, WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(traceLogId);
     bool hadException = false;
     callFunctionWithEvalEnabled(function, hadException);
@@ -141,7 +145,7 @@
 
 void InjectedScriptCanvasModule::traceLog(ErrorString* errorString, const TraceLogId& traceLogId, const int* startOffset, const int* maxLength, RefPtr<TraceLog>* traceLog)
 {
-    ScriptFunctionCall function(injectedScriptObject(), "traceLog");
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "traceLog", WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(traceLogId);
     if (startOffset)
         function.appendArgument(*startOffset);
@@ -159,7 +163,7 @@
 
 void InjectedScriptCanvasModule::replayTraceLog(ErrorString* errorString, const TraceLogId& traceLogId, int stepNo, RefPtr<ResourceState>* result)
 {
-    ScriptFunctionCall function(injectedScriptObject(), "replayTraceLog");
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "replayTraceLog", WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(traceLogId);
     function.appendArgument(stepNo);
     RefPtr<InspectorValue> resultValue;
@@ -174,7 +178,7 @@
 
 void InjectedScriptCanvasModule::resourceInfo(ErrorString* errorString, const ResourceId& resourceId, RefPtr<ResourceInfo>* result)
 {
-    ScriptFunctionCall function(injectedScriptObject(), "resourceInfo");
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "resourceInfo", WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(resourceId);
     RefPtr<InspectorValue> resultValue;
     makeCall(function, &resultValue);
@@ -188,7 +192,7 @@
 
 void InjectedScriptCanvasModule::resourceState(ErrorString* errorString, const TraceLogId& traceLogId, const ResourceId& resourceId, RefPtr<ResourceState>* result)
 {
-    ScriptFunctionCall function(injectedScriptObject(), "resourceState");
+    Deprecated::ScriptFunctionCall function(injectedScriptObject(), "resourceState", WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(traceLogId);
     function.appendArgument(resourceId);
     RefPtr<InspectorValue> resultValue;
diff --git a/Source/WebCore/inspector/InjectedScriptCanvasModule.h b/Source/WebCore/inspector/InjectedScriptCanvasModule.h
index f33112c..acece6e 100644
--- a/Source/WebCore/inspector/InjectedScriptCanvasModule.h
+++ b/Source/WebCore/inspector/InjectedScriptCanvasModule.h
@@ -35,10 +35,13 @@
 #include "ScriptState.h"
 #include <wtf/text/WTFString.h>
 
+namespace Deprecated {
+class ScriptObject;
+}
+
 namespace WebCore {
 
 class InjectedScriptManager;
-class ScriptObject;
 
 #if ENABLE(INSPECTOR)
 
@@ -50,23 +53,23 @@
 
     static InjectedScriptCanvasModule moduleForState(InjectedScriptManager*, JSC::ExecState*);
 
-    ScriptObject wrapCanvas2DContext(const ScriptObject&);
+    Deprecated::ScriptObject wrapCanvas2DContext(const Deprecated::ScriptObject&);
 #if ENABLE(WEBGL)
-    ScriptObject wrapWebGLContext(const ScriptObject&);
+    Deprecated::ScriptObject wrapWebGLContext(const Deprecated::ScriptObject&);
 #endif
     void markFrameEnd();
 
-    void captureFrame(ErrorString*, TypeBuilder::Canvas::TraceLogId*);
-    void startCapturing(ErrorString*, TypeBuilder::Canvas::TraceLogId*);
-    void stopCapturing(ErrorString*, const TypeBuilder::Canvas::TraceLogId&);
-    void dropTraceLog(ErrorString*, const TypeBuilder::Canvas::TraceLogId&);
-    void traceLog(ErrorString*, const String&, const int*, const int*, RefPtr<TypeBuilder::Canvas::TraceLog>*);
-    void replayTraceLog(ErrorString*, const TypeBuilder::Canvas::TraceLogId&, int, RefPtr<TypeBuilder::Canvas::ResourceState>*);
-    void resourceInfo(ErrorString*, const TypeBuilder::Canvas::ResourceId&, RefPtr<TypeBuilder::Canvas::ResourceInfo>*);
-    void resourceState(ErrorString*, const TypeBuilder::Canvas::TraceLogId&, const TypeBuilder::Canvas::ResourceId&, RefPtr<TypeBuilder::Canvas::ResourceState>*);
+    void captureFrame(ErrorString*, Inspector::TypeBuilder::Canvas::TraceLogId*);
+    void startCapturing(ErrorString*, Inspector::TypeBuilder::Canvas::TraceLogId*);
+    void stopCapturing(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&);
+    void dropTraceLog(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&);
+    void traceLog(ErrorString*, const String&, const int*, const int*, RefPtr<Inspector::TypeBuilder::Canvas::TraceLog>*);
+    void replayTraceLog(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&, int, RefPtr<Inspector::TypeBuilder::Canvas::ResourceState>*);
+    void resourceInfo(ErrorString*, const Inspector::TypeBuilder::Canvas::ResourceId&, RefPtr<Inspector::TypeBuilder::Canvas::ResourceInfo>*);
+    void resourceState(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&, const Inspector::TypeBuilder::Canvas::ResourceId&, RefPtr<Inspector::TypeBuilder::Canvas::ResourceState>*);
 
 private:
-    ScriptObject callWrapContextFunction(const String&, const ScriptObject&);
+    Deprecated::ScriptObject callWrapContextFunction(const String&, const Deprecated::ScriptObject&);
     void callStartCapturingFunction(const String&, ErrorString*, String*);
     void callVoidFunctionWithTraceLogIdArgument(const String&, ErrorString*, const String&);
 };
diff --git a/Source/WebCore/inspector/InjectedScriptHost.cpp b/Source/WebCore/inspector/InjectedScriptHost.cpp
index ef533aa..5467575 100644
--- a/Source/WebCore/inspector/InjectedScriptHost.cpp
+++ b/Source/WebCore/inspector/InjectedScriptHost.cpp
@@ -47,18 +47,19 @@
 #include "InspectorDatabaseAgent.h"
 #include "InspectorDebuggerAgent.h"
 #include "InspectorFrontend.h"
-#include "InspectorValues.h"
 #include "Pasteboard.h"
 #include "Storage.h"
+#include "markup.h"
+#include <bindings/ScriptValue.h>
+#include <inspector/InspectorValues.h>
+#include <wtf/RefPtr.h>
+#include <wtf/StdLibExtras.h>
 
 #if ENABLE(SQL_DATABASE)
 #include "Database.h"
 #endif
 
-#include "markup.h"
-
-#include <wtf/RefPtr.h>
-#include <wtf/StdLibExtras.h>
+using namespace Inspector;
 
 namespace WebCore {
 
@@ -97,7 +98,7 @@
 void InjectedScriptHost::inspectImpl(PassRefPtr<InspectorValue> object, PassRefPtr<InspectorValue> hints)
 {
     if (m_inspectorAgent) {
-        RefPtr<TypeBuilder::Runtime::RemoteObject> remoteObject = TypeBuilder::Runtime::RemoteObject::runtimeCast(object);
+        RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> remoteObject = Inspector::TypeBuilder::Runtime::RemoteObject::runtimeCast(object);
         m_inspectorAgent->inspect(remoteObject, hints->asObject());
     }
 }
@@ -121,9 +122,9 @@
     Pasteboard::createForCopyAndPaste()->writePlainText(text, Pasteboard::CannotSmartReplace);
 }
 
-ScriptValue InjectedScriptHost::InspectableObject::get(JSC::ExecState*)
+Deprecated::ScriptValue InjectedScriptHost::InspectableObject::get(JSC::ExecState*)
 {
-    return ScriptValue();
+    return Deprecated::ScriptValue();
 };
 
 void InjectedScriptHost::addInspectedObject(PassOwnPtr<InjectedScriptHost::InspectableObject> object)
diff --git a/Source/WebCore/inspector/InjectedScriptHost.h b/Source/WebCore/inspector/InjectedScriptHost.h
index 4a84182..8c44d77 100644
--- a/Source/WebCore/inspector/InjectedScriptHost.h
+++ b/Source/WebCore/inspector/InjectedScriptHost.h
@@ -36,6 +36,15 @@
 #include <wtf/RefCounted.h>
 #include <wtf/Vector.h>
 
+namespace Deprecated {
+class ScriptValue;
+}
+
+namespace Inspector {
+class InspectorObject;
+class InspectorValue;
+}
+
 namespace WebCore {
 
 class Database;
@@ -46,12 +55,8 @@
 class InspectorDOMStorageAgent;
 class InspectorDatabaseAgent;
 class InspectorDebuggerAgent;
-class InspectorObject;
-class InspectorValue;
 class Node;
 class ScriptDebugServer;
-class ScriptObject;
-class ScriptValue;
 class Storage;
 
 struct EventListenerInfo;
@@ -85,22 +90,22 @@
 #endif
     }
 
-    static Node* scriptValueAsNode(ScriptValue);
-    static ScriptValue nodeAsScriptValue(JSC::ExecState*, Node*);
+    static Node* scriptValueAsNode(Deprecated::ScriptValue);
+    static Deprecated::ScriptValue nodeAsScriptValue(JSC::ExecState*, Node*);
 
     void disconnect();
 
     class InspectableObject {
         WTF_MAKE_FAST_ALLOCATED;
     public:
-        virtual ScriptValue get(JSC::ExecState*);
+        virtual Deprecated::ScriptValue get(JSC::ExecState*);
         virtual ~InspectableObject() { }
     };
     void addInspectedObject(PassOwnPtr<InspectableObject>);
     void clearInspectedObjects();
     InspectableObject* inspectedObject(unsigned int num);
 
-    void inspectImpl(PassRefPtr<InspectorValue> objectToInspect, PassRefPtr<InspectorValue> hints);
+    void inspectImpl(PassRefPtr<Inspector::InspectorValue> objectToInspect, PassRefPtr<Inspector::InspectorValue> hints);
     void getEventListenersImpl(Node*, Vector<EventListenerInfo>& listenersArray);
 
     void clearConsoleMessages();
diff --git a/Source/WebCore/inspector/InjectedScriptManager.cpp b/Source/WebCore/inspector/InjectedScriptManager.cpp
index 7aa3d43..1276c45 100644
--- a/Source/WebCore/inspector/InjectedScriptManager.cpp
+++ b/Source/WebCore/inspector/InjectedScriptManager.cpp
@@ -37,10 +37,12 @@
 #include "InjectedScript.h"
 #include "InjectedScriptHost.h"
 #include "InjectedScriptSource.h"
-#include "InspectorValues.h"
-#include "ScriptObject.h"
+#include <bindings/ScriptObject.h>
+#include <inspector/InspectorValues.h>
 #include <wtf/PassOwnPtr.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 PassOwnPtr<InjectedScriptManager> InjectedScriptManager::createForPage()
@@ -173,7 +175,7 @@
         return InjectedScript();
 
     int id = injectedScriptIdFor(inspectedExecState);
-    ScriptObject injectedScriptObject = createInjectedScript(injectedScriptSource(), inspectedExecState, id);
+    Deprecated::ScriptObject injectedScriptObject = createInjectedScript(injectedScriptSource(), inspectedExecState, id);
     InjectedScript result(injectedScriptObject, m_inspectedStateAccessCheck);
     m_idToInjectedScript.set(id, result);
     return result;
diff --git a/Source/WebCore/inspector/InjectedScriptManager.h b/Source/WebCore/inspector/InjectedScriptManager.h
index 681e408..7b48d36 100644
--- a/Source/WebCore/inspector/InjectedScriptManager.h
+++ b/Source/WebCore/inspector/InjectedScriptManager.h
@@ -35,13 +35,19 @@
 #include <wtf/HashMap.h>
 #include <wtf/text/WTFString.h>
 
+namespace Deprecated {
+class ScriptObject;
+}
+
+namespace Inspector {
+class InspectorObject;
+}
+
 namespace WebCore {
 
 class DOMWindow;
 class InjectedScript;
 class InjectedScriptHost;
-class InspectorObject;
-class ScriptObject;
 
 class InjectedScriptManager {
     WTF_MAKE_NONCOPYABLE(InjectedScriptManager); WTF_MAKE_FAST_ALLOCATED;
@@ -69,7 +75,7 @@
     explicit InjectedScriptManager(InspectedStateAccessCheck);
 
     String injectedScriptSource();
-    ScriptObject createInjectedScript(const String& source, JSC::ExecState*, int id);
+    Deprecated::ScriptObject createInjectedScript(const String& source, JSC::ExecState*, int id);
 
     static bool canAccessInspectedWindow(JSC::ExecState*);
     static bool canAccessInspectedWorkerGlobalScope(JSC::ExecState*);
diff --git a/Source/WebCore/inspector/InjectedScriptModule.cpp b/Source/WebCore/inspector/InjectedScriptModule.cpp
index db20779..9268edf 100644
--- a/Source/WebCore/inspector/InjectedScriptModule.cpp
+++ b/Source/WebCore/inspector/InjectedScriptModule.cpp
@@ -36,8 +36,11 @@
 
 #include "InjectedScript.h"
 #include "InjectedScriptManager.h"
-#include "ScriptFunctionCall.h"
-#include "ScriptObject.h"
+#include "JSMainThreadExecState.h"
+#include <bindings/ScriptFunctionCall.h>
+#include <bindings/ScriptObject.h>
+
+using namespace Inspector;
 
 namespace WebCore {
 
@@ -54,13 +57,13 @@
         return;
 
     // FIXME: Make the InjectedScript a module itself.
-    ScriptFunctionCall function(injectedScript.injectedScriptObject(), "module");
+    Deprecated::ScriptFunctionCall function(injectedScript.injectedScriptObject(), "module", WebCore::functionCallHandlerFromAnyThread);
     function.appendArgument(name());
     bool hadException = false;
-    ScriptValue resultValue = injectedScript.callFunctionWithEvalEnabled(function, hadException);
+    Deprecated::ScriptValue resultValue = injectedScript.callFunctionWithEvalEnabled(function, hadException);
     ASSERT(!hadException);
     if (hadException || resultValue.hasNoValue() || !resultValue.isObject()) {
-        ScriptFunctionCall function(injectedScript.injectedScriptObject(), "injectModule");
+        Deprecated::ScriptFunctionCall function(injectedScript.injectedScriptObject(), "injectModule", WebCore::functionCallHandlerFromAnyThread);
         function.appendArgument(name());
         function.appendArgument(source());
         resultValue = injectedScript.callFunctionWithEvalEnabled(function, hadException);
@@ -70,7 +73,7 @@
         }
     }
 
-    ScriptObject moduleObject(scriptState, resultValue);
+    Deprecated::ScriptObject moduleObject(scriptState, resultValue);
     initialize(moduleObject, injectedScriptManager->inspectedStateAccessCheck());
 }
 
diff --git a/Source/WebCore/inspector/InspectorAgent.cpp b/Source/WebCore/inspector/InspectorAgent.cpp
index ea7b420..194b779 100644
--- a/Source/WebCore/inspector/InspectorAgent.cpp
+++ b/Source/WebCore/inspector/InspectorAgent.cpp
@@ -42,23 +42,24 @@
 #include "InspectorController.h"
 #include "InspectorFrontend.h"
 #include "InspectorInstrumentation.h"
-#include "InspectorValues.h"
 #include "InstrumentingAgents.h"
 #include "MainFrame.h"
 #include "Page.h"
 #include "ResourceRequest.h"
 #include "ScriptController.h"
-#include "ScriptFunctionCall.h"
-#include "ScriptObject.h"
 #include "SecurityOrigin.h"
 #include "Settings.h"
+#include <bindings/ScriptValue.h>
+#include <inspector/InspectorValues.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefPtr.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 InspectorAgent::InspectorAgent(Page* page, InjectedScriptManager* injectedScriptManager, InstrumentingAgents* instrumentingAgents)
-    : InspectorBaseAgent(ASCIILiteral("Inspector"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("Inspector"), instrumentingAgents)
     , m_inspectedPage(page)
     , m_injectedScriptManager(injectedScriptManager)
     , m_enabled(false)
@@ -93,7 +94,7 @@
     frame->script().executeScript(scriptSource.toString());
 }
 
-void InspectorAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void InspectorAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorInspectorFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorInspectorBackendDispatcher::create(backendDispatcher, this);
@@ -150,7 +151,7 @@
     m_injectedScriptForOrigin.set(origin, source);
 }
 
-void InspectorAgent::inspect(PassRefPtr<TypeBuilder::Runtime::RemoteObject> objectToInspect, PassRefPtr<InspectorObject> hints)
+void InspectorAgent::inspect(PassRefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> objectToInspect, PassRefPtr<InspectorObject> hints)
 {
     if (m_enabled && m_frontendDispatcher) {
         m_frontendDispatcher->inspect(objectToInspect, hints);
diff --git a/Source/WebCore/inspector/InspectorAgent.h b/Source/WebCore/inspector/InspectorAgent.h
index fb4bd25..1cea7c2 100644
--- a/Source/WebCore/inspector/InspectorAgent.h
+++ b/Source/WebCore/inspector/InspectorAgent.h
@@ -30,11 +30,17 @@
 #ifndef InspectorAgent_h
 #define InspectorAgent_h
 
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
+#include "InspectorWebAgentBase.h"
+#include <wtf/Forward.h>
 #include <wtf/HashMap.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/Vector.h>
 
+namespace Inspector {
+class InspectorObject;
+}
+
 namespace WebCore {
 
 class DOMWrapperWorld;
@@ -42,13 +48,12 @@
 class Frame;
 class InjectedScriptManager;
 class InspectorInspectorFrontendDispatcher;
-class InspectorObject;
 class InstrumentingAgents;
 class Page;
 
 typedef String ErrorString;
 
-class InspectorAgent : public InspectorBaseAgent, public InspectorInspectorBackendDispatcherHandler {
+class InspectorAgent : public InspectorAgentBase, public InspectorInspectorBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorAgent);
 public:
     static PassOwnPtr<InspectorAgent> create(Page* page, InjectedScriptManager* injectedScriptManager, InstrumentingAgents* instrumentingAgents)
@@ -64,7 +69,7 @@
     void enable(ErrorString*);
     void disable(ErrorString*);
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld&);
@@ -79,7 +84,7 @@
 
     void setInjectedScriptForOrigin(const String& origin, const String& source);
 
-    void inspect(PassRefPtr<TypeBuilder::Runtime::RemoteObject> objectToInspect, PassRefPtr<InspectorObject> hints);
+    void inspect(PassRefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> objectToInspect, PassRefPtr<Inspector::InspectorObject> hints);
 
 private:
     InspectorAgent(Page*, InjectedScriptManager*, InstrumentingAgents*);
@@ -90,7 +95,7 @@
     InjectedScriptManager* m_injectedScriptManager;
 
     Vector<pair<long, String>> m_pendingEvaluateTestCommands;
-    pair<RefPtr<TypeBuilder::Runtime::RemoteObject>, RefPtr<InspectorObject>> m_pendingInspectData;
+    pair<RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>, RefPtr<Inspector::InspectorObject>> m_pendingInspectData;
     HashMap<String, String> m_injectedScriptForOrigin;
 
     bool m_enabled;
diff --git a/Source/WebCore/inspector/InspectorAgentRegistry.cpp b/Source/WebCore/inspector/InspectorAgentRegistry.cpp
deleted file mode 100644
index 099d1a3..0000000
--- a/Source/WebCore/inspector/InspectorAgentRegistry.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#if ENABLE(INSPECTOR)
-
-#include "InspectorAgentRegistry.h"
-
-namespace WebCore {
-
-void InspectorAgentRegistry::append(PassOwnPtr<InspectorBaseAgent> agent)
-{
-    m_agents.append(agent);
-}
-
-void InspectorAgentRegistry::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
-{
-    for (size_t i = 0; i < m_agents.size(); i++)
-        m_agents[i]->didCreateFrontendAndBackend(frontendChannel, backendDispatcher);
-}
-
-void InspectorAgentRegistry::willDestroyFrontendAndBackend()
-{
-    for (size_t i = 0; i < m_agents.size(); i++)
-        m_agents[i]->willDestroyFrontendAndBackend();
-}
-
-void InspectorAgentRegistry::discardAgents()
-{
-    for (size_t i = 0; i < m_agents.size(); i++)
-        m_agents[i]->discardAgent();
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INSPECTOR)
diff --git a/Source/WebCore/inspector/InspectorAllInOne.cpp b/Source/WebCore/inspector/InspectorAllInOne.cpp
index 263bdd9..5300d95 100644
--- a/Source/WebCore/inspector/InspectorAllInOne.cpp
+++ b/Source/WebCore/inspector/InspectorAllInOne.cpp
@@ -37,9 +37,7 @@
 #include "InjectedScriptManager.cpp"
 #include "InjectedScriptModule.cpp"
 #include "InspectorAgent.cpp"
-#include "InspectorAgentRegistry.cpp"
 #include "InspectorApplicationCacheAgent.cpp"
-#include "InspectorBackendDispatcher.cpp"
 #include "InspectorCSSAgent.cpp"
 #include "InspectorCanvasAgent.cpp"
 #include "InspectorClient.cpp"
@@ -70,7 +68,6 @@
 #include "InspectorStyleSheet.cpp"
 #include "InspectorStyleTextEditor.cpp"
 #include "InspectorTimelineAgent.cpp"
-#include "InspectorValues.cpp"
 #include "InspectorWorkerAgent.cpp"
 #include "InstrumentingAgents.cpp"
 #include "NetworkResourcesData.cpp"
diff --git a/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp b/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp
index 04cc53a..6d7d805 100644
--- a/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp
+++ b/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp
@@ -36,21 +36,23 @@
 #include "InspectorAgent.h"
 #include "InspectorFrontend.h"
 #include "InspectorPageAgent.h"
-#include "InspectorValues.h"
 #include "InstrumentingAgents.h"
 #include "NetworkStateNotifier.h"
 #include "Page.h"
 #include "ResourceResponse.h"
+#include <inspector/InspectorValues.h>
+
+using namespace Inspector;
 
 namespace WebCore {
 
 InspectorApplicationCacheAgent::InspectorApplicationCacheAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent)
-    : InspectorBaseAgent(ASCIILiteral("ApplicationCache"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("ApplicationCache"), instrumentingAgents)
     , m_pageAgent(pageAgent)
 {
 }
 
-void InspectorApplicationCacheAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void InspectorApplicationCacheAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorApplicationCacheFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorApplicationCacheBackendDispatcher::create(backendDispatcher, this);
@@ -92,9 +94,9 @@
     m_frontendDispatcher->networkStateUpdated(isNowOnline);
 }
 
-void InspectorApplicationCacheAgent::getFramesWithManifests(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::ApplicationCache::FrameWithManifest>>& result)
+void InspectorApplicationCacheAgent::getFramesWithManifests(ErrorString*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::ApplicationCache::FrameWithManifest>>& result)
 {
-    result = TypeBuilder::Array<TypeBuilder::ApplicationCache::FrameWithManifest>::create();
+    result = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::ApplicationCache::FrameWithManifest>::create();
 
     Frame* mainFrame = m_pageAgent->mainFrame();
     for (Frame* frame = mainFrame; frame; frame = frame->tree().traverseNext(mainFrame)) {
@@ -106,7 +108,7 @@
         ApplicationCacheHost::CacheInfo info = host->applicationCacheInfo();
         String manifestURL = info.m_manifest.string();
         if (!manifestURL.isEmpty()) {
-            RefPtr<TypeBuilder::ApplicationCache::FrameWithManifest> value = TypeBuilder::ApplicationCache::FrameWithManifest::create()
+            RefPtr<Inspector::TypeBuilder::ApplicationCache::FrameWithManifest> value = Inspector::TypeBuilder::ApplicationCache::FrameWithManifest::create()
                 .setFrameId(m_pageAgent->frameId(frame))
                 .setManifestURL(manifestURL)
                 .setStatus(static_cast<int>(host->status()));
@@ -134,7 +136,7 @@
     *manifestURL = info.m_manifest.string();
 }
 
-void InspectorApplicationCacheAgent::getApplicationCacheForFrame(ErrorString* errorString, const String& frameId, RefPtr<TypeBuilder::ApplicationCache::ApplicationCache>& applicationCache)
+void InspectorApplicationCacheAgent::getApplicationCacheForFrame(ErrorString* errorString, const String& frameId, RefPtr<Inspector::TypeBuilder::ApplicationCache::ApplicationCache>& applicationCache)
 {
     DocumentLoader* documentLoader = assertFrameWithDocumentLoader(errorString, frameId);
     if (!documentLoader)
@@ -149,9 +151,9 @@
     applicationCache = buildObjectForApplicationCache(resources, info);
 }
 
-PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCache> InspectorApplicationCacheAgent::buildObjectForApplicationCache(const ApplicationCacheHost::ResourceInfoList& applicationCacheResources, const ApplicationCacheHost::CacheInfo& applicationCacheInfo)
+PassRefPtr<Inspector::TypeBuilder::ApplicationCache::ApplicationCache> InspectorApplicationCacheAgent::buildObjectForApplicationCache(const ApplicationCacheHost::ResourceInfoList& applicationCacheResources, const ApplicationCacheHost::CacheInfo& applicationCacheInfo)
 {
-    return TypeBuilder::ApplicationCache::ApplicationCache::create()
+    return Inspector::TypeBuilder::ApplicationCache::ApplicationCache::create()
         .setManifestURL(applicationCacheInfo.m_manifest.string())
         .setSize(applicationCacheInfo.m_size)
         .setCreationTime(applicationCacheInfo.m_creationTime)
@@ -160,9 +162,9 @@
         .release();
 }
 
-PassRefPtr<TypeBuilder::Array<TypeBuilder::ApplicationCache::ApplicationCacheResource>> InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources(const ApplicationCacheHost::ResourceInfoList& applicationCacheResources)
+PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::ApplicationCache::ApplicationCacheResource>> InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources(const ApplicationCacheHost::ResourceInfoList& applicationCacheResources)
 {
-    RefPtr<TypeBuilder::Array<TypeBuilder::ApplicationCache::ApplicationCacheResource>> resources = TypeBuilder::Array<TypeBuilder::ApplicationCache::ApplicationCacheResource>::create();
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::ApplicationCache::ApplicationCacheResource>> resources = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::ApplicationCache::ApplicationCacheResource>::create();
 
     ApplicationCacheHost::ResourceInfoList::const_iterator end = applicationCacheResources.end();
     ApplicationCacheHost::ResourceInfoList::const_iterator it = applicationCacheResources.begin();
@@ -172,7 +174,7 @@
     return resources;
 }
 
-PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo& resourceInfo)
+PassRefPtr<Inspector::TypeBuilder::ApplicationCache::ApplicationCacheResource> InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo& resourceInfo)
 {
     String types;
     if (resourceInfo.m_isMaster)
@@ -190,7 +192,7 @@
     if (resourceInfo.m_isExplicit)
         types.append("Explicit ");
 
-    RefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> value = TypeBuilder::ApplicationCache::ApplicationCacheResource::create()
+    RefPtr<Inspector::TypeBuilder::ApplicationCache::ApplicationCacheResource> value = Inspector::TypeBuilder::ApplicationCache::ApplicationCacheResource::create()
         .setUrl(resourceInfo.m_resource.string())
         .setSize(static_cast<int>(resourceInfo.m_size))
         .setType(types);
diff --git a/Source/WebCore/inspector/InspectorApplicationCacheAgent.h b/Source/WebCore/inspector/InspectorApplicationCacheAgent.h
index eb06c8f..8211a36 100644
--- a/Source/WebCore/inspector/InspectorApplicationCacheAgent.h
+++ b/Source/WebCore/inspector/InspectorApplicationCacheAgent.h
@@ -28,27 +28,30 @@
 #if ENABLE(INSPECTOR)
 
 #include "ApplicationCacheHost.h"
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
 #include "InspectorFrontend.h"
+#include "InspectorWebAgentBase.h"
 #include <wtf/Noncopyable.h>
 #include <wtf/PassOwnPtr.h>
 
+namespace Inspector {
+class InspectorObject;
+class InspectorValue;
+}
+
 namespace WebCore {
 
 class Frame;
-class InspectorArray;
 class InspectorAgent;
 class InspectorApplicationCacheFrontendDispatcher;
-class InspectorObject;
 class InspectorPageAgent;
-class InspectorValue;
 class InstrumentingAgents;
 class Page;
 class ResourceResponse;
 
 typedef String ErrorString;
 
-class InspectorApplicationCacheAgent : public InspectorBaseAgent, public InspectorApplicationCacheBackendDispatcherHandler {
+class InspectorApplicationCacheAgent : public InspectorAgentBase, public InspectorApplicationCacheBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorApplicationCacheAgent); WTF_MAKE_FAST_ALLOCATED;
 public:
     static PassOwnPtr<InspectorApplicationCacheAgent> create(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent)
@@ -57,25 +60,22 @@
     }
     ~InspectorApplicationCacheAgent() { }
 
-    // InspectorBaseAgent
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
-    // InspectorInstrumentation API
     void updateApplicationCacheStatus(Frame*);
     void networkStateChanged();
 
-    // ApplicationCache API for InspectorFrontend
     virtual void enable(ErrorString*);
-    virtual void getFramesWithManifests(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::ApplicationCache::FrameWithManifest>>& result);
+    virtual void getFramesWithManifests(ErrorString*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::ApplicationCache::FrameWithManifest>>& result);
     virtual void getManifestForFrame(ErrorString*, const String& frameId, String* manifestURL);
-    virtual void getApplicationCacheForFrame(ErrorString*, const String& frameId, RefPtr<TypeBuilder::ApplicationCache::ApplicationCache>&);
+    virtual void getApplicationCacheForFrame(ErrorString*, const String& frameId, RefPtr<Inspector::TypeBuilder::ApplicationCache::ApplicationCache>&);
 
 private:
     InspectorApplicationCacheAgent(InstrumentingAgents*, InspectorPageAgent*);
-    PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCache> buildObjectForApplicationCache(const ApplicationCacheHost::ResourceInfoList&, const ApplicationCacheHost::CacheInfo&);
-    PassRefPtr<TypeBuilder::Array<TypeBuilder::ApplicationCache::ApplicationCacheResource>> buildArrayForApplicationCacheResources(const ApplicationCacheHost::ResourceInfoList&);
-    PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> buildObjectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo&);
+    PassRefPtr<Inspector::TypeBuilder::ApplicationCache::ApplicationCache> buildObjectForApplicationCache(const ApplicationCacheHost::ResourceInfoList&, const ApplicationCacheHost::CacheInfo&);
+    PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::ApplicationCache::ApplicationCacheResource>> buildArrayForApplicationCacheResources(const ApplicationCacheHost::ResourceInfoList&);
+    PassRefPtr<Inspector::TypeBuilder::ApplicationCache::ApplicationCacheResource> buildObjectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo&);
 
     DocumentLoader* assertFrameWithDocumentLoader(ErrorString*, String frameId);
 
diff --git a/Source/WebCore/inspector/InspectorBackendDispatcher.cpp b/Source/WebCore/inspector/InspectorBackendDispatcher.cpp
deleted file mode 100644
index bfa4c4b..0000000
--- a/Source/WebCore/inspector/InspectorBackendDispatcher.cpp
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * Copyright (C) 2013 Apple Inc. All Rights Reserved.
- * Copyright (C) 2011 The Chromium Authors. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "InspectorBackendDispatcher.h"
-
-#if ENABLE(INSPECTOR)
-
-#include "InspectorForwarding.h"
-#include "InspectorValues.h"
-#include <wtf/text/CString.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-InspectorBackendDispatcher::CallbackBase::CallbackBase(PassRefPtr<InspectorBackendDispatcher> backendDispatcher, int id)
-    : m_backendDispatcher(backendDispatcher)
-    , m_id(id)
-    , m_alreadySent(false)
-{
-}
-
-bool InspectorBackendDispatcher::CallbackBase::isActive() const
-{
-    return !m_alreadySent && m_backendDispatcher->isActive();
-}
-
-void InspectorBackendDispatcher::CallbackBase::sendFailure(const ErrorString& error)
-{
-    ASSERT(error.length());
-    sendIfActive(nullptr, error);
-}
-
-void InspectorBackendDispatcher::CallbackBase::sendIfActive(PassRefPtr<InspectorObject> partialMessage, const ErrorString& invocationError)
-{
-    if (m_alreadySent)
-        return;
-
-    m_backendDispatcher->sendResponse(m_id, partialMessage, invocationError);
-    m_alreadySent = true;
-}
-
-PassRefPtr<InspectorBackendDispatcher> InspectorBackendDispatcher::create(InspectorFrontendChannel* inspectorFrontendChannel)
-{
-    return adoptRef(new InspectorBackendDispatcher(inspectorFrontendChannel));
-}
-
-void InspectorBackendDispatcher::registerDispatcherForDomain(const String& domain, InspectorSupplementalBackendDispatcher* dispatcher)
-{
-    auto result = m_dispatchers.add(domain, dispatcher);
-    ASSERT_UNUSED(result, result.isNewEntry);
-}
-
-void InspectorBackendDispatcher::dispatch(const String& message)
-{
-    Ref<InspectorBackendDispatcher> protect(*this);
-
-    RefPtr<InspectorValue> parsedMessage = InspectorValue::parseJSON(message);
-    if (!parsedMessage) {
-        reportProtocolError(nullptr, ParseError, "Message must be in JSON format");
-        return;
-    }
-
-    RefPtr<InspectorObject> messageObject = parsedMessage->asObject();
-    if (!messageObject) {
-        reportProtocolError(nullptr, InvalidRequest, "Message must be a JSONified object");
-        return;
-    }
-
-    RefPtr<InspectorValue> callIdValue = messageObject->get("id");
-    if (!callIdValue) {
-        reportProtocolError(nullptr, InvalidRequest, "'id' property was not found");
-        return;
-    }
-
-    long callId = 0;
-    if (!callIdValue->asNumber(&callId)) {
-        reportProtocolError(nullptr, InvalidRequest, "The type of 'id' property must be number");
-        return;
-    }
-
-    RefPtr<InspectorValue> methodValue = messageObject->get("method");
-    if (!methodValue) {
-        reportProtocolError(&callId, InvalidRequest, "'method' property wasn't found");
-        return;
-    }
-
-    String method;
-    if (!methodValue->asString(&method)) {
-        reportProtocolError(&callId, InvalidRequest, "The type of 'method' property must be string");
-        return;
-    }
-
-    size_t position = method.find('.');
-    if (position == WTF::notFound) {
-        reportProtocolError(&callId, InvalidRequest, "The 'method' property was formatted incorrectly. It should be 'Domain.method'");
-        return;
-    }
-
-    String domain = method.substring(0, position);
-    InspectorSupplementalBackendDispatcher* domainDispatcher = m_dispatchers.get(domain);
-    if (!domainDispatcher) {
-        reportProtocolError(&callId, MethodNotFound, "'" + domain + "' domain was not found");
-        return;
-    }
-
-    String domainMethod = method.substring(position + 1);
-    domainDispatcher->dispatch(callId, domainMethod, messageObject.release());
-}
-
-void InspectorBackendDispatcher::sendResponse(long callId, PassRefPtr<InspectorObject> result, const ErrorString& invocationError)
-{
-    if (!m_inspectorFrontendChannel)
-        return;
-
-    if (invocationError.length()) {
-        reportProtocolError(&callId, ServerError, invocationError);
-        return;
-    }
-
-    RefPtr<InspectorObject> responseMessage = InspectorObject::create();
-    responseMessage->setObject(ASCIILiteral("result"), result);
-    responseMessage->setNumber(ASCIILiteral("id"), callId);
-    m_inspectorFrontendChannel->sendMessageToFrontend(responseMessage->toJSONString());
-}
-
-void InspectorBackendDispatcher::reportProtocolError(const long* const callId, CommonErrorCode errorCode, const String& errorMessage) const
-{
-    reportProtocolError(callId, errorCode, errorMessage, nullptr);
-}
-
-void InspectorBackendDispatcher::reportProtocolError(const long* const callId, CommonErrorCode errorCode, const String& errorMessage, PassRefPtr<InspectorArray> data) const
-{
-    static const int errorCodes[] = {
-        -32700, // ParseError
-        -32600, // InvalidRequest
-        -32601, // MethodNotFound
-        -32602, // InvalidParams
-        -32603, // InternalError
-        -32000, // ServerError
-    };
-
-    ASSERT(errorCode >= 0);
-    ASSERT((unsigned)errorCode < WTF_ARRAY_LENGTH(errorCodes));
-    ASSERT(errorCodes[errorCode]);
-
-    if (!m_inspectorFrontendChannel)
-        return;
-
-    RefPtr<InspectorObject> error = InspectorObject::create();
-    error->setNumber(ASCIILiteral("code"), errorCodes[errorCode]);
-    error->setString(ASCIILiteral("message"), errorMessage);
-    if (data)
-        error->setArray(ASCIILiteral("data"), data);
-
-    RefPtr<InspectorObject> message = InspectorObject::create();
-    message->setObject(ASCIILiteral("error"), error.release());
-    if (callId)
-        message->setNumber(ASCIILiteral("id"), *callId);
-    else
-        message->setValue(ASCIILiteral("id"), InspectorValue::null());
-
-    m_inspectorFrontendChannel->sendMessageToFrontend(message->toJSONString());
-}
-
-template<typename ReturnValueType, typename ValueType, typename DefaultValueType>
-ReturnValueType InspectorBackendDispatcher::getPropertyValue(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors, DefaultValueType defaultValue, bool (*asMethod)(InspectorValue*, ValueType*), const char* typeName)
-{
-    ASSERT(protocolErrors);
-
-    ValueType value = defaultValue;
-    if (valueFound)
-        *valueFound = false;
-
-    if (!object) {
-        if (!valueFound)
-            protocolErrors->pushString(String::format("'params' object must contain required parameter '%s' with type '%s'.", name.utf8().data(), typeName));
-        return value;
-    }
-
-    InspectorObject::const_iterator end = object->end();
-    InspectorObject::const_iterator valueIterator = object->find(name);
-    if (valueIterator == end) {
-        if (!valueFound)
-            protocolErrors->pushString(String::format("Parameter '%s' with type '%s' was not found.", name.utf8().data(), typeName));
-        return value;
-    }
-
-    if (!asMethod(valueIterator->value.get(), &value)) {
-        protocolErrors->pushString(String::format("Parameter '%s' has wrong type. It must be '%s'.", name.utf8().data(), typeName));
-        return value;
-    }
-
-    if (valueFound)
-        *valueFound = true;
-
-    return value;
-}
-
-struct AsMethodBridges {
-    static bool asInt(InspectorValue* value, int* output) { return value->asNumber(output); }
-    static bool asDouble(InspectorValue* value, double* output) { return value->asNumber(output); }
-    static bool asString(InspectorValue* value, String* output) { return value->asString(output); }
-    static bool asBoolean(InspectorValue* value, bool* output) { return value->asBoolean(output); }
-    static bool asObject(InspectorValue* value, RefPtr<InspectorObject>* output) { return value->asObject(output); }
-    static bool asArray(InspectorValue* value, RefPtr<InspectorArray>* output) { return value->asArray(output); }
-};
-
-int InspectorBackendDispatcher::getInt(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors)
-{
-    return getPropertyValue<int, int, int>(object, name, valueFound, protocolErrors, 0, AsMethodBridges::asInt, "Number");
-}
-
-double InspectorBackendDispatcher::getDouble(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors)
-{
-    return getPropertyValue<double, double, double>(object, name, valueFound, protocolErrors, 0, AsMethodBridges::asDouble, "Number");
-}
-
-String InspectorBackendDispatcher::getString(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors)
-{
-    return getPropertyValue<String, String, String>(object, name, valueFound, protocolErrors, "", AsMethodBridges::asString, "String");
-}
-
-bool InspectorBackendDispatcher::getBoolean(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors)
-{
-    return getPropertyValue<bool, bool, bool>(object, name, valueFound, protocolErrors, false, AsMethodBridges::asBoolean, "Boolean");
-}
-
-PassRefPtr<InspectorObject> InspectorBackendDispatcher::getObject(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors)
-{
-    return getPropertyValue<PassRefPtr<InspectorObject>, RefPtr<InspectorObject>, InspectorObject*>(object, name, valueFound, protocolErrors, nullptr, AsMethodBridges::asObject, "Object");
-}
-
-PassRefPtr<InspectorArray> InspectorBackendDispatcher::getArray(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors)
-{
-    return getPropertyValue<PassRefPtr<InspectorArray>, RefPtr<InspectorArray>, InspectorArray*>(object, name, valueFound, protocolErrors, nullptr, AsMethodBridges::asArray, "Array");
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INSPECTOR)
diff --git a/Source/WebCore/inspector/InspectorBackendDispatcher.h b/Source/WebCore/inspector/InspectorBackendDispatcher.h
deleted file mode 100644
index a6e4d2f..0000000
--- a/Source/WebCore/inspector/InspectorBackendDispatcher.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (C) 2013 Apple Inc. All Rights Reserved.
- * Copyright (C) 2011 The Chromium Authors. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef InspectorBackendDispatcher_h
-#define InspectorBackendDispatcher_h
-
-#include "InspectorTypeBuilder.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-class InspectorBackendDispatcher;
-class InspectorFrontendChannel;
-typedef String ErrorString;
-
-class InspectorSupplementalBackendDispatcher : public RefCounted<InspectorSupplementalBackendDispatcher> {
-public:
-    InspectorSupplementalBackendDispatcher(InspectorBackendDispatcher* backendDispatcher) : m_backendDispatcher(backendDispatcher) { }
-    virtual ~InspectorSupplementalBackendDispatcher() { }
-    virtual void dispatch(long callId, const String& method, PassRefPtr<InspectorObject> message) = 0;
-protected:
-    RefPtr<InspectorBackendDispatcher> m_backendDispatcher;
-};
-
-class InspectorBackendDispatcher : public RefCounted<InspectorBackendDispatcher> {
-public:
-    static PassRefPtr<InspectorBackendDispatcher> create(InspectorFrontendChannel*);
-    virtual ~InspectorBackendDispatcher() { }
-
-    class CallbackBase: public RefCounted<CallbackBase> {
-    public:
-        CallbackBase(PassRefPtr<InspectorBackendDispatcher>, int id);
-        virtual ~CallbackBase() { }
-
-        bool isActive() const;
-        void sendFailure(const ErrorString&);
-        void disable() { m_alreadySent = true; }
-
-    protected:
-        void sendIfActive(PassRefPtr<InspectorObject> partialMessage, const ErrorString& invocationError);
-
-    private:
-        RefPtr<InspectorBackendDispatcher> m_backendDispatcher;
-        int m_id;
-        bool m_alreadySent;
-    };
-
-    void clearFrontend() { m_inspectorFrontendChannel = nullptr; }
-    bool isActive() const { return !!m_inspectorFrontendChannel; }
-
-    enum CommonErrorCode {
-        ParseError = 0,
-        InvalidRequest,
-        MethodNotFound,
-        InvalidParams,
-        InternalError,
-        ServerError
-    };
-
-    void registerDispatcherForDomain(const String& domain, InspectorSupplementalBackendDispatcher*);
-    void dispatch(const String& message);
-    void sendResponse(long callId, PassRefPtr<InspectorObject> result, const ErrorString& invocationError);
-    void reportProtocolError(const long* const callId, CommonErrorCode, const String& errorMessage) const;
-    void reportProtocolError(const long* const callId, CommonErrorCode, const String& errorMessage, PassRefPtr<InspectorArray> data) const;
-
-    static int getInt(InspectorObject*, const String& name, bool* valueFound, InspectorArray* protocolErrors);
-    static double getDouble(InspectorObject*, const String& name, bool* valueFound, InspectorArray* protocolErrors);
-    static String getString(InspectorObject*, const String& name, bool* valueFound, InspectorArray* protocolErrors);
-    static bool getBoolean(InspectorObject*, const String& name, bool* valueFound, InspectorArray* protocolErrors);
-    static PassRefPtr<InspectorObject> getObject(InspectorObject*, const String& name, bool* valueFound, InspectorArray* protocolErrors);
-    static PassRefPtr<InspectorArray> getArray(InspectorObject*, const String& name, bool* valueFound, InspectorArray* protocolErrors);
-
-private:
-    InspectorBackendDispatcher(InspectorFrontendChannel* inspectorFrontendChannel) : m_inspectorFrontendChannel(inspectorFrontendChannel) { }
-
-    template<typename ReturnValueType, typename ValueType, typename DefaultValueType>
-    static ReturnValueType getPropertyValue(InspectorObject* object, const String& name, bool* valueFound, InspectorArray* protocolErrors, DefaultValueType defaultValue, bool (*asMethod)(InspectorValue*, ValueType*), const char* typeName);
-
-    InspectorFrontendChannel* m_inspectorFrontendChannel;
-    HashMap<String, InspectorSupplementalBackendDispatcher*> m_dispatchers;
-};
-
-} // namespace WebCore
-
-#endif // !defined(InspectorBackendDispatcher_h)
diff --git a/Source/WebCore/inspector/InspectorBaseAgent.h b/Source/WebCore/inspector/InspectorBaseAgent.h
deleted file mode 100644
index 8b90938..0000000
--- a/Source/WebCore/inspector/InspectorBaseAgent.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef InspectorBaseAgent_h
-#define InspectorBaseAgent_h
-
-#include "InspectorBackendDispatchers.h"
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-class InspectorFrontendChannel;
-class InstrumentingAgents;
-
-class InspectorBaseAgent {
-public:
-    virtual ~InspectorBaseAgent() { }
-
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) = 0;
-    virtual void willDestroyFrontendAndBackend() = 0;
-    virtual void discardAgent() { }
-
-protected:
-    InspectorBaseAgent(const String& name, InstrumentingAgents* instrumentingAgents)
-        : m_instrumentingAgents(instrumentingAgents)
-        , m_name(name)
-    {
-    }
-
-    InstrumentingAgents* m_instrumentingAgents;
-    String m_name;
-};
-
-} // namespace WebCore
-
-#endif // !defined(InspectorBaseAgent_h)
diff --git a/Source/WebCore/inspector/InspectorCSSAgent.cpp b/Source/WebCore/inspector/InspectorCSSAgent.cpp
index bb17c65..83c4237 100644
--- a/Source/WebCore/inspector/InspectorCSSAgent.cpp
+++ b/Source/WebCore/inspector/InspectorCSSAgent.cpp
@@ -43,8 +43,7 @@
 #include "HTMLStyleElement.h"
 #include "InspectorDOMAgent.h"
 #include "InspectorHistory.h"
-#include "InspectorTypeBuilder.h"
-#include "InspectorValues.h"
+#include "InspectorWebTypeBuilders.h"
 #include "InstrumentingAgents.h"
 #include "NamedFlowCollection.h"
 #include "Node.h"
@@ -57,7 +56,7 @@
 #include "StyleRule.h"
 #include "StyleSheetList.h"
 #include "WebKitNamedFlow.h"
-
+#include <inspector/InspectorValues.h>
 #include <wtf/CurrentTime.h>
 #include <wtf/HashSet.h>
 #include <wtf/Ref.h>
@@ -65,6 +64,8 @@
 #include <wtf/text/CString.h>
 #include <wtf/text/StringConcatenate.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 enum ForcePseudoClassFlags {
@@ -117,7 +118,7 @@
     void startSelector(const CSSStyleRule*);
     void commitSelector(bool);
     void commitSelectorTime();
-    PassRefPtr<TypeBuilder::CSS::SelectorProfile> toInspectorObject() const;
+    PassRefPtr<Inspector::TypeBuilder::CSS::SelectorProfile> toInspectorObject() const;
 
 private:
 
@@ -205,11 +206,11 @@
     it->value.totalTime += processingTimeMS;
 }
 
-PassRefPtr<TypeBuilder::CSS::SelectorProfile> SelectorProfile::toInspectorObject() const
+PassRefPtr<Inspector::TypeBuilder::CSS::SelectorProfile> SelectorProfile::toInspectorObject() const
 {
-    RefPtr<TypeBuilder::Array<TypeBuilder::CSS::SelectorProfileEntry>> selectorProfileData = TypeBuilder::Array<TypeBuilder::CSS::SelectorProfileEntry>::create();
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::SelectorProfileEntry>> selectorProfileData = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::SelectorProfileEntry>::create();
     for (RuleMatchingStatsMap::const_iterator it = m_ruleMatchingStats.begin(); it != m_ruleMatchingStats.end(); ++it) {
-        RefPtr<TypeBuilder::CSS::SelectorProfileEntry> entry = TypeBuilder::CSS::SelectorProfileEntry::create()
+        RefPtr<Inspector::TypeBuilder::CSS::SelectorProfileEntry> entry = Inspector::TypeBuilder::CSS::SelectorProfileEntry::create()
             .setSelector(it->value.selector)
             .setUrl(it->value.url)
             .setLineNumber(it->value.lineNumber)
@@ -219,7 +220,7 @@
         selectorProfileData->addItem(entry.release());
     }
 
-    RefPtr<TypeBuilder::CSS::SelectorProfile> result = TypeBuilder::CSS::SelectorProfile::create()
+    RefPtr<Inspector::TypeBuilder::CSS::SelectorProfile> result = Inspector::TypeBuilder::CSS::SelectorProfile::create()
         .setTotalTime(totalMatchingTimeMs())
         .setData(selectorProfileData);
     return result.release();
@@ -616,7 +617,7 @@
 }
 
 InspectorCSSAgent::InspectorCSSAgent(InstrumentingAgents* instrumentingAgents, InspectorDOMAgent* domAgent)
-    : InspectorBaseAgent(ASCIILiteral("CSS"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("CSS"), instrumentingAgents)
     , m_domAgent(domAgent)
     , m_lastStyleSheetId(1)
 {
@@ -629,7 +630,7 @@
     reset();
 }
 
-void InspectorCSSAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void InspectorCSSAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorCSSFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorCSSBackendDispatcher::create(backendDispatcher, this);
@@ -810,7 +811,7 @@
     }
 }
 
-void InspectorCSSAgent::getMatchedStylesForNode(ErrorString* errorString, int nodeId, const bool* includePseudo, const bool* includeInherited, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::RuleMatch>>& matchedCSSRules, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::PseudoIdMatches>>& pseudoIdMatches, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::InheritedStyleEntry>>& inheritedEntries)
+void InspectorCSSAgent::getMatchedStylesForNode(ErrorString* errorString, int nodeId, const bool* includePseudo, const bool* includeInherited, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::RuleMatch>>& matchedCSSRules, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::PseudoIdMatches>>& pseudoIdMatches, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::InheritedStyleEntry>>& inheritedEntries)
 {
     Element* element = elementForId(errorString, nodeId);
     if (!element)
@@ -823,11 +824,11 @@
 
     // Pseudo elements.
     if (!includePseudo || *includePseudo) {
-        RefPtr<TypeBuilder::Array<TypeBuilder::CSS::PseudoIdMatches>> pseudoElements = TypeBuilder::Array<TypeBuilder::CSS::PseudoIdMatches>::create();
+        RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::PseudoIdMatches>> pseudoElements = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::PseudoIdMatches>::create();
         for (PseudoId pseudoId = FIRST_PUBLIC_PSEUDOID; pseudoId < AFTER_LAST_INTERNAL_PSEUDOID; pseudoId = static_cast<PseudoId>(pseudoId + 1)) {
             Vector<RefPtr<StyleRuleBase>> matchedRules = styleResolver.pseudoStyleRulesForElement(element, pseudoId, StyleResolver::AllCSSRules);
             if (!matchedRules.isEmpty()) {
-                RefPtr<TypeBuilder::CSS::PseudoIdMatches> matches = TypeBuilder::CSS::PseudoIdMatches::create()
+                RefPtr<Inspector::TypeBuilder::CSS::PseudoIdMatches> matches = Inspector::TypeBuilder::CSS::PseudoIdMatches::create()
                     .setPseudoId(static_cast<int>(pseudoId))
                     .setMatches(buildArrayForMatchedRuleList(matchedRules, styleResolver, element));
                 pseudoElements->addItem(matches.release());
@@ -839,12 +840,12 @@
 
     // Inherited styles.
     if (!includeInherited || *includeInherited) {
-        RefPtr<TypeBuilder::Array<TypeBuilder::CSS::InheritedStyleEntry>> entries = TypeBuilder::Array<TypeBuilder::CSS::InheritedStyleEntry>::create();
+        RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::InheritedStyleEntry>> entries = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::InheritedStyleEntry>::create();
         Element* parentElement = element->parentElement();
         while (parentElement) {
             StyleResolver& parentStyleResolver = parentElement->document().ensureStyleResolver();
             Vector<RefPtr<StyleRuleBase>> parentMatchedRules = parentStyleResolver.styleRulesForElement(parentElement, StyleResolver::AllCSSRules);
-            RefPtr<TypeBuilder::CSS::InheritedStyleEntry> entry = TypeBuilder::CSS::InheritedStyleEntry::create()
+            RefPtr<Inspector::TypeBuilder::CSS::InheritedStyleEntry> entry = Inspector::TypeBuilder::CSS::InheritedStyleEntry::create()
                 .setMatchedCSSRules(buildArrayForMatchedRuleList(parentMatchedRules, styleResolver, parentElement));
             if (parentElement->style() && parentElement->style()->length()) {
                 InspectorStyleSheetForInlineStyle* styleSheet = asInspectorStyleSheet(parentElement);
@@ -860,7 +861,7 @@
     }
 }
 
-void InspectorCSSAgent::getInlineStylesForNode(ErrorString* errorString, int nodeId, RefPtr<TypeBuilder::CSS::CSSStyle>& inlineStyle, RefPtr<TypeBuilder::CSS::CSSStyle>& attributesStyle)
+void InspectorCSSAgent::getInlineStylesForNode(ErrorString* errorString, int nodeId, RefPtr<Inspector::TypeBuilder::CSS::CSSStyle>& inlineStyle, RefPtr<Inspector::TypeBuilder::CSS::CSSStyle>& attributesStyle)
 {
     Element* element = elementForId(errorString, nodeId);
     if (!element)
@@ -871,11 +872,11 @@
         return;
 
     inlineStyle = styleSheet->buildObjectForStyle(element->style());
-    RefPtr<TypeBuilder::CSS::CSSStyle> attributes = buildObjectForAttributesStyle(element);
+    RefPtr<Inspector::TypeBuilder::CSS::CSSStyle> attributes = buildObjectForAttributesStyle(element);
     attributesStyle = attributes ? attributes.release() : 0;
 }
 
-void InspectorCSSAgent::getComputedStyleForNode(ErrorString* errorString, int nodeId, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSComputedStyleProperty>>& style)
+void InspectorCSSAgent::getComputedStyleForNode(ErrorString* errorString, int nodeId, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSComputedStyleProperty>>& style)
 {
     Element* element = elementForId(errorString, nodeId);
     if (!element)
@@ -886,9 +887,9 @@
     style = inspectorStyle->buildArrayForComputedStyle();
 }
 
-void InspectorCSSAgent::getAllStyleSheets(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSStyleSheetHeader>>& styleInfos)
+void InspectorCSSAgent::getAllStyleSheets(ErrorString*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSStyleSheetHeader>>& styleInfos)
 {
-    styleInfos = TypeBuilder::Array<TypeBuilder::CSS::CSSStyleSheetHeader>::create();
+    styleInfos = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSStyleSheetHeader>::create();
     Vector<Document*> documents = m_domAgent->documents();
     for (Vector<Document*>::iterator it = documents.begin(); it != documents.end(); ++it) {
         StyleSheetList* list = (*it)->styleSheets();
@@ -900,7 +901,7 @@
     }
 }
 
-void InspectorCSSAgent::getStyleSheet(ErrorString* errorString, const String& styleSheetId, RefPtr<TypeBuilder::CSS::CSSStyleSheetBody>& styleSheetObject)
+void InspectorCSSAgent::getStyleSheet(ErrorString* errorString, const String& styleSheetId, RefPtr<Inspector::TypeBuilder::CSS::CSSStyleSheetBody>& styleSheetObject)
 {
     InspectorStyleSheet* inspectorStyleSheet = assertStyleSheetForId(errorString, styleSheetId);
     if (!inspectorStyleSheet)
@@ -929,7 +930,7 @@
     *errorString = InspectorDOMAgent::toErrorString(ec);
 }
 
-void InspectorCSSAgent::setStyleText(ErrorString* errorString, const RefPtr<InspectorObject>& fullStyleId, const String& text, RefPtr<TypeBuilder::CSS::CSSStyle>& result)
+void InspectorCSSAgent::setStyleText(ErrorString* errorString, const RefPtr<InspectorObject>& fullStyleId, const String& text, RefPtr<Inspector::TypeBuilder::CSS::CSSStyle>& result)
 {
     InspectorCSSId compoundId(fullStyleId);
     ASSERT(!compoundId.isEmpty());
@@ -945,7 +946,7 @@
     *errorString = InspectorDOMAgent::toErrorString(ec);
 }
 
-void InspectorCSSAgent::setPropertyText(ErrorString* errorString, const RefPtr<InspectorObject>& fullStyleId, int propertyIndex, const String& text, bool overwrite, RefPtr<TypeBuilder::CSS::CSSStyle>& result)
+void InspectorCSSAgent::setPropertyText(ErrorString* errorString, const RefPtr<InspectorObject>& fullStyleId, int propertyIndex, const String& text, bool overwrite, RefPtr<Inspector::TypeBuilder::CSS::CSSStyle>& result)
 {
     InspectorCSSId compoundId(fullStyleId);
     ASSERT(!compoundId.isEmpty());
@@ -961,7 +962,7 @@
     *errorString = InspectorDOMAgent::toErrorString(ec);
 }
 
-void InspectorCSSAgent::toggleProperty(ErrorString* errorString, const RefPtr<InspectorObject>& fullStyleId, int propertyIndex, bool disable, RefPtr<TypeBuilder::CSS::CSSStyle>& result)
+void InspectorCSSAgent::toggleProperty(ErrorString* errorString, const RefPtr<InspectorObject>& fullStyleId, int propertyIndex, bool disable, RefPtr<Inspector::TypeBuilder::CSS::CSSStyle>& result)
 {
     InspectorCSSId compoundId(fullStyleId);
     ASSERT(!compoundId.isEmpty());
@@ -977,7 +978,7 @@
     *errorString = InspectorDOMAgent::toErrorString(ec);
 }
 
-void InspectorCSSAgent::setRuleSelector(ErrorString* errorString, const RefPtr<InspectorObject>& fullRuleId, const String& selector, RefPtr<TypeBuilder::CSS::CSSRule>& result)
+void InspectorCSSAgent::setRuleSelector(ErrorString* errorString, const RefPtr<InspectorObject>& fullRuleId, const String& selector, RefPtr<Inspector::TypeBuilder::CSS::CSSRule>& result)
 {
     InspectorCSSId compoundId(fullRuleId);
     ASSERT(!compoundId.isEmpty());
@@ -994,7 +995,7 @@
     *errorString = InspectorDOMAgent::toErrorString(ec);
 }
 
-void InspectorCSSAgent::addRule(ErrorString* errorString, const int contextNodeId, const String& selector, RefPtr<TypeBuilder::CSS::CSSRule>& result)
+void InspectorCSSAgent::addRule(ErrorString* errorString, const int contextNodeId, const String& selector, RefPtr<Inspector::TypeBuilder::CSS::CSSRule>& result)
 {
     Node* node = m_domAgent->assertNode(errorString, contextNodeId);
     if (!node)
@@ -1020,12 +1021,12 @@
     result = inspectorStyleSheet->buildObjectForRule(rule);
 }
 
-void InspectorCSSAgent::getSupportedCSSProperties(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSPropertyInfo>>& cssProperties)
+void InspectorCSSAgent::getSupportedCSSProperties(ErrorString*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSPropertyInfo>>& cssProperties)
 {
-    RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSPropertyInfo>> properties = TypeBuilder::Array<TypeBuilder::CSS::CSSPropertyInfo>::create();
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSPropertyInfo>> properties = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSPropertyInfo>::create();
     for (int i = firstCSSProperty; i <= lastCSSProperty; ++i) {
         CSSPropertyID id = convertToCSSPropertyID(i);
-        RefPtr<TypeBuilder::CSS::CSSPropertyInfo> property = TypeBuilder::CSS::CSSPropertyInfo::create()
+        RefPtr<Inspector::TypeBuilder::CSS::CSSPropertyInfo> property = Inspector::TypeBuilder::CSS::CSSPropertyInfo::create()
             .setName(getPropertyNameString(id));
 
         const StylePropertyShorthand& shorthand = shorthandForProperty(id);
@@ -1033,7 +1034,7 @@
             properties->addItem(property.release());
             continue;
         }
-        RefPtr<TypeBuilder::Array<String>> longhands = TypeBuilder::Array<String>::create();
+        RefPtr<Inspector::TypeBuilder::Array<String>> longhands = Inspector::TypeBuilder::Array<String>::create();
         for (unsigned j = 0; j < shorthand.length(); ++j) {
             CSSPropertyID longhandID = shorthand.properties()[j];
             longhands->addItem(getPropertyNameString(longhandID));
@@ -1064,7 +1065,7 @@
     element->document().styleResolverChanged(RecalcStyleImmediately);
 }
 
-void InspectorCSSAgent::getNamedFlowCollection(ErrorString* errorString, int documentNodeId, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::NamedFlow>>& result)
+void InspectorCSSAgent::getNamedFlowCollection(ErrorString* errorString, int documentNodeId, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::NamedFlow>>& result)
 {
     Document* document = m_domAgent->assertDocument(errorString, documentNodeId);
     if (!document)
@@ -1073,7 +1074,7 @@
     m_namedFlowCollectionsRequested.add(documentNodeId);
 
     Vector<RefPtr<WebKitNamedFlow>> namedFlowsVector = document->namedFlows()->namedFlows();
-    RefPtr<TypeBuilder::Array<TypeBuilder::CSS::NamedFlow>> namedFlows = TypeBuilder::Array<TypeBuilder::CSS::NamedFlow>::create();
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::NamedFlow>> namedFlows = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::NamedFlow>::create();
 
     for (Vector<RefPtr<WebKitNamedFlow>>::iterator it = namedFlowsVector.begin(); it != namedFlowsVector.end(); ++it)
         namedFlows->addItem(buildObjectForNamedFlow(errorString, it->get(), documentNodeId));
@@ -1086,16 +1087,16 @@
     m_currentSelectorProfile = adoptPtr(new SelectorProfile());
 }
 
-void InspectorCSSAgent::stopSelectorProfiler(ErrorString* errorString, RefPtr<TypeBuilder::CSS::SelectorProfile>& result)
+void InspectorCSSAgent::stopSelectorProfiler(ErrorString* errorString, RefPtr<Inspector::TypeBuilder::CSS::SelectorProfile>& result)
 {
     result = stopSelectorProfilerImpl(errorString, true);
 }
 
-PassRefPtr<TypeBuilder::CSS::SelectorProfile> InspectorCSSAgent::stopSelectorProfilerImpl(ErrorString*, bool needProfile)
+PassRefPtr<Inspector::TypeBuilder::CSS::SelectorProfile> InspectorCSSAgent::stopSelectorProfilerImpl(ErrorString*, bool needProfile)
 {
     if (!m_currentSelectorProfile)
         return 0;
-    RefPtr<TypeBuilder::CSS::SelectorProfile> result;
+    RefPtr<Inspector::TypeBuilder::CSS::SelectorProfile> result;
     if (m_frontendDispatcher && needProfile)
         result = m_currentSelectorProfile->toInspectorObject();
     m_currentSelectorProfile.clear();
@@ -1136,7 +1137,7 @@
             return 0;
 
         String newStyleSheetId = String::number(m_lastStyleSheetId++);
-        RefPtr<InspectorStyleSheetForInlineStyle> inspectorStyleSheet = InspectorStyleSheetForInlineStyle::create(m_domAgent->pageAgent(), newStyleSheetId, element, TypeBuilder::CSS::StyleSheetOrigin::Regular, this);
+        RefPtr<InspectorStyleSheetForInlineStyle> inspectorStyleSheet = InspectorStyleSheetForInlineStyle::create(m_domAgent->pageAgent(), newStyleSheetId, element, Inspector::TypeBuilder::CSS::StyleSheetOrigin::Regular, this);
         m_idToInspectorStyleSheet.set(newStyleSheetId, inspectorStyleSheet);
         m_nodeToInspectorStyleSheet.set(element, inspectorStyleSheet);
         return inspectorStyleSheet.get();
@@ -1168,7 +1169,7 @@
     return documentNodeId;
 }
 
-void InspectorCSSAgent::collectStyleSheets(CSSStyleSheet* styleSheet, TypeBuilder::Array<TypeBuilder::CSS::CSSStyleSheetHeader>* result)
+void InspectorCSSAgent::collectStyleSheets(CSSStyleSheet* styleSheet, Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSStyleSheetHeader>* result)
 {
     InspectorStyleSheet* inspectorStyleSheet = bindStyleSheet(static_cast<CSSStyleSheet*>(styleSheet));
     result->addItem(inspectorStyleSheet->buildObjectForStyleSheetInfo());
@@ -1241,7 +1242,7 @@
         return 0;
 
     String id = String::number(m_lastStyleSheetId++);
-    inspectorStyleSheet = InspectorStyleSheet::create(m_domAgent->pageAgent(), id, cssStyleSheet, TypeBuilder::CSS::StyleSheetOrigin::Inspector, InspectorDOMAgent::documentURLString(document), this);
+    inspectorStyleSheet = InspectorStyleSheet::create(m_domAgent->pageAgent(), id, cssStyleSheet, Inspector::TypeBuilder::CSS::StyleSheetOrigin::Inspector, InspectorDOMAgent::documentURLString(document), this);
     m_idToInspectorStyleSheet.set(id, inspectorStyleSheet);
     m_cssStyleSheetToInspectorStyleSheet.set(cssStyleSheet, inspectorStyleSheet);
     m_documentToInspectorStyleSheet.set(document, inspectorStyleSheet);
@@ -1258,22 +1259,22 @@
     return it->value.get();
 }
 
-TypeBuilder::CSS::StyleSheetOrigin::Enum InspectorCSSAgent::detectOrigin(CSSStyleSheet* pageStyleSheet, Document* ownerDocument)
+Inspector::TypeBuilder::CSS::StyleSheetOrigin::Enum InspectorCSSAgent::detectOrigin(CSSStyleSheet* pageStyleSheet, Document* ownerDocument)
 {
-    TypeBuilder::CSS::StyleSheetOrigin::Enum origin = TypeBuilder::CSS::StyleSheetOrigin::Regular;
+    Inspector::TypeBuilder::CSS::StyleSheetOrigin::Enum origin = Inspector::TypeBuilder::CSS::StyleSheetOrigin::Regular;
     if (pageStyleSheet && !pageStyleSheet->ownerNode() && pageStyleSheet->href().isEmpty())
-        origin = TypeBuilder::CSS::StyleSheetOrigin::UserAgent;
+        origin = Inspector::TypeBuilder::CSS::StyleSheetOrigin::UserAgent;
     else if (pageStyleSheet && pageStyleSheet->ownerNode() && pageStyleSheet->ownerNode()->nodeName() == "#document")
-        origin = TypeBuilder::CSS::StyleSheetOrigin::User;
+        origin = Inspector::TypeBuilder::CSS::StyleSheetOrigin::User;
     else {
         InspectorStyleSheet* viaInspectorStyleSheetForOwner = viaInspectorStyleSheet(ownerDocument, false);
         if (viaInspectorStyleSheetForOwner && pageStyleSheet == viaInspectorStyleSheetForOwner->pageStyleSheet())
-            origin = TypeBuilder::CSS::StyleSheetOrigin::Inspector;
+            origin = Inspector::TypeBuilder::CSS::StyleSheetOrigin::Inspector;
     }
     return origin;
 }
 
-PassRefPtr<TypeBuilder::CSS::CSSRule> InspectorCSSAgent::buildObjectForRule(StyleRule* styleRule, StyleResolver& styleResolver)
+PassRefPtr<Inspector::TypeBuilder::CSS::CSSRule> InspectorCSSAgent::buildObjectForRule(StyleRule* styleRule, StyleResolver& styleResolver)
 {
     if (!styleRule)
         return 0;
@@ -1287,7 +1288,7 @@
     return inspectorStyleSheet ? inspectorStyleSheet->buildObjectForRule(cssomWrapper) : 0;
 }
 
-PassRefPtr<TypeBuilder::CSS::CSSRule> InspectorCSSAgent::buildObjectForRule(CSSStyleRule* rule)
+PassRefPtr<Inspector::TypeBuilder::CSS::CSSRule> InspectorCSSAgent::buildObjectForRule(CSSStyleRule* rule)
 {
     if (!rule)
         return 0;
@@ -1297,15 +1298,15 @@
     return inspectorStyleSheet ? inspectorStyleSheet->buildObjectForRule(rule) : 0;
 }
 
-PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSRule>> InspectorCSSAgent::buildArrayForRuleList(CSSRuleList* ruleList)
+PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSRule>> InspectorCSSAgent::buildArrayForRuleList(CSSRuleList* ruleList)
 {
-    RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSRule>> result = TypeBuilder::Array<TypeBuilder::CSS::CSSRule>::create();
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSRule>> result = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSRule>::create();
     if (!ruleList)
         return result.release();
 
     for (unsigned i = 0, size = ruleList->length(); i < size; ++i) {
         CSSStyleRule* rule = asCSSStyleRule(ruleList->item(i));
-        RefPtr<TypeBuilder::CSS::CSSRule> ruleObject = buildObjectForRule(rule);
+        RefPtr<Inspector::TypeBuilder::CSS::CSSRule> ruleObject = buildObjectForRule(rule);
         if (!ruleObject)
             continue;
         result->addItem(ruleObject);
@@ -1313,18 +1314,18 @@
     return result.release();
 }
 
-PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::RuleMatch>> InspectorCSSAgent::buildArrayForMatchedRuleList(const Vector<RefPtr<StyleRuleBase>>& matchedRules, StyleResolver& styleResolver, Element* element)
+PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::RuleMatch>> InspectorCSSAgent::buildArrayForMatchedRuleList(const Vector<RefPtr<StyleRuleBase>>& matchedRules, StyleResolver& styleResolver, Element* element)
 {
-    RefPtr<TypeBuilder::Array<TypeBuilder::CSS::RuleMatch>> result = TypeBuilder::Array<TypeBuilder::CSS::RuleMatch>::create();
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::RuleMatch>> result = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::RuleMatch>::create();
 
     for (unsigned i = 0; i < matchedRules.size(); ++i) {
         if (!matchedRules[i]->isStyleRule())
             continue;
         StyleRule* matchedStyleRule = static_cast<StyleRule*>(matchedRules[i].get());
-        RefPtr<TypeBuilder::CSS::CSSRule> ruleObject = buildObjectForRule(matchedStyleRule, styleResolver);
+        RefPtr<Inspector::TypeBuilder::CSS::CSSRule> ruleObject = buildObjectForRule(matchedStyleRule, styleResolver);
         if (!ruleObject)
             continue;
-        RefPtr<TypeBuilder::Array<int>> matchingSelectors = TypeBuilder::Array<int>::create();
+        RefPtr<Inspector::TypeBuilder::Array<int>> matchingSelectors = Inspector::TypeBuilder::Array<int>::create();
         const CSSSelectorList& selectorList = matchedStyleRule->selectorList();
         long index = 0;
         for (const CSSSelector* selector = selectorList.first(); selector; selector = CSSSelectorList::next(selector)) {
@@ -1333,7 +1334,7 @@
                 matchingSelectors->addItem(index);
             ++index;
         }
-        RefPtr<TypeBuilder::CSS::RuleMatch> match = TypeBuilder::CSS::RuleMatch::create()
+        RefPtr<Inspector::TypeBuilder::CSS::RuleMatch> match = Inspector::TypeBuilder::CSS::RuleMatch::create()
             .setRule(ruleObject)
             .setMatchingSelectors(matchingSelectors);
         result->addItem(match);
@@ -1342,7 +1343,7 @@
     return result.release();
 }
 
-PassRefPtr<TypeBuilder::CSS::CSSStyle> InspectorCSSAgent::buildObjectForAttributesStyle(Element* element)
+PassRefPtr<Inspector::TypeBuilder::CSS::CSSStyle> InspectorCSSAgent::buildObjectForAttributesStyle(Element* element)
 {
     if (!element->isStyledElement())
         return 0;
@@ -1359,22 +1360,22 @@
     return inspectorStyle->buildObjectForStyle();
 }
 
-PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::Region>> InspectorCSSAgent::buildArrayForRegions(ErrorString* errorString, PassRefPtr<NodeList> regionList, int documentNodeId)
+PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::Region>> InspectorCSSAgent::buildArrayForRegions(ErrorString* errorString, PassRefPtr<NodeList> regionList, int documentNodeId)
 {
-    RefPtr<TypeBuilder::Array<TypeBuilder::CSS::Region>> regions = TypeBuilder::Array<TypeBuilder::CSS::Region>::create();
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::Region>> regions = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::Region>::create();
 
     for (unsigned i = 0; i < regionList->length(); ++i) {
-        TypeBuilder::CSS::Region::RegionOverset::Enum regionOverset;
+        Inspector::TypeBuilder::CSS::Region::RegionOverset::Enum regionOverset;
 
         switch (toElement(regionList->item(i))->renderRegion()->regionOversetState()) {
         case RegionFit:
-            regionOverset = TypeBuilder::CSS::Region::RegionOverset::Fit;
+            regionOverset = Inspector::TypeBuilder::CSS::Region::RegionOverset::Fit;
             break;
         case RegionEmpty:
-            regionOverset = TypeBuilder::CSS::Region::RegionOverset::Empty;
+            regionOverset = Inspector::TypeBuilder::CSS::Region::RegionOverset::Empty;
             break;
         case RegionOverset:
-            regionOverset = TypeBuilder::CSS::Region::RegionOverset::Overset;
+            regionOverset = Inspector::TypeBuilder::CSS::Region::RegionOverset::Overset;
             break;
         case RegionUndefined:
             continue;
@@ -1383,7 +1384,7 @@
             continue;
         }
 
-        RefPtr<TypeBuilder::CSS::Region> region = TypeBuilder::CSS::Region::create()
+        RefPtr<Inspector::TypeBuilder::CSS::Region> region = Inspector::TypeBuilder::CSS::Region::create()
             .setRegionOverset(regionOverset)
             // documentNodeId was previously asserted
             .setNodeId(m_domAgent->pushNodeToFrontend(errorString, documentNodeId, regionList->item(i)));
@@ -1394,17 +1395,17 @@
     return regions.release();
 }
 
-PassRefPtr<TypeBuilder::CSS::NamedFlow> InspectorCSSAgent::buildObjectForNamedFlow(ErrorString* errorString, WebKitNamedFlow* webkitNamedFlow, int documentNodeId)
+PassRefPtr<Inspector::TypeBuilder::CSS::NamedFlow> InspectorCSSAgent::buildObjectForNamedFlow(ErrorString* errorString, WebKitNamedFlow* webkitNamedFlow, int documentNodeId)
 {
     RefPtr<NodeList> contentList = webkitNamedFlow->getContent();
-    RefPtr<TypeBuilder::Array<int>> content = TypeBuilder::Array<int>::create();
+    RefPtr<Inspector::TypeBuilder::Array<int>> content = Inspector::TypeBuilder::Array<int>::create();
 
     for (unsigned i = 0; i < contentList->length(); ++i) {
         // documentNodeId was previously asserted
         content->addItem(m_domAgent->pushNodeToFrontend(errorString, documentNodeId, contentList->item(i)));
     }
 
-    RefPtr<TypeBuilder::CSS::NamedFlow> namedFlow = TypeBuilder::CSS::NamedFlow::create()
+    RefPtr<Inspector::TypeBuilder::CSS::NamedFlow> namedFlow = Inspector::TypeBuilder::CSS::NamedFlow::create()
         .setDocumentNodeId(documentNodeId)
         .setName(webkitNamedFlow->name().string())
         .setOverset(webkitNamedFlow->overset())
diff --git a/Source/WebCore/inspector/InspectorCSSAgent.h b/Source/WebCore/inspector/InspectorCSSAgent.h
index 9d3b40d..a16fec8 100644
--- a/Source/WebCore/inspector/InspectorCSSAgent.h
+++ b/Source/WebCore/inspector/InspectorCSSAgent.h
@@ -27,12 +27,12 @@
 
 #include "CSSSelector.h"
 #include "ContentSecurityPolicy.h"
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
 #include "InspectorDOMAgent.h"
 #include "InspectorStyleSheet.h"
-#include "InspectorValues.h"
+#include "InspectorWebAgentBase.h"
 #include "SecurityContext.h"
-
+#include <inspector/InspectorValues.h>
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
 #include <wtf/PassRefPtr.h>
@@ -64,7 +64,7 @@
 #if ENABLE(INSPECTOR)
 
 class InspectorCSSAgent
-    : public InspectorBaseAgent
+    : public InspectorAgentBase
     , public InspectorDOMAgent::DOMListener
     , public InspectorCSSBackendDispatcherHandler
     , public InspectorStyleSheet::Listener {
@@ -96,7 +96,7 @@
     ~InspectorCSSAgent();
 
     bool forcePseudoState(Element*, CSSSelector::PseudoType);
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
     virtual void discardAgent();
     virtual void enable(ErrorString*);
@@ -112,26 +112,26 @@
     void didRegisterNamedFlowContentElement(Document*, WebKitNamedFlow*, Node* contentElement, Node* nextContentElement = nullptr);
     void didUnregisterNamedFlowContentElement(Document*, WebKitNamedFlow*, Node* contentElement);
 
-    virtual void getComputedStyleForNode(ErrorString*, int nodeId, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSComputedStyleProperty>>&);
-    virtual void getInlineStylesForNode(ErrorString*, int nodeId, RefPtr<TypeBuilder::CSS::CSSStyle>& inlineStyle, RefPtr<TypeBuilder::CSS::CSSStyle>& attributes);
-    virtual void getMatchedStylesForNode(ErrorString*, int nodeId, const bool* includePseudo, const bool* includeInherited, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::RuleMatch>>& matchedCSSRules, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::PseudoIdMatches>>& pseudoIdMatches, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::InheritedStyleEntry>>& inheritedEntries);
-    virtual void getAllStyleSheets(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSStyleSheetHeader>>& styleSheetInfos);
-    virtual void getStyleSheet(ErrorString*, const String& styleSheetId, RefPtr<TypeBuilder::CSS::CSSStyleSheetBody>& result);
+    virtual void getComputedStyleForNode(ErrorString*, int nodeId, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSComputedStyleProperty>>&);
+    virtual void getInlineStylesForNode(ErrorString*, int nodeId, RefPtr<Inspector::TypeBuilder::CSS::CSSStyle>& inlineStyle, RefPtr<Inspector::TypeBuilder::CSS::CSSStyle>& attributes);
+    virtual void getMatchedStylesForNode(ErrorString*, int nodeId, const bool* includePseudo, const bool* includeInherited, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::RuleMatch>>& matchedCSSRules, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::PseudoIdMatches>>& pseudoIdMatches, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::InheritedStyleEntry>>& inheritedEntries);
+    virtual void getAllStyleSheets(ErrorString*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSStyleSheetHeader>>& styleSheetInfos);
+    virtual void getStyleSheet(ErrorString*, const String& styleSheetId, RefPtr<Inspector::TypeBuilder::CSS::CSSStyleSheetBody>& result);
     virtual void getStyleSheetText(ErrorString*, const String& styleSheetId, String* result);
     virtual void setStyleSheetText(ErrorString*, const String& styleSheetId, const String& text);
-    virtual void setStyleText(ErrorString*, const RefPtr<InspectorObject>& styleId, const String& text, RefPtr<TypeBuilder::CSS::CSSStyle>& result);
-    virtual void setPropertyText(ErrorString*, const RefPtr<InspectorObject>& styleId, int propertyIndex, const String& text, bool overwrite, RefPtr<TypeBuilder::CSS::CSSStyle>& result);
-    virtual void toggleProperty(ErrorString*, const RefPtr<InspectorObject>& styleId, int propertyIndex, bool disable, RefPtr<TypeBuilder::CSS::CSSStyle>& result);
-    virtual void setRuleSelector(ErrorString*, const RefPtr<InspectorObject>& ruleId, const String& selector, RefPtr<TypeBuilder::CSS::CSSRule>& result);
-    virtual void addRule(ErrorString*, int contextNodeId, const String& selector, RefPtr<TypeBuilder::CSS::CSSRule>& result);
-    virtual void getSupportedCSSProperties(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSPropertyInfo>>& result);
-    virtual void forcePseudoState(ErrorString*, int nodeId, const RefPtr<InspectorArray>& forcedPseudoClasses);
-    virtual void getNamedFlowCollection(ErrorString*, int documentNodeId, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::NamedFlow>>& result);
+    virtual void setStyleText(ErrorString*, const RefPtr<Inspector::InspectorObject>& styleId, const String& text, RefPtr<Inspector::TypeBuilder::CSS::CSSStyle>& result);
+    virtual void setPropertyText(ErrorString*, const RefPtr<Inspector::InspectorObject>& styleId, int propertyIndex, const String& text, bool overwrite, RefPtr<Inspector::TypeBuilder::CSS::CSSStyle>& result);
+    virtual void toggleProperty(ErrorString*, const RefPtr<Inspector::InspectorObject>& styleId, int propertyIndex, bool disable, RefPtr<Inspector::TypeBuilder::CSS::CSSStyle>& result);
+    virtual void setRuleSelector(ErrorString*, const RefPtr<Inspector::InspectorObject>& ruleId, const String& selector, RefPtr<Inspector::TypeBuilder::CSS::CSSRule>& result);
+    virtual void addRule(ErrorString*, int contextNodeId, const String& selector, RefPtr<Inspector::TypeBuilder::CSS::CSSRule>& result);
+    virtual void getSupportedCSSProperties(ErrorString*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSPropertyInfo>>& result);
+    virtual void forcePseudoState(ErrorString*, int nodeId, const RefPtr<Inspector::InspectorArray>& forcedPseudoClasses);
+    virtual void getNamedFlowCollection(ErrorString*, int documentNodeId, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::NamedFlow>>& result);
 
     virtual void startSelectorProfiler(ErrorString*);
-    virtual void stopSelectorProfiler(ErrorString*, RefPtr<TypeBuilder::CSS::SelectorProfile>&);
+    virtual void stopSelectorProfiler(ErrorString*, RefPtr<Inspector::TypeBuilder::CSS::SelectorProfile>&);
 
-    PassRefPtr<TypeBuilder::CSS::SelectorProfile> stopSelectorProfilerImpl(ErrorString*, bool needProfile);
+    PassRefPtr<Inspector::TypeBuilder::CSS::SelectorProfile> stopSelectorProfilerImpl(ErrorString*, bool needProfile);
     void willMatchRule(StyleRule*, InspectorCSSOMWrappers&, DocumentStyleSheetCollection&);
     void didMatchRule(bool);
     void willProcessRule(StyleRule*, StyleResolver&);
@@ -158,20 +158,20 @@
     InspectorStyleSheetForInlineStyle* asInspectorStyleSheet(Element* element);
     Element* elementForId(ErrorString*, int nodeId);
     int documentNodeWithRequestedFlowsId(Document*);
-    void collectStyleSheets(CSSStyleSheet*, TypeBuilder::Array<WebCore::TypeBuilder::CSS::CSSStyleSheetHeader>*);
+    void collectStyleSheets(CSSStyleSheet*, Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSStyleSheetHeader>*);
 
     InspectorStyleSheet* bindStyleSheet(CSSStyleSheet*);
     InspectorStyleSheet* viaInspectorStyleSheet(Document*, bool createIfAbsent);
     InspectorStyleSheet* assertStyleSheetForId(ErrorString*, const String&);
-    TypeBuilder::CSS::StyleSheetOrigin::Enum detectOrigin(CSSStyleSheet* pageStyleSheet, Document* ownerDocument);
+    Inspector::TypeBuilder::CSS::StyleSheetOrigin::Enum detectOrigin(CSSStyleSheet* pageStyleSheet, Document* ownerDocument);
 
-    PassRefPtr<TypeBuilder::CSS::CSSRule> buildObjectForRule(StyleRule*, StyleResolver&);
-    PassRefPtr<TypeBuilder::CSS::CSSRule> buildObjectForRule(CSSStyleRule*);
-    PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSRule>> buildArrayForRuleList(CSSRuleList*);
-    PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::RuleMatch>> buildArrayForMatchedRuleList(const Vector<RefPtr<StyleRuleBase>>&, StyleResolver&, Element*);
-    PassRefPtr<TypeBuilder::CSS::CSSStyle> buildObjectForAttributesStyle(Element*);
-    PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::Region>> buildArrayForRegions(ErrorString*, PassRefPtr<NodeList>, int documentNodeId);
-    PassRefPtr<TypeBuilder::CSS::NamedFlow> buildObjectForNamedFlow(ErrorString*, WebKitNamedFlow*, int documentNodeId);
+    PassRefPtr<Inspector::TypeBuilder::CSS::CSSRule> buildObjectForRule(StyleRule*, StyleResolver&);
+    PassRefPtr<Inspector::TypeBuilder::CSS::CSSRule> buildObjectForRule(CSSStyleRule*);
+    PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSRule>> buildArrayForRuleList(CSSRuleList*);
+    PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::RuleMatch>> buildArrayForMatchedRuleList(const Vector<RefPtr<StyleRuleBase>>&, StyleResolver&, Element*);
+    PassRefPtr<Inspector::TypeBuilder::CSS::CSSStyle> buildObjectForAttributesStyle(Element*);
+    PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::Region>> buildArrayForRegions(ErrorString*, PassRefPtr<NodeList>, int documentNodeId);
+    PassRefPtr<Inspector::TypeBuilder::CSS::NamedFlow> buildObjectForNamedFlow(ErrorString*, WebKitNamedFlow*, int documentNodeId);
 
     // InspectorDOMAgent::DOMListener implementation
     virtual void didRemoveDocument(Document*);
diff --git a/Source/WebCore/inspector/InspectorCanvasAgent.cpp b/Source/WebCore/inspector/InspectorCanvasAgent.cpp
index f9f72f2..9430995 100644
--- a/Source/WebCore/inspector/InspectorCanvasAgent.cpp
+++ b/Source/WebCore/inspector/InspectorCanvasAgent.cpp
@@ -47,22 +47,24 @@
 #include "MainFrame.h"
 #include "NodeList.h"
 #include "Page.h"
-#include "ScriptObject.h"
 #include "ScriptProfiler.h"
 #include "ScriptState.h"
+#include <bindings/ScriptObject.h>
 
-using WebCore::TypeBuilder::Array;
-using WebCore::TypeBuilder::Canvas::ResourceId;
-using WebCore::TypeBuilder::Canvas::ResourceInfo;
-using WebCore::TypeBuilder::Canvas::ResourceState;
-using WebCore::TypeBuilder::Canvas::TraceLog;
-using WebCore::TypeBuilder::Canvas::TraceLogId;
-using WebCore::TypeBuilder::Network::FrameId;
+using Inspector::TypeBuilder::Array;
+using Inspector::TypeBuilder::Canvas::ResourceId;
+using Inspector::TypeBuilder::Canvas::ResourceInfo;
+using Inspector::TypeBuilder::Canvas::ResourceState;
+using Inspector::TypeBuilder::Canvas::TraceLog;
+using Inspector::TypeBuilder::Canvas::TraceLogId;
+using Inspector::TypeBuilder::Network::FrameId;
+
+using namespace Inspector;
 
 namespace WebCore {
 
 InspectorCanvasAgent::InspectorCanvasAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager)
-    : InspectorBaseAgent(ASCIILiteral("Canvas"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("Canvas"), instrumentingAgents)
     , m_pageAgent(pageAgent)
     , m_injectedScriptManager(injectedScriptManager)
     , m_enabled(false)
@@ -73,7 +75,7 @@
 {
 }
 
-void InspectorCanvasAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void InspectorCanvasAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorCanvasFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorCanvasBackendDispatcher::create(backendDispatcher, this);
@@ -178,27 +180,27 @@
         module.resourceState(errorString, traceLogId, resourceId, &result);
 }
 
-ScriptObject InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation(const ScriptObject& context)
+Deprecated::ScriptObject InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation(const Deprecated::ScriptObject& context)
 {
     ErrorString error;
     InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, context);
     if (module.hasNoValue())
-        return ScriptObject();
+        return Deprecated::ScriptObject();
     return notifyRenderingContextWasWrapped(module.wrapCanvas2DContext(context));
 }
 
 #if ENABLE(WEBGL)
-ScriptObject InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation(const ScriptObject& glContext)
+Deprecated::ScriptObject InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation(const Deprecated::ScriptObject& glContext)
 {
     ErrorString error;
     InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, glContext);
     if (module.hasNoValue())
-        return ScriptObject();
+        return Deprecated::ScriptObject();
     return notifyRenderingContextWasWrapped(module.wrapWebGLContext(glContext));
 }
 #endif
 
-ScriptObject InspectorCanvasAgent::notifyRenderingContextWasWrapped(const ScriptObject& wrappedContext)
+Deprecated::ScriptObject InspectorCanvasAgent::notifyRenderingContextWasWrapped(const Deprecated::ScriptObject& wrappedContext)
 {
     ASSERT(m_frontendDispatcher);
     JSC::ExecState* scriptState = wrappedContext.scriptState();
@@ -224,13 +226,13 @@
     return module;
 }
 
-InjectedScriptCanvasModule InspectorCanvasAgent::injectedScriptCanvasModule(ErrorString* errorString, const ScriptObject& scriptObject)
+InjectedScriptCanvasModule InspectorCanvasAgent::injectedScriptCanvasModule(ErrorString* errorString, const Deprecated::ScriptObject& scriptObject)
 {
     if (!checkIsEnabled(errorString))
         return InjectedScriptCanvasModule();
     if (scriptObject.hasNoValue()) {
         ASSERT_NOT_REACHED();
-        *errorString = "Internal error: original ScriptObject has no value";
+        *errorString = "Internal error: original Deprecated::ScriptObject has no value";
         return InjectedScriptCanvasModule();
     }
     return injectedScriptCanvasModule(errorString, scriptObject.scriptState());
diff --git a/Source/WebCore/inspector/InspectorCanvasAgent.h b/Source/WebCore/inspector/InspectorCanvasAgent.h
index 49d03e8..27d3edc 100644
--- a/Source/WebCore/inspector/InspectorCanvasAgent.h
+++ b/Source/WebCore/inspector/InspectorCanvasAgent.h
@@ -33,15 +33,20 @@
 
 #if ENABLE(INSPECTOR)
 
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
 #include "InspectorFrontend.h"
-#include "InspectorTypeBuilder.h"
+#include "InspectorWebAgentBase.h"
+#include "InspectorWebTypeBuilders.h"
 #include "ScriptState.h"
 #include <wtf/HashMap.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/text/WTFString.h>
 
+namespace Deprecated {
+class ScriptObject;
+}
+
 namespace WebCore {
 
 class Frame;
@@ -49,11 +54,10 @@
 class InjectedScriptManager;
 class InspectorPageAgent;
 class InstrumentingAgents;
-class ScriptObject;
 
 typedef String ErrorString;
 
-class InspectorCanvasAgent : public InspectorBaseAgent, public InspectorCanvasBackendDispatcherHandler {
+class InspectorCanvasAgent : public InspectorAgentBase, public InspectorCanvasBackendDispatcherHandler {
 public:
     static PassOwnPtr<InspectorCanvasAgent> create(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager)
     {
@@ -61,7 +65,7 @@
     }
     ~InspectorCanvasAgent();
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     void frameNavigated(Frame*);
@@ -69,34 +73,34 @@
     void didBeginFrame();
 
     // Called from InspectorCanvasInstrumentation.
-    ScriptObject wrapCanvas2DRenderingContextForInstrumentation(const ScriptObject&);
+    Deprecated::ScriptObject wrapCanvas2DRenderingContextForInstrumentation(const Deprecated::ScriptObject&);
 #if ENABLE(WEBGL)
-    ScriptObject wrapWebGLRenderingContextForInstrumentation(const ScriptObject&);
+    Deprecated::ScriptObject wrapWebGLRenderingContextForInstrumentation(const Deprecated::ScriptObject&);
 #endif
 
     // Called from the front-end.
     virtual void enable(ErrorString*);
     virtual void disable(ErrorString*);
-    virtual void dropTraceLog(ErrorString*, const TypeBuilder::Canvas::TraceLogId&);
+    virtual void dropTraceLog(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&);
     virtual void hasUninstrumentedCanvases(ErrorString*, bool*);
-    virtual void captureFrame(ErrorString*, const TypeBuilder::Network::FrameId*, TypeBuilder::Canvas::TraceLogId*);
-    virtual void startCapturing(ErrorString*, const TypeBuilder::Network::FrameId*, TypeBuilder::Canvas::TraceLogId*);
-    virtual void stopCapturing(ErrorString*, const TypeBuilder::Canvas::TraceLogId&);
-    virtual void getTraceLog(ErrorString*, const TypeBuilder::Canvas::TraceLogId&, const int*, const int*, RefPtr<TypeBuilder::Canvas::TraceLog>&);
-    virtual void replayTraceLog(ErrorString*, const TypeBuilder::Canvas::TraceLogId&, int, RefPtr<TypeBuilder::Canvas::ResourceState>&);
-    virtual void getResourceInfo(ErrorString*, const TypeBuilder::Canvas::ResourceId&, RefPtr<TypeBuilder::Canvas::ResourceInfo>&);
-    virtual void getResourceState(ErrorString*, const TypeBuilder::Canvas::TraceLogId&, const TypeBuilder::Canvas::ResourceId&, RefPtr<TypeBuilder::Canvas::ResourceState>&);
+    virtual void captureFrame(ErrorString*, const Inspector::TypeBuilder::Network::FrameId*, Inspector::TypeBuilder::Canvas::TraceLogId*);
+    virtual void startCapturing(ErrorString*, const Inspector::TypeBuilder::Network::FrameId*, Inspector::TypeBuilder::Canvas::TraceLogId*);
+    virtual void stopCapturing(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&);
+    virtual void getTraceLog(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&, const int*, const int*, RefPtr<Inspector::TypeBuilder::Canvas::TraceLog>&);
+    virtual void replayTraceLog(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&, int, RefPtr<Inspector::TypeBuilder::Canvas::ResourceState>&);
+    virtual void getResourceInfo(ErrorString*, const Inspector::TypeBuilder::Canvas::ResourceId&, RefPtr<Inspector::TypeBuilder::Canvas::ResourceInfo>&);
+    virtual void getResourceState(ErrorString*, const Inspector::TypeBuilder::Canvas::TraceLogId&, const Inspector::TypeBuilder::Canvas::ResourceId&, RefPtr<Inspector::TypeBuilder::Canvas::ResourceState>&);
 
 private:
     InspectorCanvasAgent(InstrumentingAgents*, InspectorPageAgent*, InjectedScriptManager*);
 
     InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, JSC::ExecState*);
-    InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, const ScriptObject&);
+    InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, const Deprecated::ScriptObject&);
     InjectedScriptCanvasModule injectedScriptCanvasModule(ErrorString*, const String&);
 
     void findFramesWithUninstrumentedCanvases();
     bool checkIsEnabled(ErrorString*) const;
-    ScriptObject notifyRenderingContextWasWrapped(const ScriptObject&);
+    Deprecated::ScriptObject notifyRenderingContextWasWrapped(const Deprecated::ScriptObject&);
 
     InspectorPageAgent* m_pageAgent;
     InjectedScriptManager* m_injectedScriptManager;
diff --git a/Source/WebCore/inspector/InspectorCanvasInstrumentation.h b/Source/WebCore/inspector/InspectorCanvasInstrumentation.h
index d3fda60..0150c92 100644
--- a/Source/WebCore/inspector/InspectorCanvasInstrumentation.h
+++ b/Source/WebCore/inspector/InspectorCanvasInstrumentation.h
@@ -34,11 +34,11 @@
 #include "InspectorCanvasAgent.h"
 #include "InspectorInstrumentation.h"
 #include "InstrumentingAgents.h"
-#include "ScriptObject.h"
+#include <bindings/ScriptObject.h>
 
 namespace WebCore {
 
-ScriptObject InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation(Document* document, const ScriptObject& context)
+Deprecated::ScriptObject InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation(Document* document, const Deprecated::ScriptObject& context)
 {
 #if ENABLE(INSPECTOR)
     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document)) {
@@ -49,11 +49,11 @@
     UNUSED_PARAM(document);
     UNUSED_PARAM(context);
 #endif
-    return ScriptObject();
+    return Deprecated::ScriptObject();
 }
 
 #if ENABLE(WEBGL)
-ScriptObject InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation(Document* document, const ScriptObject& glContext)
+Deprecated::ScriptObject InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation(Document* document, const Deprecated::ScriptObject& glContext)
 {
 #if ENABLE(INSPECTOR)
     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document)) {
@@ -64,7 +64,7 @@
     UNUSED_PARAM(document);
     UNUSED_PARAM(glContext);
 #endif
-    return ScriptObject();
+    return Deprecated::ScriptObject();
 }
 #endif // ENABLE(WEBGL)
 
diff --git a/Source/WebCore/inspector/InspectorClient.cpp b/Source/WebCore/inspector/InspectorClient.cpp
index c672142..c33e6ac 100644
--- a/Source/WebCore/inspector/InspectorClient.cpp
+++ b/Source/WebCore/inspector/InspectorClient.cpp
@@ -38,7 +38,9 @@
 #include "Page.h"
 #include "ScriptController.h"
 #include "ScriptSourceCode.h"
-#include "ScriptValue.h"
+#include <bindings/ScriptValue.h>
+
+using namespace Inspector;
 
 namespace WebCore {
 
diff --git a/Source/WebCore/inspector/InspectorClient.h b/Source/WebCore/inspector/InspectorClient.h
index 44e7ea16a..df389d4 100644
--- a/Source/WebCore/inspector/InspectorClient.h
+++ b/Source/WebCore/inspector/InspectorClient.h
@@ -27,6 +27,7 @@
 #ifndef InspectorClient_h
 #define InspectorClient_h
 
+#include "InspectorForwarding.h"
 #include <wtf/Forward.h>
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
@@ -34,7 +35,6 @@
 namespace WebCore {
 
 class InspectorController;
-class InspectorFrontendChannel;
 class Frame;
 class Page;
 
diff --git a/Source/WebCore/inspector/InspectorConsoleAgent.cpp b/Source/WebCore/inspector/InspectorConsoleAgent.cpp
index daa9c5b..de16f49 100644
--- a/Source/WebCore/inspector/InspectorConsoleAgent.cpp
+++ b/Source/WebCore/inspector/InspectorConsoleAgent.cpp
@@ -43,14 +43,16 @@
 #include "ScriptCallStack.h"
 #include "ScriptCallStackFactory.h"
 #include "ScriptController.h"
-#include "ScriptObject.h"
 #include "ScriptProfiler.h"
+#include <bindings/ScriptObject.h>
 #include <wtf/CurrentTime.h>
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/text/StringBuilder.h>
 #include <wtf/text/WTFString.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 static const unsigned maximumConsoleMessages = 1000;
@@ -59,7 +61,7 @@
 int InspectorConsoleAgent::s_enabledAgentCount = 0;
 
 InspectorConsoleAgent::InspectorConsoleAgent(InstrumentingAgents* instrumentingAgents, InjectedScriptManager* injectedScriptManager)
-    : InspectorBaseAgent(ASCIILiteral("Console"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("Console"), instrumentingAgents)
     , m_injectedScriptManager(injectedScriptManager)
     , m_previousMessage(0)
     , m_expiredConsoleMessageCount(0)
@@ -122,7 +124,7 @@
     m_counts.clear();
 }
 
-void InspectorConsoleAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void InspectorConsoleAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorConsoleFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorConsoleBackendDispatcher::create(backendDispatcher, this);
@@ -320,7 +322,7 @@
 class InspectableHeapObject : public InjectedScriptHost::InspectableObject {
 public:
     explicit InspectableHeapObject(int heapObjectId) : m_heapObjectId(heapObjectId) { }
-    virtual ScriptValue get(JSC::ExecState*)
+    virtual Deprecated::ScriptValue get(JSC::ExecState*)
     {
         return ScriptProfiler::objectByHeapObjectId(m_heapObjectId);
     }
diff --git a/Source/WebCore/inspector/InspectorConsoleAgent.h b/Source/WebCore/inspector/InspectorConsoleAgent.h
index c0f0adc..99455ca 100644
--- a/Source/WebCore/inspector/InspectorConsoleAgent.h
+++ b/Source/WebCore/inspector/InspectorConsoleAgent.h
@@ -29,8 +29,9 @@
 
 #include "ConsoleAPITypes.h"
 #include "ConsoleTypes.h"
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
 #include "InspectorFrontend.h"
+#include "InspectorWebAgentBase.h"
 #include "ScriptState.h"
 #include <wtf/Forward.h>
 #include <wtf/HashMap.h>
@@ -52,7 +53,7 @@
 
 typedef String ErrorString;
 
-class InspectorConsoleAgent : public InspectorBaseAgent, public InspectorConsoleBackendDispatcherHandler {
+class InspectorConsoleAgent : public InspectorAgentBase, public InspectorConsoleBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorConsoleAgent);
 public:
     InspectorConsoleAgent(InstrumentingAgents*, InjectedScriptManager*);
@@ -64,7 +65,7 @@
     bool enabled() const { return m_enabled; }
     void reset();
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, JSC::ExecState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier = 0);
diff --git a/Source/WebCore/inspector/InspectorController.cpp b/Source/WebCore/inspector/InspectorController.cpp
index e23fe07..4377580 100644
--- a/Source/WebCore/inspector/InspectorController.cpp
+++ b/Source/WebCore/inspector/InspectorController.cpp
@@ -42,7 +42,6 @@
 #include "InspectorAgent.h"
 #include "InspectorApplicationCacheAgent.h"
 #include "InspectorBackendDispatchers.h"
-#include "InspectorBaseAgent.h"
 #include "InspectorCSSAgent.h"
 #include "InspectorCanvasAgent.h"
 #include "InspectorClient.h"
@@ -71,8 +70,10 @@
 #include "PageDebuggerAgent.h"
 #include "PageRuntimeAgent.h"
 #include "Page.h"
-#include "ScriptObject.h"
 #include "Settings.h"
+#include <inspector/InspectorBackendDispatcher.h>
+
+using namespace Inspector;
 
 namespace WebCore {
 
diff --git a/Source/WebCore/inspector/InspectorController.h b/Source/WebCore/inspector/InspectorController.h
index a6e2d7d..f6e6d84 100644
--- a/Source/WebCore/inspector/InspectorController.h
+++ b/Source/WebCore/inspector/InspectorController.h
@@ -33,13 +33,18 @@
 
 #if ENABLE(INSPECTOR)
 
-#include "InspectorAgentRegistry.h"
-#include "InspectorBaseAgent.h"
+#include <inspector/InspectorAgentRegistry.h>
 #include <wtf/Forward.h>
 #include <wtf/HashMap.h>
 #include <wtf/Noncopyable.h>
 #include <wtf/text/WTFString.h>
 
+namespace Inspector {
+class InspectorObject;
+class InspectorFrontendChannel;
+class InspectorBackendDispatcher;
+}
+
 namespace WebCore {
 
 class DOMWrapperWorld;
@@ -48,15 +53,12 @@
 class InjectedScriptManager;
 class InspectorAgent;
 class InspectorApplicationCacheAgent;
-class InspectorBackendDispatcher;
 class InspectorClient;
 class InspectorDOMAgent;
 class InspectorDOMDebuggerAgent;
 class InspectorDebuggerAgent;
-class InspectorFrontendChannel;
 class InspectorFrontendClient;
 class InspectorMemoryAgent;
-class InspectorObject;
 class InspectorOverlay;
 class InspectorPageAgent;
 class InspectorProfilerAgent;
@@ -95,7 +97,7 @@
     bool hasLocalFrontend() const;
     bool hasRemoteFrontend() const;
 
-    void connectFrontend(InspectorFrontendChannel*);
+    void connectFrontend(Inspector::InspectorFrontendChannel*);
     void disconnectFrontend();
     void setProcessId(long);
 
@@ -111,7 +113,7 @@
 
     void setIndicating(bool);
 
-    PassRefPtr<InspectorObject> buildObjectForHighlightedNode() const;
+    PassRefPtr<Inspector::InspectorObject> buildObjectForHighlightedNode() const;
 
     bool isUnderTest();
     void evaluateForTestInFrontend(long callId, const String& script);
@@ -154,12 +156,12 @@
     InspectorProfilerAgent* m_profilerAgent;
 #endif
 
-    RefPtr<InspectorBackendDispatcher> m_inspectorBackendDispatcher;
+    RefPtr<Inspector::InspectorBackendDispatcher> m_inspectorBackendDispatcher;
     OwnPtr<InspectorFrontendClient> m_inspectorFrontendClient;
-    InspectorFrontendChannel* m_inspectorFrontendChannel;
+    Inspector::InspectorFrontendChannel* m_inspectorFrontendChannel;
     Page* m_page;
     InspectorClient* m_inspectorClient;
-    InspectorAgentRegistry m_agents;
+    Inspector::InspectorAgentRegistry m_agents;
     bool m_isUnderTest;
 
 #if ENABLE(REMOTE_INSPECTOR)
diff --git a/Source/WebCore/inspector/InspectorDOMAgent.cpp b/Source/WebCore/inspector/InspectorDOMAgent.cpp
index 37034389..e1d273c 100644
--- a/Source/WebCore/inspector/InspectorDOMAgent.cpp
+++ b/Source/WebCore/inspector/InspectorDOMAgent.cpp
@@ -101,6 +101,8 @@
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -210,7 +212,7 @@
 }
 
 InspectorDOMAgent::InspectorDOMAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay, InspectorClient* client)
-    : InspectorBaseAgent(ASCIILiteral("DOM"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("DOM"), instrumentingAgents)
     , m_pageAgent(pageAgent)
     , m_injectedScriptManager(injectedScriptManager)
     , m_overlay(overlay)
@@ -230,7 +232,7 @@
     ASSERT(!m_searchingForNode);
 }
 
-void InspectorDOMAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void InspectorDOMAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorDOMFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorDOMBackendDispatcher::create(backendDispatcher, this);
@@ -420,7 +422,7 @@
     return element;
 }
 
-void InspectorDOMAgent::getDocument(ErrorString* errorString, RefPtr<TypeBuilder::DOM::Node>& root)
+void InspectorDOMAgent::getDocument(ErrorString* errorString, RefPtr<Inspector::TypeBuilder::DOM::Node>& root)
 {
     m_documentRequested = true;
 
@@ -460,7 +462,7 @@
         return;
     }
 
-    RefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node>> children = buildArrayForContainerChildren(node, depth, nodeMap);
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::DOM::Node>> children = buildArrayForContainerChildren(node, depth, nodeMap);
     m_frontendDispatcher->setChildNodes(nodeId, children.release());
 }
 
@@ -538,7 +540,7 @@
         *elementId = pushNodePathToFrontend(element.get());
 }
 
-void InspectorDOMAgent::querySelectorAll(ErrorString* errorString, int nodeId, const String& selectors, RefPtr<TypeBuilder::Array<int>>& result)
+void InspectorDOMAgent::querySelectorAll(ErrorString* errorString, int nodeId, const String& selectors, RefPtr<Inspector::TypeBuilder::Array<int>>& result)
 {
     Node* node = assertNode(errorString, nodeId);
     if (!node)
@@ -555,7 +557,7 @@
         return;
     }
 
-    result = TypeBuilder::Array<int>::create();
+    result = Inspector::TypeBuilder::Array<int>::create();
 
     for (unsigned i = 0; i < nodes->length(); ++i)
         result->addItem(pushNodePathToFrontend(nodes->item(i)));
@@ -586,7 +588,7 @@
             OwnPtr<NodeToIdMap> newMap = adoptPtr(new NodeToIdMap);
             danglingMap = newMap.get();
             m_danglingNodeToIdMaps.append(newMap.release());
-            RefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node>> children = TypeBuilder::Array<TypeBuilder::DOM::Node>::create();
+            RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::DOM::Node>> children = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::DOM::Node>::create();
             children->addItem(buildObjectForNode(node, 0, danglingMap));
             m_frontendDispatcher->setChildNodes(0, children);
             break;
@@ -813,9 +815,9 @@
     m_domEditor->replaceWholeText(toText(node), value, errorString);
 }
 
-void InspectorDOMAgent::getEventListenersForNode(ErrorString* errorString, int nodeId, const String* objectGroup, RefPtr<TypeBuilder::Array<TypeBuilder::DOM::EventListener>>& listenersArray)
+void InspectorDOMAgent::getEventListenersForNode(ErrorString* errorString, int nodeId, const String* objectGroup, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::DOM::EventListener>>& listenersArray)
 {
-    listenersArray = TypeBuilder::Array<TypeBuilder::DOM::EventListener>::create();
+    listenersArray = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::DOM::EventListener>::create();
     Node* node = assertNode(errorString, nodeId);
     if (!node)
         return;
@@ -921,7 +923,7 @@
     *resultCount = resultsVector.size();
 }
 
-void InspectorDOMAgent::getSearchResults(ErrorString* errorString, const String& searchId, int fromIndex, int toIndex, RefPtr<TypeBuilder::Array<int>>& nodeIds)
+void InspectorDOMAgent::getSearchResults(ErrorString* errorString, const String& searchId, int fromIndex, int toIndex, RefPtr<Inspector::TypeBuilder::Array<int>>& nodeIds)
 {
     SearchResults::iterator it = m_searchResults.find(searchId);
     if (it == m_searchResults.end()) {
@@ -935,7 +937,7 @@
         return;
     }
 
-    nodeIds = TypeBuilder::Array<int>::create();
+    nodeIds = Inspector::TypeBuilder::Array<int>::create();
     for (int i = fromIndex; i < toIndex; ++i)
         nodeIds->addItem(pushNodePathToFrontend((it->value)[i].get()));
 }
@@ -1212,7 +1214,7 @@
     element->setFiles(fileList);
 }
 
-void InspectorDOMAgent::resolveNode(ErrorString* errorString, int nodeId, const String* const objectGroup, RefPtr<TypeBuilder::Runtime::RemoteObject>& result)
+void InspectorDOMAgent::resolveNode(ErrorString* errorString, int nodeId, const String* const objectGroup, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result)
 {
     String objectGroupName = objectGroup ? *objectGroup : "";
     Node* node = nodeForId(nodeId);
@@ -1220,7 +1222,7 @@
         *errorString = "No node with given id found";
         return;
     }
-    RefPtr<TypeBuilder::Runtime::RemoteObject> object = resolveNode(node, objectGroupName);
+    RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> object = resolveNode(node, objectGroupName);
     if (!object) {
         *errorString = "Node with given id does not belong to the document";
         return;
@@ -1228,7 +1230,7 @@
     result = object;
 }
 
-void InspectorDOMAgent::getAttributes(ErrorString* errorString, int nodeId, RefPtr<TypeBuilder::Array<String>>& result)
+void InspectorDOMAgent::getAttributes(ErrorString* errorString, int nodeId, RefPtr<Inspector::TypeBuilder::Array<String>>& result)
 {
     Element* element = assertElement(errorString, nodeId);
     if (!element)
@@ -1260,7 +1262,7 @@
     return document->completeURL("").string();
 }
 
-PassRefPtr<TypeBuilder::DOM::Node> InspectorDOMAgent::buildObjectForNode(Node* node, int depth, NodeToIdMap* nodesMap)
+PassRefPtr<Inspector::TypeBuilder::DOM::Node> InspectorDOMAgent::buildObjectForNode(Node* node, int depth, NodeToIdMap* nodesMap)
 {
     int id = bind(node, nodesMap);
     String nodeName;
@@ -1289,7 +1291,7 @@
         break;
     }
 
-    RefPtr<TypeBuilder::DOM::Node> value = TypeBuilder::DOM::Node::create()
+    RefPtr<Inspector::TypeBuilder::DOM::Node> value = Inspector::TypeBuilder::DOM::Node::create()
         .setNodeId(id)
         .setNodeType(static_cast<int>(node->nodeType()))
         .setNodeName(nodeName)
@@ -1299,7 +1301,7 @@
     if (node->isContainerNode()) {
         int nodeCount = innerChildNodeCount(node);
         value->setChildNodeCount(nodeCount);
-        RefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node>> children = buildArrayForContainerChildren(node, depth, nodesMap);
+        RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::DOM::Node>> children = buildArrayForContainerChildren(node, depth, nodesMap);
         if (children->length() > 0)
             value->setChildren(children.release());
     }
@@ -1318,7 +1320,7 @@
         }
 
         if (ShadowRoot* root = element->shadowRoot()) {
-            RefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node>> shadowRoots = TypeBuilder::Array<TypeBuilder::DOM::Node>::create();
+            RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::DOM::Node>> shadowRoots = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::DOM::Node>::create();
             shadowRoots->addItem(buildObjectForNode(root, 0, nodesMap));
             value->setShadowRoots(shadowRoots);
         }
@@ -1346,9 +1348,9 @@
     return value.release();
 }
 
-PassRefPtr<TypeBuilder::Array<String>> InspectorDOMAgent::buildArrayForElementAttributes(Element* element)
+PassRefPtr<Inspector::TypeBuilder::Array<String>> InspectorDOMAgent::buildArrayForElementAttributes(Element* element)
 {
-    RefPtr<TypeBuilder::Array<String>> attributesValue = TypeBuilder::Array<String>::create();
+    RefPtr<Inspector::TypeBuilder::Array<String>> attributesValue = Inspector::TypeBuilder::Array<String>::create();
     // Go through all attributes and serialize them.
     if (!element->hasAttributes())
         return attributesValue.release();
@@ -1362,9 +1364,9 @@
     return attributesValue.release();
 }
 
-PassRefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node>> InspectorDOMAgent::buildArrayForContainerChildren(Node* container, int depth, NodeToIdMap* nodesMap)
+PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::DOM::Node>> InspectorDOMAgent::buildArrayForContainerChildren(Node* container, int depth, NodeToIdMap* nodesMap)
 {
-    RefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node>> children = TypeBuilder::Array<TypeBuilder::DOM::Node>::create();
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::DOM::Node>> children = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::DOM::Node>::create();
     if (depth == 0) {
         // Special-case the only text child - pretend that container's children have been requested.
         Node* firstChild = container->firstChild();
@@ -1386,7 +1388,7 @@
     return children.release();
 }
 
-PassRefPtr<TypeBuilder::DOM::EventListener> InspectorDOMAgent::buildObjectForEventListener(const RegisteredEventListener& registeredEventListener, const AtomicString& eventType, Node* node, const String* objectGroupId)
+PassRefPtr<Inspector::TypeBuilder::DOM::EventListener> InspectorDOMAgent::buildObjectForEventListener(const RegisteredEventListener& registeredEventListener, const AtomicString& eventType, Node* node, const String* objectGroupId)
 {
     RefPtr<EventListener> eventListener = registeredEventListener.listener;
 
@@ -1414,7 +1416,7 @@
         }
     }
 
-    RefPtr<TypeBuilder::DOM::EventListener> value = TypeBuilder::DOM::EventListener::create()
+    RefPtr<Inspector::TypeBuilder::DOM::EventListener> value = Inspector::TypeBuilder::DOM::EventListener::create()
         .setType(eventType)
         .setUseCapture(registeredEventListener.useCapture)
         .setIsAttribute(eventListener->isAttribute())
@@ -1423,10 +1425,10 @@
     if (objectGroupId && handler && state) {
         InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(state);
         if (!injectedScript.hasNoValue())
-            value->setHandler(injectedScript.wrapObject(ScriptValue(state->vm(), handler), *objectGroupId));
+            value->setHandler(injectedScript.wrapObject(Deprecated::ScriptValue(state->vm(), handler), *objectGroupId));
     }
     if (!scriptID.isNull()) {
-        RefPtr<TypeBuilder::Debugger::Location> location = TypeBuilder::Debugger::Location::create()
+        RefPtr<Inspector::TypeBuilder::Debugger::Location> location = Inspector::TypeBuilder::Debugger::Location::create()
             .setScriptId(scriptID)
             .setLineNumber(lineNumber);
         value->setLocation(location.release());
@@ -1509,7 +1511,7 @@
     m_frontendDispatcher->childNodeRemoved(parentId, frameOwnerId);
     unbind(frameOwner, &m_documentNodeToIdMap);
 
-    RefPtr<TypeBuilder::DOM::Node> value = buildObjectForNode(frameOwner, 0, &m_documentNodeToIdMap);
+    RefPtr<Inspector::TypeBuilder::DOM::Node> value = buildObjectForNode(frameOwner, 0, &m_documentNodeToIdMap);
     Node* previousSibling = innerPreviousSibling(frameOwner);
     int prevId = previousSibling ? m_documentNodeToIdMap.get(previousSibling) : 0;
     m_frontendDispatcher->childNodeInserted(parentId, prevId, value.release());
@@ -1539,7 +1541,7 @@
         // Children have been requested -> return value of a new child.
         Node* prevSibling = innerPreviousSibling(node);
         int prevId = prevSibling ? m_documentNodeToIdMap.get(prevSibling) : 0;
-        RefPtr<TypeBuilder::DOM::Node> value = buildObjectForNode(node, 0, &m_documentNodeToIdMap);
+        RefPtr<Inspector::TypeBuilder::DOM::Node> value = buildObjectForNode(node, 0, &m_documentNodeToIdMap);
         m_frontendDispatcher->childNodeInserted(parentId, prevId, value.release());
     }
 }
@@ -1604,7 +1606,7 @@
 
 void InspectorDOMAgent::styleAttributeInvalidated(const Vector<Element*>& elements)
 {
-    RefPtr<TypeBuilder::Array<int>> nodeIds = TypeBuilder::Array<int>::create();
+    RefPtr<Inspector::TypeBuilder::Array<int>> nodeIds = Inspector::TypeBuilder::Array<int>::create();
     for (unsigned i = 0, size = elements.size(); i < size; ++i) {
         Element* element = elements.at(i);
         int id = boundNodeId(element);
@@ -1729,7 +1731,7 @@
     }
 }
 
-PassRefPtr<TypeBuilder::Runtime::RemoteObject> InspectorDOMAgent::resolveNode(Node* node, const String& objectGroup)
+PassRefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> InspectorDOMAgent::resolveNode(Node* node, const String& objectGroup)
 {
     Frame* frame = node->document().frame();
     if (!frame)
diff --git a/Source/WebCore/inspector/InspectorDOMAgent.h b/Source/WebCore/inspector/InspectorDOMAgent.h
index a5d60bc..f01f9ad 100644
--- a/Source/WebCore/inspector/InspectorDOMAgent.h
+++ b/Source/WebCore/inspector/InspectorDOMAgent.h
@@ -33,13 +33,13 @@
 #include "EventTarget.h"
 #include "InjectedScript.h"
 #include "InjectedScriptManager.h"
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
 #include "InspectorFrontend.h"
 #include "InspectorOverlay.h"
-#include "InspectorValues.h"
+#include "InspectorWebAgentBase.h"
 #include "RenderLayer.h"
 #include "Timer.h"
-
+#include <inspector/InspectorValues.h>
 #include <wtf/Deque.h>
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
@@ -49,7 +49,12 @@
 #include <wtf/Vector.h>
 #include <wtf/text/AtomicString.h>
 
+namespace Deprecated {
+class ScriptValue;
+}
+
 namespace WebCore {
+
 class ContainerNode;
 class CharacterData;
 class DOMEditor;
@@ -66,7 +71,6 @@
 class NameNodeMap;
 class Node;
 class RevalidateStyleAttributeTask;
-class ScriptValue;
 class ShadowRoot;
 
 struct HighlightConfig;
@@ -89,7 +93,7 @@
     const EventListenerVector eventListenerVector;
 };
 
-class InspectorDOMAgent : public InspectorBaseAgent, public InspectorDOMBackendDispatcherHandler {
+class InspectorDOMAgent : public InspectorAgentBase, public InspectorDOMBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorDOMAgent);
 public:
     struct DOMListener {
@@ -110,7 +114,7 @@
 
     ~InspectorDOMAgent();
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     Vector<Document*> documents();
@@ -118,8 +122,8 @@
 
     // Methods called from the frontend for DOM nodes inspection.
     virtual void querySelector(ErrorString*, int nodeId, const String& selectors, int* elementId);
-    virtual void querySelectorAll(ErrorString*, int nodeId, const String& selectors, RefPtr<TypeBuilder::Array<int>>& result);
-    virtual void getDocument(ErrorString*, RefPtr<TypeBuilder::DOM::Node>& root);
+    virtual void querySelectorAll(ErrorString*, int nodeId, const String& selectors, RefPtr<Inspector::TypeBuilder::Array<int>>& result);
+    virtual void getDocument(ErrorString*, RefPtr<Inspector::TypeBuilder::DOM::Node>& root);
     virtual void requestChildNodes(ErrorString*, int nodeId, const int* depth);
     virtual void setAttributeValue(ErrorString*, int elementId, const String& name, const String& value);
     virtual void setAttributesAsText(ErrorString*, int elementId, const String& text, const String* name);
@@ -129,29 +133,29 @@
     virtual void getOuterHTML(ErrorString*, int nodeId, WTF::String* outerHTML);
     virtual void setOuterHTML(ErrorString*, int nodeId, const String& outerHTML);
     virtual void setNodeValue(ErrorString*, int nodeId, const String& value);
-    virtual void getEventListenersForNode(ErrorString*, int nodeId, const WTF::String* objectGroup, RefPtr<TypeBuilder::Array<TypeBuilder::DOM::EventListener>>& listenersArray);
-    virtual void performSearch(ErrorString*, const String& whitespaceTrimmedQuery, const RefPtr<InspectorArray>* nodeIds, String* searchId, int* resultCount);
-    virtual void getSearchResults(ErrorString*, const String& searchId, int fromIndex, int toIndex, RefPtr<TypeBuilder::Array<int>>&);
+    virtual void getEventListenersForNode(ErrorString*, int nodeId, const WTF::String* objectGroup, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::DOM::EventListener>>& listenersArray);
+    virtual void performSearch(ErrorString*, const String& whitespaceTrimmedQuery, const RefPtr<Inspector::InspectorArray>* nodeIds, String* searchId, int* resultCount);
+    virtual void getSearchResults(ErrorString*, const String& searchId, int fromIndex, int toIndex, RefPtr<Inspector::TypeBuilder::Array<int>>&);
     virtual void discardSearchResults(ErrorString*, const String& searchId);
-    virtual void resolveNode(ErrorString*, int nodeId, const String* objectGroup, RefPtr<TypeBuilder::Runtime::RemoteObject>& result);
-    virtual void getAttributes(ErrorString*, int nodeId, RefPtr<TypeBuilder::Array<String>>& result);
-    virtual void setInspectModeEnabled(ErrorString*, bool enabled, const RefPtr<InspectorObject>* highlightConfig);
+    virtual void resolveNode(ErrorString*, int nodeId, const String* objectGroup, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result);
+    virtual void getAttributes(ErrorString*, int nodeId, RefPtr<Inspector::TypeBuilder::Array<String>>& result);
+    virtual void setInspectModeEnabled(ErrorString*, bool enabled, const RefPtr<Inspector::InspectorObject>* highlightConfig);
     virtual void requestNode(ErrorString*, const String& objectId, int* nodeId);
     virtual void pushNodeByPathToFrontend(ErrorString*, const String& path, int* nodeId);
     virtual void pushNodeByBackendIdToFrontend(ErrorString*, BackendNodeId, int* nodeId);
     virtual void releaseBackendNodeIds(ErrorString*, const String& nodeGroup);
     virtual void hideHighlight(ErrorString*);
-    virtual void highlightRect(ErrorString*, int x, int y, int width, int height, const RefPtr<InspectorObject>* color, const RefPtr<InspectorObject>* outlineColor, const bool* usePageCoordinates);
-    virtual void highlightQuad(ErrorString*, const RefPtr<InspectorArray>& quad, const RefPtr<InspectorObject>* color, const RefPtr<InspectorObject>* outlineColor, const bool* usePageCoordinates);
-    virtual void highlightNode(ErrorString*, const RefPtr<InspectorObject>& highlightConfig, const int* nodeId, const String* objectId);
-    virtual void highlightFrame(ErrorString*, const String& frameId, const RefPtr<InspectorObject>* color, const RefPtr<InspectorObject>* outlineColor);
+    virtual void highlightRect(ErrorString*, int x, int y, int width, int height, const RefPtr<Inspector::InspectorObject>* color, const RefPtr<Inspector::InspectorObject>* outlineColor, const bool* usePageCoordinates);
+    virtual void highlightQuad(ErrorString*, const RefPtr<Inspector::InspectorArray>& quad, const RefPtr<Inspector::InspectorObject>* color, const RefPtr<Inspector::InspectorObject>* outlineColor, const bool* usePageCoordinates);
+    virtual void highlightNode(ErrorString*, const RefPtr<Inspector::InspectorObject>& highlightConfig, const int* nodeId, const String* objectId);
+    virtual void highlightFrame(ErrorString*, const String& frameId, const RefPtr<Inspector::InspectorObject>* color, const RefPtr<Inspector::InspectorObject>* outlineColor);
 
     virtual void moveTo(ErrorString*, int nodeId, int targetNodeId, const int* anchorNodeId, int* newNodeId);
     virtual void undo(ErrorString*);
     virtual void redo(ErrorString*);
     virtual void markUndoableState(ErrorString*);
     virtual void focus(ErrorString*, int nodeId);
-    virtual void setFileInputFiles(ErrorString*, int nodeId, const RefPtr<InspectorArray>& files);
+    virtual void setFileInputFiles(ErrorString*, int nodeId, const RefPtr<Inspector::InspectorArray>& files);
 
     void getEventListeners(Node*, Vector<EventListenerInfo>& listenersArray, bool includeAncestors);
 
@@ -182,7 +186,7 @@
 
     static String documentURLString(Document*);
 
-    PassRefPtr<TypeBuilder::Runtime::RemoteObject> resolveNode(Node*, const String& objectGroup);
+    PassRefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> resolveNode(Node*, const String& objectGroup);
     bool handleMousePress();
     bool handleTouchEvent(Node*);
     void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);
@@ -210,8 +214,8 @@
 private:
     InspectorDOMAgent(InstrumentingAgents*, InspectorPageAgent*, InjectedScriptManager*, InspectorOverlay*, InspectorClient*);
 
-    void setSearchingForNode(ErrorString*, bool enabled, InspectorObject* highlightConfig);
-    PassOwnPtr<HighlightConfig> highlightConfigFromInspectorObject(ErrorString*, InspectorObject* highlightInspectorObject);
+    void setSearchingForNode(ErrorString*, bool enabled, Inspector::InspectorObject* highlightConfig);
+    PassOwnPtr<HighlightConfig> highlightConfigFromInspectorObject(ErrorString*, Inspector::InspectorObject* highlightInspectorObject);
 
     // Node-related methods.
     typedef HashMap<RefPtr<Node>, int> NodeToIdMap;
@@ -226,18 +230,18 @@
 
     bool hasBreakpoint(Node*, int type);
     void updateSubtreeBreakpoints(Node* root, uint32_t rootMask, bool value);
-    void descriptionForDOMEvent(Node* target, int breakpointType, bool insertion, PassRefPtr<InspectorObject> description);
+    void descriptionForDOMEvent(Node* target, int breakpointType, bool insertion, PassRefPtr<Inspector::InspectorObject> description);
 
-    PassRefPtr<TypeBuilder::DOM::Node> buildObjectForNode(Node*, int depth, NodeToIdMap*);
-    PassRefPtr<TypeBuilder::Array<String>> buildArrayForElementAttributes(Element*);
-    PassRefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node>> buildArrayForContainerChildren(Node* container, int depth, NodeToIdMap* nodesMap);
-    PassRefPtr<TypeBuilder::DOM::EventListener> buildObjectForEventListener(const RegisteredEventListener&, const AtomicString& eventType, Node*, const String* objectGroupId);
+    PassRefPtr<Inspector::TypeBuilder::DOM::Node> buildObjectForNode(Node*, int depth, NodeToIdMap*);
+    PassRefPtr<Inspector::TypeBuilder::Array<String>> buildArrayForElementAttributes(Element*);
+    PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::DOM::Node>> buildArrayForContainerChildren(Node* container, int depth, NodeToIdMap* nodesMap);
+    PassRefPtr<Inspector::TypeBuilder::DOM::EventListener> buildObjectForEventListener(const RegisteredEventListener&, const AtomicString& eventType, Node*, const String* objectGroupId);
 
     Node* nodeForPath(const String& path);
 
     void discardBindings();
 
-    void innerHighlightQuad(PassOwnPtr<FloatQuad>, const RefPtr<InspectorObject>* color, const RefPtr<InspectorObject>* outlineColor, const bool* usePageCoordinates);
+    void innerHighlightQuad(PassOwnPtr<FloatQuad>, const RefPtr<Inspector::InspectorObject>* color, const RefPtr<Inspector::InspectorObject>* outlineColor, const bool* usePageCoordinates);
 
     InspectorPageAgent* m_pageAgent;
     InjectedScriptManager* m_injectedScriptManager;
diff --git a/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp b/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp
index 89ff6e9..143170a 100644
--- a/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp
+++ b/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp
@@ -40,8 +40,8 @@
 #include "InspectorDebuggerAgent.h"
 #include "InspectorFrontend.h"
 #include "InspectorInstrumentation.h"
-#include "InspectorValues.h"
 #include "InstrumentingAgents.h"
+#include <inspector/InspectorValues.h>
 #include <wtf/text/WTFString.h>
 
 namespace {
@@ -61,6 +61,8 @@
 
 }
 
+using namespace Inspector;
+
 namespace WebCore {
 
 PassOwnPtr<InspectorDOMDebuggerAgent> InspectorDOMDebuggerAgent::create(InstrumentingAgents* instrumentingAgents, InspectorDOMAgent* domAgent, InspectorDebuggerAgent* debuggerAgent, InspectorAgent* inspectorAgent)
@@ -69,7 +71,7 @@
 }
 
 InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent(InstrumentingAgents* instrumentingAgents, InspectorDOMAgent* domAgent, InspectorDebuggerAgent* debuggerAgent, InspectorAgent*)
-    : InspectorBaseAgent(ASCIILiteral("DOMDebugger"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("DOMDebugger"), instrumentingAgents)
     , m_domAgent(domAgent)
     , m_debuggerAgent(debuggerAgent)
     , m_pauseInNextEventListener(false)
@@ -111,7 +113,7 @@
     clear();
 }
 
-void InspectorDOMDebuggerAgent::didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher* backendDispatcher)
+void InspectorDOMDebuggerAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, InspectorBackendDispatcher* backendDispatcher)
 {
     m_backendDispatcher = InspectorDOMDebuggerBackendDispatcher::create(backendDispatcher, this);
 }
@@ -314,7 +316,7 @@
     if ((1 << breakpointType) & inheritableDOMBreakpointTypesMask) {
         // For inheritable breakpoint types, target node isn't always the same as the node that owns a breakpoint.
         // Target node may be unknown to frontend, so we need to push it first.
-        RefPtr<TypeBuilder::Runtime::RemoteObject> targetNodeObject = m_domAgent->resolveNode(target, InspectorDebuggerAgent::backtraceObjectGroup);
+        RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> targetNodeObject = m_domAgent->resolveNode(target, InspectorDebuggerAgent::backtraceObjectGroup);
         description->setValue("targetNode", targetNodeObject);
 
         // Find breakpoint owner node.
diff --git a/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h b/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h
index 96f88a9..a3daaff 100644
--- a/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h
+++ b/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h
@@ -33,26 +33,30 @@
 
 #if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR)
 
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
 #include "InspectorDebuggerAgent.h"
+#include "InspectorWebAgentBase.h"
 #include <wtf/HashMap.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/text/WTFString.h>
 
+namespace Inspector {
+class InspectorObject;
+}
+
 namespace WebCore {
 
 class Element;
 class InspectorAgent;
 class InspectorDOMAgent;
 class InspectorDebuggerAgent;
-class InspectorObject;
 class InstrumentingAgents;
 class Node;
 
 typedef String ErrorString;
 
-class InspectorDOMDebuggerAgent : public InspectorBaseAgent, public InspectorDebuggerAgent::Listener, public InspectorDOMDebuggerBackendDispatcherHandler {
+class InspectorDOMDebuggerAgent : public InspectorAgentBase, public InspectorDebuggerAgent::Listener, public InspectorDOMDebuggerBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorDOMDebuggerAgent);
 public:
     static PassOwnPtr<InspectorDOMDebuggerAgent> create(InstrumentingAgents*, InspectorDOMAgent*, InspectorDebuggerAgent*, InspectorAgent*);
@@ -79,7 +83,7 @@
     void willSendXMLHttpRequest(const String& url);
     void pauseOnNativeEventIfNeeded(bool isDOMEvent, const String& eventName, bool synchronous);
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
     virtual void discardAgent();
 
@@ -93,7 +97,7 @@
     virtual void didPause();
     void disable();
 
-    void descriptionForDOMEvent(Node* target, int breakpointType, bool insertion, InspectorObject* description);
+    void descriptionForDOMEvent(Node* target, int breakpointType, bool insertion, Inspector::InspectorObject* description);
     void updateSubtreeBreakpoints(Node*, uint32_t rootMask, bool set);
     bool hasBreakpoint(Node*, int type);
     void discardBindings();
diff --git a/Source/WebCore/inspector/InspectorDOMStorageAgent.cpp b/Source/WebCore/inspector/InspectorDOMStorageAgent.cpp
index 646de23..9c59b1a6 100644
--- a/Source/WebCore/inspector/InspectorDOMStorageAgent.cpp
+++ b/Source/WebCore/inspector/InspectorDOMStorageAgent.cpp
@@ -41,7 +41,6 @@
 #include "Frame.h"
 #include "InspectorFrontend.h"
 #include "InspectorPageAgent.h"
-#include "InspectorValues.h"
 #include "InstrumentingAgents.h"
 #include "Page.h"
 #include "PageGroup.h"
@@ -50,13 +49,15 @@
 #include "StorageArea.h"
 #include "StorageNamespace.h"
 #include "VoidCallback.h"
-
+#include <inspector/InspectorValues.h>
 #include <wtf/Vector.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 InspectorDOMStorageAgent::InspectorDOMStorageAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent)
-    : InspectorBaseAgent(ASCIILiteral("DOMStorage"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("DOMStorage"), instrumentingAgents)
     , m_pageAgent(pageAgent)
     , m_enabled(false)
 {
@@ -69,7 +70,7 @@
     m_instrumentingAgents = 0;
 }
 
-void InspectorDOMStorageAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void InspectorDOMStorageAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorDOMStorageFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorDOMStorageBackendDispatcher::create(backendDispatcher, this);
@@ -93,7 +94,7 @@
     m_enabled = false;
 }
 
-void InspectorDOMStorageAgent::getDOMStorageItems(ErrorString* errorString, const RefPtr<InspectorObject>& storageId, RefPtr<TypeBuilder::Array<TypeBuilder::Array<String>>>& items)
+void InspectorDOMStorageAgent::getDOMStorageItems(ErrorString* errorString, const RefPtr<InspectorObject>& storageId, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Array<String>>>& items)
 {
     Frame* frame;
     RefPtr<StorageArea> storageArea = findStorageArea(errorString, storageId, frame);
@@ -103,13 +104,13 @@
         return;
     }
 
-    RefPtr<TypeBuilder::Array<TypeBuilder::Array<String>>> storageItems = TypeBuilder::Array<TypeBuilder::Array<String>>::create();
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Array<String>>> storageItems = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Array<String>>::create();
 
     for (unsigned i = 0; i < storageArea->length(); ++i) {
         String key = storageArea->key(i);
         String value = storageArea->item(key);
 
-        RefPtr<TypeBuilder::Array<String>> entry = TypeBuilder::Array<String>::create();
+        RefPtr<Inspector::TypeBuilder::Array<String>> entry = Inspector::TypeBuilder::Array<String>::create();
         entry->addItem(key);
         entry->addItem(value);
         storageItems->addItem(entry.release());
@@ -157,9 +158,9 @@
     return storageId(securityOrigin.get(), isLocalStorage)->toJSONString();
 }
 
-PassRefPtr<TypeBuilder::DOMStorage::StorageId> InspectorDOMStorageAgent::storageId(SecurityOrigin* securityOrigin, bool isLocalStorage)
+PassRefPtr<Inspector::TypeBuilder::DOMStorage::StorageId> InspectorDOMStorageAgent::storageId(SecurityOrigin* securityOrigin, bool isLocalStorage)
 {
-    return TypeBuilder::DOMStorage::StorageId::create()
+    return Inspector::TypeBuilder::DOMStorage::StorageId::create()
         .setSecurityOrigin(securityOrigin->toRawString())
         .setIsLocalStorage(isLocalStorage).release();
 }
@@ -169,7 +170,7 @@
     if (!m_frontendDispatcher || !m_enabled)
         return;
 
-    RefPtr<TypeBuilder::DOMStorage::StorageId> id = storageId(securityOrigin, storageType == LocalStorage);
+    RefPtr<Inspector::TypeBuilder::DOMStorage::StorageId> id = storageId(securityOrigin, storageType == LocalStorage);
 
     if (key.isNull())
         m_frontendDispatcher->domStorageItemsCleared(id);
diff --git a/Source/WebCore/inspector/InspectorDOMStorageAgent.h b/Source/WebCore/inspector/InspectorDOMStorageAgent.h
index 2cd17b3..97441b1 100644
--- a/Source/WebCore/inspector/InspectorDOMStorageAgent.h
+++ b/Source/WebCore/inspector/InspectorDOMStorageAgent.h
@@ -29,27 +29,30 @@
 #ifndef InspectorDOMStorageAgent_h
 #define InspectorDOMStorageAgent_h
 
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
+#include "InspectorWebAgentBase.h"
 #include "StorageArea.h"
 #include <wtf/HashMap.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/text/WTFString.h>
 
+namespace Inspector {
+class InspectorArray;
+}
+
 namespace WebCore {
 
 class Frame;
-class InspectorArray;
 class InspectorDOMStorageFrontendDispatcher;
 class InspectorPageAgent;
 class InstrumentingAgents;
 class Page;
 class SecurityOrigin;
 class Storage;
-class StorageArea;
 
 typedef String ErrorString;
 
-class InspectorDOMStorageAgent : public InspectorBaseAgent, public InspectorDOMStorageBackendDispatcherHandler {
+class InspectorDOMStorageAgent : public InspectorAgentBase, public InspectorDOMStorageBackendDispatcherHandler {
 public:
     static PassOwnPtr<InspectorDOMStorageAgent> create(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent)
     {
@@ -57,19 +60,19 @@
     }
     ~InspectorDOMStorageAgent();
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     // Called from the front-end.
     virtual void enable(ErrorString*);
     virtual void disable(ErrorString*);
-    virtual void getDOMStorageItems(ErrorString*, const RefPtr<InspectorObject>& storageId, RefPtr<TypeBuilder::Array<TypeBuilder::Array<String>>>& items);
-    virtual void setDOMStorageItem(ErrorString*, const RefPtr<InspectorObject>& storageId, const String& key, const String& value);
-    virtual void removeDOMStorageItem(ErrorString*, const RefPtr<InspectorObject>& storageId, const String& key);
+    virtual void getDOMStorageItems(ErrorString*, const RefPtr<Inspector::InspectorObject>& storageId, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Array<String>>>& items);
+    virtual void setDOMStorageItem(ErrorString*, const RefPtr<Inspector::InspectorObject>& storageId, const String& key, const String& value);
+    virtual void removeDOMStorageItem(ErrorString*, const RefPtr<Inspector::InspectorObject>& storageId, const String& key);
 
     // Called from the injected script.
     String storageId(Storage*);
-    PassRefPtr<TypeBuilder::DOMStorage::StorageId> storageId(SecurityOrigin*, bool isLocalStorage);
+    PassRefPtr<Inspector::TypeBuilder::DOMStorage::StorageId> storageId(SecurityOrigin*, bool isLocalStorage);
 
     // Called from InspectorInstrumentation
     void didDispatchDOMStorageEvent(const String& key, const String& oldValue, const String& newValue, StorageType, SecurityOrigin*, Page*);
@@ -78,7 +81,7 @@
 
     InspectorDOMStorageAgent(InstrumentingAgents*, InspectorPageAgent*);
 
-    PassRefPtr<StorageArea> findStorageArea(ErrorString*, const RefPtr<InspectorObject>&, Frame*&);
+    PassRefPtr<StorageArea> findStorageArea(ErrorString*, const RefPtr<Inspector::InspectorObject>&, Frame*&);
 
     InspectorPageAgent* m_pageAgent;
     std::unique_ptr<InspectorDOMStorageFrontendDispatcher> m_frontendDispatcher;
diff --git a/Source/WebCore/inspector/InspectorDatabaseAgent.cpp b/Source/WebCore/inspector/InspectorDatabaseAgent.cpp
index c5800ea..9b855cb 100644
--- a/Source/WebCore/inspector/InspectorDatabaseAgent.cpp
+++ b/Source/WebCore/inspector/InspectorDatabaseAgent.cpp
@@ -37,8 +37,6 @@
 #include "ExceptionCodePlaceholder.h"
 #include "InspectorDatabaseResource.h"
 #include "InspectorFrontend.h"
-
-#include "InspectorValues.h"
 #include "InstrumentingAgents.h"
 #include "SQLError.h"
 #include "SQLResultSet.h"
@@ -50,18 +48,20 @@
 #include "SQLTransactionErrorCallback.h"
 #include "SQLValue.h"
 #include "VoidCallback.h"
-
+#include <inspector/InspectorValues.h>
 #include <wtf/Vector.h>
 
 typedef WebCore::InspectorDatabaseBackendDispatcherHandler::ExecuteSQLCallback ExecuteSQLCallback;
 
+using namespace Inspector;
+
 namespace WebCore {
 
 namespace {
 
 void reportTransactionFailed(ExecuteSQLCallback* requestCallback, SQLError* error)
 {
-    RefPtr<TypeBuilder::Database::Error> errorObject = TypeBuilder::Database::Error::create()
+    RefPtr<Inspector::TypeBuilder::Database::Error> errorObject = Inspector::TypeBuilder::Database::Error::create()
         .setMessage(error->message())
         .setCode(error->code());
     requestCallback->sendSuccess(0, 0, errorObject.release());
@@ -80,12 +80,12 @@
     {
         SQLResultSetRowList* rowList = resultSet->rows();
 
-        RefPtr<TypeBuilder::Array<String>> columnNames = TypeBuilder::Array<String>::create();
+        RefPtr<Inspector::TypeBuilder::Array<String>> columnNames = Inspector::TypeBuilder::Array<String>::create();
         const Vector<String>& columns = rowList->columnNames();
         for (size_t i = 0; i < columns.size(); ++i)
             columnNames->addItem(columns[i]);
 
-        RefPtr<TypeBuilder::Array<InspectorValue>> values = TypeBuilder::Array<InspectorValue>::create();
+        RefPtr<Inspector::TypeBuilder::Array<InspectorValue>> values = Inspector::TypeBuilder::Array<InspectorValue>::create();
         const Vector<SQLValue>& data = rowList->values();
         for (size_t i = 0; i < data.size(); ++i) {
             const SQLValue& value = rowList->values()[i];
@@ -211,7 +211,7 @@
 }
 
 InspectorDatabaseAgent::InspectorDatabaseAgent(InstrumentingAgents* instrumentingAgents)
-    : InspectorBaseAgent(ASCIILiteral("Database"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("Database"), instrumentingAgents)
     , m_enabled(false)
 {
     m_instrumentingAgents->setInspectorDatabaseAgent(this);
@@ -222,7 +222,7 @@
     m_instrumentingAgents->setInspectorDatabaseAgent(0);
 }
 
-void InspectorDatabaseAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void InspectorDatabaseAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorDatabaseFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorDatabaseBackendDispatcher::create(backendDispatcher, this);
@@ -254,14 +254,14 @@
     m_enabled = false;
 }
 
-void InspectorDatabaseAgent::getDatabaseTableNames(ErrorString* error, const String& databaseId, RefPtr<TypeBuilder::Array<String>>& names)
+void InspectorDatabaseAgent::getDatabaseTableNames(ErrorString* error, const String& databaseId, RefPtr<Inspector::TypeBuilder::Array<String>>& names)
 {
     if (!m_enabled) {
         *error = "Database agent is not enabled";
         return;
     }
 
-    names = TypeBuilder::Array<String>::create();
+    names = Inspector::TypeBuilder::Array<String>::create();
 
     Database* database = databaseForId(databaseId);
     if (database) {
diff --git a/Source/WebCore/inspector/InspectorDatabaseAgent.h b/Source/WebCore/inspector/InspectorDatabaseAgent.h
index a32f064..539a3ac 100644
--- a/Source/WebCore/inspector/InspectorDatabaseAgent.h
+++ b/Source/WebCore/inspector/InspectorDatabaseAgent.h
@@ -31,22 +31,26 @@
 
 #if ENABLE(INSPECTOR) && ENABLE(SQL_DATABASE)
 
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
 #include "InspectorFrontend.h"
+#include "InspectorWebAgentBase.h"
 #include <wtf/HashMap.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/text/WTFString.h>
 
+namespace Inspector {
+class InspectorArray;
+}
+
 namespace WebCore {
 
 class Database;
-class InspectorArray;
 class InspectorDatabaseResource;
 class InstrumentingAgents;
 
 typedef String ErrorString;
 
-class InspectorDatabaseAgent : public InspectorBaseAgent, public InspectorDatabaseBackendDispatcherHandler {
+class InspectorDatabaseAgent : public InspectorAgentBase, public InspectorDatabaseBackendDispatcherHandler {
 public:
     static PassOwnPtr<InspectorDatabaseAgent> create(InstrumentingAgents* instrumentingAgents)
     {
@@ -54,7 +58,7 @@
     }
     ~InspectorDatabaseAgent();
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     void clearResources();
@@ -62,7 +66,7 @@
     // Called from the front-end.
     virtual void enable(ErrorString*);
     virtual void disable(ErrorString*);
-    virtual void getDatabaseTableNames(ErrorString*, const String& databaseId, RefPtr<TypeBuilder::Array<String>>& names);
+    virtual void getDatabaseTableNames(ErrorString*, const String& databaseId, RefPtr<Inspector::TypeBuilder::Array<String>>& names);
     virtual void executeSQL(ErrorString*, const String& databaseId, const String& query, PassRefPtr<ExecuteSQLCallback>);
 
     // Called from the injected script.
diff --git a/Source/WebCore/inspector/InspectorDatabaseResource.cpp b/Source/WebCore/inspector/InspectorDatabaseResource.cpp
index 9d4b73f..25a3146 100644
--- a/Source/WebCore/inspector/InspectorDatabaseResource.cpp
+++ b/Source/WebCore/inspector/InspectorDatabaseResource.cpp
@@ -36,7 +36,9 @@
 
 #include "Database.h"
 #include "InspectorFrontend.h"
-#include "InspectorValues.h"
+#include <inspector/InspectorValues.h>
+
+using namespace Inspector;
 
 namespace WebCore {
 
@@ -58,7 +60,7 @@
 
 void InspectorDatabaseResource::bind(InspectorDatabaseFrontendDispatcher* databaseFrontendDispatcher)
 {
-    RefPtr<TypeBuilder::Database::Database> jsonObject = TypeBuilder::Database::Database::create()
+    RefPtr<Inspector::TypeBuilder::Database::Database> jsonObject = Inspector::TypeBuilder::Database::Database::create()
         .setId(m_id)
         .setDomain(m_domain)
         .setName(m_name)
diff --git a/Source/WebCore/inspector/InspectorDebuggerAgent.cpp b/Source/WebCore/inspector/InspectorDebuggerAgent.cpp
index ac2b70e..85de246 100644
--- a/Source/WebCore/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/WebCore/inspector/InspectorDebuggerAgent.cpp
@@ -38,24 +38,27 @@
 #include "InjectedScriptManager.h"
 #include "InspectorFrontend.h"
 #include "InspectorPageAgent.h"
-#include "InspectorValues.h"
 #include "InstrumentingAgents.h"
 #include "RegularExpression.h"
 #include "ScriptDebugServer.h"
-#include "ScriptObject.h"
+#include <bindings/ScriptObject.h>
+#include <bindings/ScriptValue.h>
+#include <inspector/InspectorValues.h>
 #include <wtf/text/WTFString.h>
 
-using WebCore::TypeBuilder::Array;
-using WebCore::TypeBuilder::Debugger::FunctionDetails;
-using WebCore::TypeBuilder::Debugger::ScriptId;
-using WebCore::TypeBuilder::Runtime::RemoteObject;
+using Inspector::TypeBuilder::Array;
+using Inspector::TypeBuilder::Debugger::FunctionDetails;
+using Inspector::TypeBuilder::Debugger::ScriptId;
+using Inspector::TypeBuilder::Runtime::RemoteObject;
+
+using namespace Inspector;
 
 namespace WebCore {
 
 const char* InspectorDebuggerAgent::backtraceObjectGroup = "backtrace";
 
 InspectorDebuggerAgent::InspectorDebuggerAgent(InstrumentingAgents* instrumentingAgents, InjectedScriptManager* injectedScriptManager)
-    : InspectorBaseAgent(ASCIILiteral("Debugger"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("Debugger"), instrumentingAgents)
     , m_injectedScriptManager(injectedScriptManager)
     , m_pausedScriptState(0)
     , m_continueToLocationBreakpointID(noBreakpointID)
@@ -136,7 +139,7 @@
     disable();
 }
 
-void InspectorDebuggerAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void InspectorDebuggerAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorDebuggerFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorDebuggerBackendDispatcher::create(backendDispatcher, this);
@@ -200,15 +203,15 @@
 
 static bool breakpointActionTypeForString(const String& typeString, ScriptBreakpointActionType* output)
 {
-    if (typeString == TypeBuilder::getEnumConstantValue(TypeBuilder::Debugger::BreakpointAction::Type::Log)) {
+    if (typeString == Inspector::TypeBuilder::getEnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Log)) {
         *output = ScriptBreakpointActionTypeLog;
         return true;
     }
-    if (typeString == TypeBuilder::getEnumConstantValue(TypeBuilder::Debugger::BreakpointAction::Type::Evaluate)) {
+    if (typeString == Inspector::TypeBuilder::getEnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Evaluate)) {
         *output = ScriptBreakpointActionTypeEvaluate;
         return true;
     }
-    if (typeString == TypeBuilder::getEnumConstantValue(TypeBuilder::Debugger::BreakpointAction::Type::Sound)) {
+    if (typeString == Inspector::TypeBuilder::getEnumConstantValue(Inspector::TypeBuilder::Debugger::BreakpointAction::Type::Sound)) {
         *output = ScriptBreakpointActionTypeSound;
         return true;
     }
@@ -255,9 +258,9 @@
     return true;
 }
 
-void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString* errorString, int lineNumber, const String* const optionalURL, const String* const optionalURLRegex, const int* const optionalColumnNumber, const RefPtr<InspectorObject>* options, TypeBuilder::Debugger::BreakpointId* outBreakpointIdentifier, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::Location>>& locations)
+void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString* errorString, int lineNumber, const String* const optionalURL, const String* const optionalURLRegex, const int* const optionalColumnNumber, const RefPtr<InspectorObject>* options, Inspector::TypeBuilder::Debugger::BreakpointId* outBreakpointIdentifier, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::Location>>& locations)
 {
-    locations = Array<TypeBuilder::Debugger::Location>::create();
+    locations = Array<Inspector::TypeBuilder::Debugger::Location>::create();
     if (!optionalURL == !optionalURLRegex) {
         *errorString = "Either url or urlRegex must be specified.";
         return;
@@ -294,7 +297,7 @@
         if (!matches(scriptURL, url, isRegex))
             continue;
 
-        RefPtr<TypeBuilder::Debugger::Location> location = resolveBreakpoint(breakpointIdentifier, it->key, breakpoint);
+        RefPtr<Inspector::TypeBuilder::Debugger::Location> location = resolveBreakpoint(breakpointIdentifier, it->key, breakpoint);
         if (location)
             locations->addItem(location);
     }
@@ -316,7 +319,7 @@
     return true;
 }
 
-void InspectorDebuggerAgent::setBreakpoint(ErrorString* errorString, const RefPtr<InspectorObject>& location, const RefPtr<InspectorObject>* options, TypeBuilder::Debugger::BreakpointId* outBreakpointIdentifier, RefPtr<TypeBuilder::Debugger::Location>& actualLocation)
+void InspectorDebuggerAgent::setBreakpoint(ErrorString* errorString, const RefPtr<InspectorObject>& location, const RefPtr<InspectorObject>* options, Inspector::TypeBuilder::Debugger::BreakpointId* outBreakpointIdentifier, RefPtr<Inspector::TypeBuilder::Debugger::Location>& actualLocation)
 {
     SourceID sourceID;
     unsigned lineNumber;
@@ -383,7 +386,7 @@
     resume(errorString);
 }
 
-PassRefPtr<TypeBuilder::Debugger::Location> InspectorDebuggerAgent::resolveBreakpoint(const String& breakpointIdentifier, SourceID sourceID, const ScriptBreakpoint& breakpoint)
+PassRefPtr<Inspector::TypeBuilder::Debugger::Location> InspectorDebuggerAgent::resolveBreakpoint(const String& breakpointIdentifier, SourceID sourceID, const ScriptBreakpoint& breakpoint)
 {
     ScriptsMap::iterator scriptIterator = m_scripts.find(sourceID);
     if (scriptIterator == m_scripts.end())
@@ -403,14 +406,14 @@
         debugServerBreakpointIDsIterator = m_breakpointIdentifierToDebugServerBreakpointIDs.set(breakpointIdentifier, Vector<BreakpointID>()).iterator;
     debugServerBreakpointIDsIterator->value.append(debugServerBreakpointID);
 
-    RefPtr<TypeBuilder::Debugger::Location> location = TypeBuilder::Debugger::Location::create()
+    RefPtr<Inspector::TypeBuilder::Debugger::Location> location = Inspector::TypeBuilder::Debugger::Location::create()
         .setScriptId(String::number(sourceID))
         .setLineNumber(actualLineNumber);
     location->setColumnNumber(actualColumnNumber);
     return location;
 }
 
-static PassRefPtr<InspectorObject> scriptToInspectorObject(ScriptObject scriptObject)
+static PassRefPtr<InspectorObject> scriptToInspectorObject(Deprecated::ScriptObject scriptObject)
 {
     if (scriptObject.hasNoValue())
         return 0;
@@ -420,7 +423,7 @@
     return value->asObject();
 }
 
-void InspectorDebuggerAgent::searchInContent(ErrorString* error, const String& scriptIDStr, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<Array<WebCore::TypeBuilder::Page::SearchMatch>>& results)
+void InspectorDebuggerAgent::searchInContent(ErrorString* error, const String& scriptIDStr, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<Array<Inspector::TypeBuilder::Page::SearchMatch>>& results)
 {
     bool isRegex = optionalIsRegex ? *optionalIsRegex : false;
     bool caseSensitive = optionalCaseSensitive ? *optionalCaseSensitive : false;
@@ -433,10 +436,10 @@
         *error = "No script for id: " + scriptIDStr;
 }
 
-void InspectorDebuggerAgent::setScriptSource(ErrorString* error, const String& scriptID, const String& newContent, const bool* const preview, RefPtr<Array<TypeBuilder::Debugger::CallFrame>>& newCallFrames, RefPtr<InspectorObject>& result)
+void InspectorDebuggerAgent::setScriptSource(ErrorString* error, const String& scriptID, const String& newContent, const bool* const preview, RefPtr<Array<Inspector::TypeBuilder::Debugger::CallFrame>>& newCallFrames, RefPtr<InspectorObject>& result)
 {
     bool previewOnly = preview && *preview;
-    ScriptObject resultObject;
+    Deprecated::ScriptObject resultObject;
     if (!scriptDebugServer().setScriptSource(scriptID, newContent, previewOnly, error, &m_currentCallStack, &resultObject))
         return;
     newCallFrames = currentCallFrames();
@@ -455,7 +458,7 @@
         *error = "No script for id: " + scriptIDStr;
 }
 
-void InspectorDebuggerAgent::getFunctionDetails(ErrorString* errorString, const String& functionId, RefPtr<TypeBuilder::Debugger::FunctionDetails>& details)
+void InspectorDebuggerAgent::getFunctionDetails(ErrorString* errorString, const String& functionId, RefPtr<Inspector::TypeBuilder::Debugger::FunctionDetails>& details)
 {
     InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(functionId);
     if (injectedScript.hasNoValue()) {
@@ -547,7 +550,7 @@
         *errorString = "Internal error. Could not change pause on exceptions state";
 }
 
-void InspectorDebuggerAgent::evaluateOnCallFrame(ErrorString* errorString, const String& callFrameId, const String& expression, const String* const objectGroup, const bool* const includeCommandLineAPI, const bool* const doNotPauseOnExceptionsAndMuteConsole, const bool* const returnByValue, const bool* generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>& result, TypeBuilder::OptOutput<bool>* wasThrown)
+void InspectorDebuggerAgent::evaluateOnCallFrame(ErrorString* errorString, const String& callFrameId, const String& expression, const String* const objectGroup, const bool* const includeCommandLineAPI, const bool* const doNotPauseOnExceptionsAndMuteConsole, const bool* const returnByValue, const bool* generatePreview, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result, Inspector::TypeBuilder::OptOutput<bool>* wasThrown)
 {
     InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(callFrameId);
     if (injectedScript.hasNoValue()) {
@@ -571,7 +574,7 @@
     }
 }
 
-void InspectorDebuggerAgent::compileScript(ErrorString* errorString, const String& expression, const String& sourceURL, TypeBuilder::OptOutput<ScriptId>* scriptID, TypeBuilder::OptOutput<String>* syntaxErrorMessage)
+void InspectorDebuggerAgent::compileScript(ErrorString* errorString, const String& expression, const String& sourceURL, Inspector::TypeBuilder::OptOutput<ScriptId>* scriptID, Inspector::TypeBuilder::OptOutput<String>* syntaxErrorMessage)
 {
     InjectedScript injectedScript = injectedScriptForEval(errorString, 0);
     if (injectedScript.hasNoValue()) {
@@ -590,7 +593,7 @@
     *scriptID = scriptIDValue;
 }
 
-void InspectorDebuggerAgent::runScript(ErrorString* errorString, const ScriptId& scriptID, const int* executionContextId, const String* const objectGroup, const bool* const doNotPauseOnExceptionsAndMuteConsole, RefPtr<TypeBuilder::Runtime::RemoteObject>& result, TypeBuilder::OptOutput<bool>* wasThrown)
+void InspectorDebuggerAgent::runScript(ErrorString* errorString, const ScriptId& scriptID, const int* executionContextId, const String* const objectGroup, const bool* const doNotPauseOnExceptionsAndMuteConsole, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result, Inspector::TypeBuilder::OptOutput<bool>* wasThrown)
 {
     InjectedScript injectedScript = injectedScriptForEval(errorString, executionContextId);
     if (injectedScript.hasNoValue()) {
@@ -605,7 +608,7 @@
         muteConsole();
     }
 
-    ScriptValue value;
+    Deprecated::ScriptValue value;
     bool wasThrownValue;
     String exceptionMessage;
     scriptDebugServer().runScript(injectedScript.scriptState(), scriptID, &value, &wasThrownValue, &exceptionMessage);
@@ -638,14 +641,14 @@
     }
 }
 
-PassRefPtr<Array<TypeBuilder::Debugger::CallFrame>> InspectorDebuggerAgent::currentCallFrames()
+PassRefPtr<Array<Inspector::TypeBuilder::Debugger::CallFrame>> InspectorDebuggerAgent::currentCallFrames()
 {
     if (!m_pausedScriptState)
-        return Array<TypeBuilder::Debugger::CallFrame>::create();
+        return Array<Inspector::TypeBuilder::Debugger::CallFrame>::create();
     InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(m_pausedScriptState);
     if (injectedScript.hasNoValue()) {
         ASSERT_NOT_REACHED();
-        return Array<TypeBuilder::Debugger::CallFrame>::create();
+        return Array<Inspector::TypeBuilder::Debugger::CallFrame>::create();
     }
     return injectedScript.wrapCallFrames(m_currentCallStack);
 }
@@ -715,7 +718,7 @@
             continue;
         }
 
-        RefPtr<TypeBuilder::Debugger::Location> location = resolveBreakpoint(it->key, sourceID, breakpoint);
+        RefPtr<Inspector::TypeBuilder::Debugger::Location> location = resolveBreakpoint(it->key, sourceID, breakpoint);
         if (location)
             m_frontendDispatcher->breakpointResolved(it->key, location);
     }
@@ -726,7 +729,7 @@
     m_frontendDispatcher->scriptFailedToParse(url, data, firstLine, errorLine, errorMessage);
 }
 
-void InspectorDebuggerAgent::didPause(JSC::ExecState* scriptState, const ScriptValue& callFrames, const ScriptValue& exception)
+void InspectorDebuggerAgent::didPause(JSC::ExecState* scriptState, const Deprecated::ScriptValue& callFrames, const Deprecated::ScriptValue& exception)
 {
     ASSERT(scriptState && !m_pausedScriptState);
     m_pausedScriptState = scriptState;
@@ -755,7 +758,7 @@
 void InspectorDebuggerAgent::didContinue()
 {
     m_pausedScriptState = 0;
-    m_currentCallStack = ScriptValue();
+    m_currentCallStack = Deprecated::ScriptValue();
     clearBreakDetails();
     m_frontendDispatcher->resumed();
 }
@@ -770,7 +773,7 @@
 void InspectorDebuggerAgent::clear()
 {
     m_pausedScriptState = 0;
-    m_currentCallStack = ScriptValue();
+    m_currentCallStack = Deprecated::ScriptValue();
     m_scripts.clear();
     m_breakpointIdentifierToDebugServerBreakpointIDs.clear();
     m_continueToLocationBreakpointID = noBreakpointID;
diff --git a/Source/WebCore/inspector/InspectorDebuggerAgent.h b/Source/WebCore/inspector/InspectorDebuggerAgent.h
index 4be6000..95eda06 100644
--- a/Source/WebCore/inspector/InspectorDebuggerAgent.h
+++ b/Source/WebCore/inspector/InspectorDebuggerAgent.h
@@ -31,12 +31,14 @@
 #define InspectorDebuggerAgent_h
 
 #if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR)
+
 #include "BreakpointID.h"
 #include "ConsoleAPITypes.h"
 #include "ConsoleTypes.h"
 #include "InjectedScript.h"
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
 #include "InspectorFrontend.h"
+#include "InspectorWebAgentBase.h"
 #include "ScriptBreakpoint.h"
 #include "ScriptDebugListener.h"
 #include "ScriptState.h"
@@ -48,19 +50,25 @@
 #include <wtf/Vector.h>
 #include <wtf/text/StringHash.h>
 
-namespace WebCore {
+namespace Deprecated {
+class ScriptValue;
+}
 
-class InjectedScriptManager;
+namespace Inspector {
 class InspectorArray;
 class InspectorObject;
 class InspectorValue;
+}
+
+namespace WebCore {
+
+class InjectedScriptManager;
 class InstrumentingAgents;
 class ScriptDebugServer;
-class ScriptValue;
 
 typedef String ErrorString;
 
-class InspectorDebuggerAgent : public InspectorBaseAgent, public ScriptDebugListener, public InspectorDebuggerBackendDispatcherHandler {
+class InspectorDebuggerAgent : public InspectorAgentBase, public ScriptDebugListener, public InspectorDebuggerBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent); WTF_MAKE_FAST_ALLOCATED;
 public:
     static const char* backtraceObjectGroup;
@@ -71,7 +79,7 @@
     virtual void canSetScriptSource(ErrorString*, bool*);
     virtual void supportsSeparateScriptCompilationAndExecution(ErrorString*, bool*);
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     bool isPaused();
@@ -83,15 +91,15 @@
     virtual void disable(ErrorString*);
     virtual void setBreakpointsActive(ErrorString*, bool active);
 
-    virtual void setBreakpointByUrl(ErrorString*, int lineNumber, const String* optionalURL, const String* optionalURLRegex, const int* optionalColumnNumber, const RefPtr<InspectorObject>* options, TypeBuilder::Debugger::BreakpointId*, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::Location>>& locations);
-    virtual void setBreakpoint(ErrorString*, const RefPtr<InspectorObject>& location, const RefPtr<InspectorObject>* options, TypeBuilder::Debugger::BreakpointId*, RefPtr<TypeBuilder::Debugger::Location>& actualLocation);
+    virtual void setBreakpointByUrl(ErrorString*, int lineNumber, const String* optionalURL, const String* optionalURLRegex, const int* optionalColumnNumber, const RefPtr<Inspector::InspectorObject>* options, Inspector::TypeBuilder::Debugger::BreakpointId*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::Location>>& locations);
+    virtual void setBreakpoint(ErrorString*, const RefPtr<Inspector::InspectorObject>& location, const RefPtr<Inspector::InspectorObject>* options, Inspector::TypeBuilder::Debugger::BreakpointId*, RefPtr<Inspector::TypeBuilder::Debugger::Location>& actualLocation);
     virtual void removeBreakpoint(ErrorString*, const String& breakpointIdentifier);
-    virtual void continueToLocation(ErrorString*, const RefPtr<InspectorObject>& location);
+    virtual void continueToLocation(ErrorString*, const RefPtr<Inspector::InspectorObject>& location);
 
-    virtual void searchInContent(ErrorString*, const String& scriptID, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch>>&);
-    virtual void setScriptSource(ErrorString*, const String& scriptID, const String& newContent, const bool* preview, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame>>& newCallFrames, RefPtr<InspectorObject>& result);
+    virtual void searchInContent(ErrorString*, const String& scriptID, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::SearchMatch>>&);
+    virtual void setScriptSource(ErrorString*, const String& scriptID, const String& newContent, const bool* preview, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::CallFrame>>& newCallFrames, RefPtr<Inspector::InspectorObject>& result);
     virtual void getScriptSource(ErrorString*, const String& scriptID, String* scriptSource);
-    virtual void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<TypeBuilder::Debugger::FunctionDetails>&);
+    virtual void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<Inspector::TypeBuilder::Debugger::FunctionDetails>&);
     virtual void pause(ErrorString*);
     virtual void resume(ErrorString*);
     virtual void stepOver(ErrorString*);
@@ -106,15 +114,15 @@
                              const bool* doNotPauseOnExceptionsAndMuteConsole,
                              const bool* returnByValue,
                              const bool* generatePreview,
-                             RefPtr<TypeBuilder::Runtime::RemoteObject>& result,
-                             TypeBuilder::OptOutput<bool>* wasThrown);
-    void compileScript(ErrorString*, const String& expression, const String& sourceURL, TypeBuilder::OptOutput<TypeBuilder::Debugger::ScriptId>*, TypeBuilder::OptOutput<String>* syntaxErrorMessage);
-    void runScript(ErrorString*, const TypeBuilder::Debugger::ScriptId&, const int* executionContextId, const String* objectGroup, const bool* doNotPauseOnExceptionsAndMuteConsole, RefPtr<TypeBuilder::Runtime::RemoteObject>& result, TypeBuilder::OptOutput<bool>* wasThrown);
+                             RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result,
+                             Inspector::TypeBuilder::OptOutput<bool>* wasThrown);
+    void compileScript(ErrorString*, const String& expression, const String& sourceURL, Inspector::TypeBuilder::OptOutput<Inspector::TypeBuilder::Debugger::ScriptId>*, Inspector::TypeBuilder::OptOutput<String>* syntaxErrorMessage);
+    void runScript(ErrorString*, const Inspector::TypeBuilder::Debugger::ScriptId&, const int* executionContextId, const String* objectGroup, const bool* doNotPauseOnExceptionsAndMuteConsole, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result, Inspector::TypeBuilder::OptOutput<bool>* wasThrown);
     virtual void setOverlayMessage(ErrorString*, const String*);
 
-    void schedulePauseOnNextStatement(InspectorDebuggerFrontendDispatcher::Reason::Enum breakReason, PassRefPtr<InspectorObject> data);
+    void schedulePauseOnNextStatement(InspectorDebuggerFrontendDispatcher::Reason::Enum breakReason, PassRefPtr<Inspector::InspectorObject> data);
     void cancelPauseOnNextStatement();
-    void breakProgram(InspectorDebuggerFrontendDispatcher::Reason::Enum breakReason, PassRefPtr<InspectorObject> data);
+    void breakProgram(InspectorDebuggerFrontendDispatcher::Reason::Enum breakReason, PassRefPtr<Inspector::InspectorObject> data);
     virtual void scriptExecutionBlockedByCSP(const String& directiveText);
 
     class Listener {
@@ -141,21 +149,21 @@
 
     virtual void enable();
     virtual void disable();
-    virtual void didPause(JSC::ExecState*, const ScriptValue& callFrames, const ScriptValue& exception);
+    virtual void didPause(JSC::ExecState*, const Deprecated::ScriptValue& callFrames, const Deprecated::ScriptValue& exception);
     virtual void didContinue();
     void reset();
 
 private:
     bool enabled() const { return m_enabled; };
 
-    PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame>> currentCallFrames();
+    PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::CallFrame>> currentCallFrames();
 
     virtual void didParseSource(SourceID, const Script&) OVERRIDE FINAL;
     virtual void failedToParseSource(const String& url, const String& data, int firstLine, int errorLine, const String& errorMessage) OVERRIDE FINAL;
 
     void setPauseOnExceptionsImpl(ErrorString*, int);
 
-    PassRefPtr<TypeBuilder::Debugger::Location> resolveBreakpoint(const String& breakpointIdentifier, SourceID, const ScriptBreakpoint&);
+    PassRefPtr<Inspector::TypeBuilder::Debugger::Location> resolveBreakpoint(const String& breakpointIdentifier, SourceID, const ScriptBreakpoint&);
     void clear();
     bool assertPaused(ErrorString*);
     void clearBreakDetails();
@@ -164,19 +172,19 @@
 
     typedef HashMap<SourceID, Script> ScriptsMap;
     typedef HashMap<String, Vector<BreakpointID>> BreakpointIdentifierToDebugServerBreakpointIDsMap;
-    typedef HashMap<String, RefPtr<InspectorObject>> BreakpointIdentifierToBreakpointMap;
+    typedef HashMap<String, RefPtr<Inspector::InspectorObject>> BreakpointIdentifierToBreakpointMap;
 
     InjectedScriptManager* m_injectedScriptManager;
     std::unique_ptr<InspectorDebuggerFrontendDispatcher> m_frontendDispatcher;
     RefPtr<InspectorDebuggerBackendDispatcher> m_backendDispatcher;
     JSC::ExecState* m_pausedScriptState;
-    ScriptValue m_currentCallStack;
+    Deprecated::ScriptValue m_currentCallStack;
     ScriptsMap m_scripts;
     BreakpointIdentifierToDebugServerBreakpointIDsMap m_breakpointIdentifierToDebugServerBreakpointIDs;
     BreakpointIdentifierToBreakpointMap m_javaScriptBreakpoints;
     BreakpointID m_continueToLocationBreakpointID;
     InspectorDebuggerFrontendDispatcher::Reason::Enum m_breakReason;
-    RefPtr<InspectorObject> m_breakAuxData;
+    RefPtr<Inspector::InspectorObject> m_breakAuxData;
     bool m_enabled;
     bool m_javaScriptPauseScheduled;
     Listener* m_listener;
diff --git a/Source/WebCore/inspector/InspectorForwarding.h b/Source/WebCore/inspector/InspectorForwarding.h
index f606594..f68fcdc 100644
--- a/Source/WebCore/inspector/InspectorForwarding.h
+++ b/Source/WebCore/inspector/InspectorForwarding.h
@@ -30,7 +30,7 @@
 #include <inspector/InspectorFrontendChannel.h>
 
 namespace WebCore {
-class InspectorFrontendChannel : public Inspector::InspectorFrontendChannel { };
+typedef Inspector::InspectorFrontendChannel InspectorFrontendChannel;
 }
 
 #endif // !defined(InspectorForwarding_h)
diff --git a/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp b/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
index 8711a8e..aa8ca0f 100644
--- a/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
+++ b/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
@@ -48,17 +48,19 @@
 #include "MainFrame.h"
 #include "Page.h"
 #include "ScriptController.h"
-#include "ScriptFunctionCall.h"
-#include "ScriptObject.h"
+#include "ScriptGlobalObject.h"
 #include "ScriptState.h"
 #include "Settings.h"
 #include "Timer.h"
 #include "UserGestureIndicator.h"
 #include "WindowFeatures.h"
+#include <bindings/ScriptValue.h>
 #include <wtf/Deque.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 static const char* inspectorAttachedHeightSetting = "inspectorAttachedHeight";
@@ -344,7 +346,7 @@
 
 bool InspectorFrontendClientLocal::evaluateAsBoolean(const String& expression)
 {
-    ScriptValue value = m_frontendPage->mainFrame().script().executeScript(expression);
+    Deprecated::ScriptValue value = m_frontendPage->mainFrame().script().executeScript(expression);
     return value.toString(mainWorldExecState(&m_frontendPage->mainFrame())) == "true";
 }
 
diff --git a/Source/WebCore/inspector/InspectorFrontendHost.cpp b/Source/WebCore/inspector/InspectorFrontendHost.cpp
index 04c9034..de3a913 100644
--- a/Source/WebCore/inspector/InspectorFrontendHost.cpp
+++ b/Source/WebCore/inspector/InspectorFrontendHost.cpp
@@ -46,6 +46,7 @@
 #include "InspectorAgent.h"
 #include "InspectorController.h"
 #include "InspectorFrontendClient.h"
+#include "JSMainThreadExecState.h"
 #include "MainFrame.h"
 #include "MouseEvent.h"
 #include "Page.h"
@@ -53,29 +54,33 @@
 #include "ResourceError.h"
 #include "ResourceRequest.h"
 #include "ResourceResponse.h"
-#include "ScriptFunctionCall.h"
+#include "ScriptGlobalObject.h"
+#include "ScriptState.h"
 #include "Sound.h"
 #include "UserGestureIndicator.h"
+#include <bindings/ScriptFunctionCall.h>
 #include <wtf/StdLibExtras.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 #if ENABLE(CONTEXT_MENUS)
 class FrontendMenuProvider : public ContextMenuProvider {
 public:
-    static PassRefPtr<FrontendMenuProvider> create(InspectorFrontendHost* frontendHost, ScriptObject frontendApiObject, const Vector<ContextMenuItem>& items)
+    static PassRefPtr<FrontendMenuProvider> create(InspectorFrontendHost* frontendHost, Deprecated::ScriptObject frontendApiObject, const Vector<ContextMenuItem>& items)
     {
         return adoptRef(new FrontendMenuProvider(frontendHost, frontendApiObject, items));
     }
     
     void disconnect()
     {
-        m_frontendApiObject = ScriptObject();
+        m_frontendApiObject = Deprecated::ScriptObject();
         m_frontendHost = 0;
     }
     
 private:
-    FrontendMenuProvider(InspectorFrontendHost* frontendHost, ScriptObject frontendApiObject, const Vector<ContextMenuItem>& items)
+    FrontendMenuProvider(InspectorFrontendHost* frontendHost, Deprecated::ScriptObject frontendApiObject, const Vector<ContextMenuItem>& items)
         : m_frontendHost(frontendHost)
         , m_frontendApiObject(frontendApiObject)
         , m_items(items)
@@ -99,7 +104,7 @@
             UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
             int itemNumber = item->action() - ContextMenuItemBaseCustomTag;
 
-            ScriptFunctionCall function(m_frontendApiObject, "contextMenuItemSelected");
+            Deprecated::ScriptFunctionCall function(m_frontendApiObject, "contextMenuItemSelected", WebCore::functionCallHandlerFromAnyThread);
             function.appendArgument(itemNumber);
             function.call();
         }
@@ -108,7 +113,7 @@
     virtual void contextMenuCleared()
     {
         if (m_frontendHost) {
-            ScriptFunctionCall function(m_frontendApiObject, "contextMenuCleared");
+            Deprecated::ScriptFunctionCall function(m_frontendApiObject, "contextMenuCleared", WebCore::functionCallHandlerFromAnyThread);
             function.call();
 
             m_frontendHost->m_menuProvider = 0;
@@ -117,7 +122,7 @@
     }
 
     InspectorFrontendHost* m_frontendHost;
-    ScriptObject m_frontendApiObject;
+    Deprecated::ScriptObject m_frontendApiObject;
     Vector<ContextMenuItem> m_items;
 };
 #endif
@@ -272,7 +277,7 @@
 
     ASSERT(m_frontendPage);
     JSC::ExecState* frontendExecState = execStateFromPage(debuggerWorld(), m_frontendPage);
-    ScriptObject frontendApiObject;
+    Deprecated::ScriptObject frontendApiObject;
     if (!ScriptGlobalObject::get(frontendExecState, "InspectorFrontendAPI", frontendApiObject)) {
         ASSERT_NOT_REACHED();
         return;
diff --git a/Source/WebCore/inspector/InspectorHeapProfilerAgent.cpp b/Source/WebCore/inspector/InspectorHeapProfilerAgent.cpp
index 0814a0f..7b788ab 100644
--- a/Source/WebCore/inspector/InspectorHeapProfilerAgent.cpp
+++ b/Source/WebCore/inspector/InspectorHeapProfilerAgent.cpp
@@ -39,6 +39,8 @@
 #include "InstrumentingAgents.h"
 #include "ScriptProfiler.h"
 
+using namespace Inspector;
+
 namespace WebCore {
 
 static const char* const UserInitiatedProfileNameHeap = "org.webkit.profiles.user-initiated";
@@ -49,7 +51,7 @@
 }
 
 InspectorHeapProfilerAgent::InspectorHeapProfilerAgent(InstrumentingAgents* instrumentingAgents, InjectedScriptManager* injectedScriptManager)
-    : InspectorBaseAgent(ASCIILiteral("HeapProfiler"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("HeapProfiler"), instrumentingAgents)
     , m_injectedScriptManager(injectedScriptManager)
     , m_nextUserInitiatedHeapSnapshotNumber(1)
     , m_profileHeadersRequested(false)
@@ -80,7 +82,7 @@
         m_frontendDispatcher->resetProfiles();
 }
 
-void InspectorHeapProfilerAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void InspectorHeapProfilerAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorHeapProfilerFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorHeapProfilerBackendDispatcher::create(backendDispatcher, this);
@@ -99,9 +101,9 @@
     ScriptProfiler::collectGarbage();
 }
 
-PassRefPtr<TypeBuilder::HeapProfiler::ProfileHeader> InspectorHeapProfilerAgent::createSnapshotHeader(const ScriptHeapSnapshot& snapshot)
+PassRefPtr<Inspector::TypeBuilder::HeapProfiler::ProfileHeader> InspectorHeapProfilerAgent::createSnapshotHeader(const ScriptHeapSnapshot& snapshot)
 {
-    RefPtr<TypeBuilder::HeapProfiler::ProfileHeader> header = TypeBuilder::HeapProfiler::ProfileHeader::create()
+    RefPtr<Inspector::TypeBuilder::HeapProfiler::ProfileHeader> header = Inspector::TypeBuilder::HeapProfiler::ProfileHeader::create()
         .setUid(snapshot.uid())
         .setTitle(snapshot.title());
     header->setMaxJSObjectId(snapshot.maxSnapshotJSObjectId());
@@ -113,10 +115,10 @@
     *result = ScriptProfiler::hasHeapProfiler();
 }
 
-void InspectorHeapProfilerAgent::getProfileHeaders(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::HeapProfiler::ProfileHeader>>& headers)
+void InspectorHeapProfilerAgent::getProfileHeaders(ErrorString*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::HeapProfiler::ProfileHeader>>& headers)
 {
     m_profileHeadersRequested = true;
-    headers = TypeBuilder::Array<TypeBuilder::HeapProfiler::ProfileHeader>::create();
+    headers = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::HeapProfiler::ProfileHeader>::create();
 
     IdToHeapSnapshotMap::iterator snapshotsEnd = m_snapshots.end();
     for (IdToHeapSnapshotMap::iterator it = m_snapshots.begin(); it != snapshotsEnd; ++it)
@@ -190,7 +192,7 @@
     }
 }
 
-void InspectorHeapProfilerAgent::getObjectByHeapObjectId(ErrorString* error, const String& heapSnapshotObjectId, const String* objectGroup, RefPtr<TypeBuilder::Runtime::RemoteObject>& result)
+void InspectorHeapProfilerAgent::getObjectByHeapObjectId(ErrorString* error, const String& heapSnapshotObjectId, const String* objectGroup, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result)
 {
     bool ok;
     unsigned id = heapSnapshotObjectId.toUInt(&ok);
@@ -198,7 +200,7 @@
         *error = "Invalid heap snapshot object id";
         return;
     }
-    ScriptObject heapObject = ScriptProfiler::objectByHeapObjectId(id);
+    Deprecated::ScriptObject heapObject = ScriptProfiler::objectByHeapObjectId(id);
     if (heapObject.hasNoValue()) {
         *error = "Object is not available";
         return;
@@ -220,7 +222,7 @@
         *errorString = "Inspected context has gone";
         return;
     }
-    ScriptValue value = injectedScript.findObjectById(objectId);
+    Deprecated::ScriptValue value = injectedScript.findObjectById(objectId);
     if (value.hasNoValue() || value.isUndefined()) {
         *errorString = "Object with given id not found";
         return;
diff --git a/Source/WebCore/inspector/InspectorHeapProfilerAgent.h b/Source/WebCore/inspector/InspectorHeapProfilerAgent.h
index cc36868..62c13e4 100644
--- a/Source/WebCore/inspector/InspectorHeapProfilerAgent.h
+++ b/Source/WebCore/inspector/InspectorHeapProfilerAgent.h
@@ -33,8 +33,9 @@
 
 #if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR)
 
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
 #include "InspectorFrontend.h"
+#include "InspectorWebAgentBase.h"
 #include <wtf/Forward.h>
 #include <wtf/HashMap.h>
 #include <wtf/Noncopyable.h>
@@ -49,7 +50,7 @@
 
 typedef String ErrorString;
 
-class InspectorHeapProfilerAgent : public InspectorBaseAgent, public InspectorHeapProfilerBackendDispatcherHandler {
+class InspectorHeapProfilerAgent : public InspectorAgentBase, public InspectorHeapProfilerBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorHeapProfilerAgent); WTF_MAKE_FAST_ALLOCATED;
 public:
     static PassOwnPtr<InspectorHeapProfilerAgent> create(InstrumentingAgents*, InjectedScriptManager*);
@@ -61,16 +62,16 @@
 
     virtual void hasHeapProfiler(ErrorString*, bool*);
 
-    virtual void getProfileHeaders(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::HeapProfiler::ProfileHeader>>&);
+    virtual void getProfileHeaders(ErrorString*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::HeapProfiler::ProfileHeader>>&);
     virtual void getHeapSnapshot(ErrorString*, int uid);
     virtual void removeProfile(ErrorString*, int uid);
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     virtual void takeHeapSnapshot(ErrorString*, const bool* reportProgress);
 
-    virtual void getObjectByHeapObjectId(ErrorString*, const String& heapSnapshotObjectId, const String* objectGroup, RefPtr<TypeBuilder::Runtime::RemoteObject>& result);
+    virtual void getObjectByHeapObjectId(ErrorString*, const String& heapSnapshotObjectId, const String* objectGroup, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result);
     virtual void getHeapObjectId(ErrorString*, const String& objectId, String* heapSnapshotObjectId);
 
 private:
@@ -80,7 +81,7 @@
 
     void resetFrontendProfiles();
 
-    PassRefPtr<TypeBuilder::HeapProfiler::ProfileHeader> createSnapshotHeader(const ScriptHeapSnapshot&);
+    PassRefPtr<Inspector::TypeBuilder::HeapProfiler::ProfileHeader> createSnapshotHeader(const ScriptHeapSnapshot&);
 
     InjectedScriptManager* m_injectedScriptManager;
     std::unique_ptr<InspectorHeapProfilerFrontendDispatcher> m_frontendDispatcher;
diff --git a/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp b/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp
index a025713..fb42f87 100644
--- a/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp
+++ b/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp
@@ -61,27 +61,28 @@
 #include "InjectedScript.h"
 #include "InspectorFrontend.h"
 #include "InspectorPageAgent.h"
-#include "InspectorValues.h"
 #include "InstrumentingAgents.h"
 #include "SecurityOrigin.h"
-
+#include <inspector/InspectorValues.h>
 #include <wtf/Vector.h>
 
-using WebCore::TypeBuilder::Array;
-using WebCore::TypeBuilder::IndexedDB::DatabaseWithObjectStores;
-using WebCore::TypeBuilder::IndexedDB::DataEntry;
-using WebCore::TypeBuilder::IndexedDB::Key;
-using WebCore::TypeBuilder::IndexedDB::KeyPath;
-using WebCore::TypeBuilder::IndexedDB::KeyRange;
-using WebCore::TypeBuilder::IndexedDB::ObjectStore;
-using WebCore::TypeBuilder::IndexedDB::ObjectStoreIndex;
+using Inspector::TypeBuilder::Array;
+using Inspector::TypeBuilder::IndexedDB::DatabaseWithObjectStores;
+using Inspector::TypeBuilder::IndexedDB::DataEntry;
+using Inspector::TypeBuilder::IndexedDB::Key;
+using Inspector::TypeBuilder::IndexedDB::KeyPath;
+using Inspector::TypeBuilder::IndexedDB::KeyRange;
+using Inspector::TypeBuilder::IndexedDB::ObjectStore;
+using Inspector::TypeBuilder::IndexedDB::ObjectStoreIndex;
 
+typedef Inspector::InspectorBackendDispatcher::CallbackBase RequestCallback;
 typedef WebCore::InspectorIndexedDBBackendDispatcherHandler::RequestDatabaseNamesCallback RequestDatabaseNamesCallback;
 typedef WebCore::InspectorIndexedDBBackendDispatcherHandler::RequestDatabaseCallback RequestDatabaseCallback;
 typedef WebCore::InspectorIndexedDBBackendDispatcherHandler::RequestDataCallback RequestDataCallback;
-typedef WebCore::InspectorBackendDispatcher::CallbackBase RequestCallback;
 typedef WebCore::InspectorIndexedDBBackendDispatcherHandler::ClearObjectStoreCallback ClearObjectStoreCallback;
 
+using namespace Inspector;
+
 namespace WebCore {
 
 namespace {
@@ -123,7 +124,7 @@
         }
 
         RefPtr<DOMStringList> databaseNamesList = requestResult->domStringList();
-        RefPtr<TypeBuilder::Array<String>> databaseNames = TypeBuilder::Array<String>::create();
+        RefPtr<Inspector::TypeBuilder::Array<String>> databaseNames = Inspector::TypeBuilder::Array<String>::create();
         for (size_t i = 0; i < databaseNamesList->length(); ++i)
             databaseNames->addItem(databaseNamesList->item(i));
         m_requestCallback->sendSuccess(databaseNames.release());
@@ -250,7 +251,7 @@
         break;
     case IDBKeyPath::ArrayType: {
         keyPath = KeyPath::create().setType(KeyPath::Type::Array);
-        RefPtr<TypeBuilder::Array<String>> array = TypeBuilder::Array<String>::create();
+        RefPtr<Inspector::TypeBuilder::Array<String>> array = Inspector::TypeBuilder::Array<String>::create();
         const Vector<String>& stringArray = idbKeyPath.array();
         for (size_t i = 0; i < stringArray.size(); ++i)
             array->addItem(stringArray[i]);
@@ -285,12 +286,12 @@
 
         const IDBDatabaseMetadata databaseMetadata = idbDatabase->metadata();
 
-        RefPtr<TypeBuilder::Array<TypeBuilder::IndexedDB::ObjectStore>> objectStores = TypeBuilder::Array<TypeBuilder::IndexedDB::ObjectStore>::create();
+        RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::IndexedDB::ObjectStore>> objectStores = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::IndexedDB::ObjectStore>::create();
 
         for (IDBDatabaseMetadata::ObjectStoreMap::const_iterator it = databaseMetadata.objectStores.begin(); it != databaseMetadata.objectStores.end(); ++it) {
             const IDBObjectStoreMetadata& objectStoreMetadata = it->value;
 
-            RefPtr<TypeBuilder::Array<TypeBuilder::IndexedDB::ObjectStoreIndex>> indexes = TypeBuilder::Array<TypeBuilder::IndexedDB::ObjectStoreIndex>::create();
+            RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::IndexedDB::ObjectStoreIndex>> indexes = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::IndexedDB::ObjectStoreIndex>::create();
 
             for (IDBObjectStoreMetadata::IndexMap::const_iterator it = objectStoreMetadata.indexes.begin(); it != objectStoreMetadata.indexes.end(); ++it) {
                 const IDBIndexMetadata& indexMetadata = it->value;
@@ -557,7 +558,7 @@
 } // namespace
 
 InspectorIndexedDBAgent::InspectorIndexedDBAgent(InstrumentingAgents* instrumentingAgents, InjectedScriptManager* injectedScriptManager, InspectorPageAgent* pageAgent)
-    : InspectorBaseAgent(ASCIILiteral("IndexedDB"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("IndexedDB"), instrumentingAgents)
     , m_injectedScriptManager(injectedScriptManager)
     , m_pageAgent(pageAgent)
 {
@@ -567,7 +568,7 @@
 {
 }
 
-void InspectorIndexedDBAgent::didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher* backendDispatcher)
+void InspectorIndexedDBAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, InspectorBackendDispatcher* backendDispatcher)
 {
     m_backendDispatcher = InspectorIndexedDBBackendDispatcher::create(backendDispatcher, this);
 }
diff --git a/Source/WebCore/inspector/InspectorIndexedDBAgent.h b/Source/WebCore/inspector/InspectorIndexedDBAgent.h
index ba3759a..b955210 100644
--- a/Source/WebCore/inspector/InspectorIndexedDBAgent.h
+++ b/Source/WebCore/inspector/InspectorIndexedDBAgent.h
@@ -33,7 +33,8 @@
 
 #if ENABLE(INSPECTOR) && ENABLE(INDEXED_DATABASE)
 
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
+#include "InspectorWebAgentBase.h"
 #include <wtf/PassOwnPtr.h>
 #include <wtf/text/WTFString.h>
 
@@ -44,7 +45,7 @@
 
 typedef String ErrorString;
 
-class InspectorIndexedDBAgent : public InspectorBaseAgent, public InspectorIndexedDBBackendDispatcherHandler {
+class InspectorIndexedDBAgent : public InspectorAgentBase, public InspectorIndexedDBBackendDispatcherHandler {
 public:
     static PassOwnPtr<InspectorIndexedDBAgent> create(InstrumentingAgents* instrumentingAgents, InjectedScriptManager* injectedScriptManager, InspectorPageAgent* pageAgent)
     {
@@ -52,7 +53,7 @@
     }
     ~InspectorIndexedDBAgent();
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     // Called from the front-end.
@@ -60,7 +61,7 @@
     virtual void disable(ErrorString*);
     virtual void requestDatabaseNames(ErrorString*, const String& securityOrigin, PassRefPtr<RequestDatabaseNamesCallback>);
     virtual void requestDatabase(ErrorString*, const String& securityOrigin, const String& databaseName, PassRefPtr<RequestDatabaseCallback>);
-    virtual void requestData(ErrorString*, const String& securityOrigin, const String& databaseName, const String& objectStoreName, const String& indexName, int skipCount, int pageSize, const RefPtr<InspectorObject>* keyRange, PassRefPtr<RequestDataCallback>);
+    virtual void requestData(ErrorString*, const String& securityOrigin, const String& databaseName, const String& objectStoreName, const String& indexName, int skipCount, int pageSize, const RefPtr<Inspector::InspectorObject>* keyRange, PassRefPtr<RequestDataCallback>);
     virtual void clearObjectStore(ErrorString*, const String& in_securityOrigin, const String& in_databaseName, const String& in_objectStoreName, PassRefPtr<ClearObjectStoreCallback>);
 
 private:
diff --git a/Source/WebCore/inspector/InspectorInputAgent.cpp b/Source/WebCore/inspector/InspectorInputAgent.cpp
index 7eccb8d..c4b8789 100644
--- a/Source/WebCore/inspector/InspectorInputAgent.cpp
+++ b/Source/WebCore/inspector/InspectorInputAgent.cpp
@@ -49,10 +49,12 @@
 #include <wtf/CurrentTime.h>
 #include <wtf/text/WTFString.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 InspectorInputAgent::InspectorInputAgent(InstrumentingAgents* instrumentingAgents, Page* page)
-    : InspectorBaseAgent(ASCIILiteral("Input"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("Input"), instrumentingAgents)
     , m_page(page)
 {
 }
@@ -61,7 +63,7 @@
 {
 }
 
-void InspectorInputAgent::didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher* backendDispatcher)
+void InspectorInputAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, InspectorBackendDispatcher* backendDispatcher)
 {
     m_backendDispatcher = InspectorInputBackendDispatcher::create(backendDispatcher, this);
 }
diff --git a/Source/WebCore/inspector/InspectorInputAgent.h b/Source/WebCore/inspector/InspectorInputAgent.h
index acba299..4e062aa 100644
--- a/Source/WebCore/inspector/InspectorInputAgent.h
+++ b/Source/WebCore/inspector/InspectorInputAgent.h
@@ -33,8 +33,8 @@
 
 #if ENABLE(INSPECTOR)
 
-#include "InspectorBaseAgent.h"
-
+#include "InspectorBackendDispatchers.h"
+#include "InspectorWebAgentBase.h"
 #include <wtf/Noncopyable.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/text/WTFString.h>
@@ -44,7 +44,7 @@
 
 typedef String ErrorString;
 
-class InspectorInputAgent : public InspectorBaseAgent, public InspectorInputBackendDispatcherHandler {
+class InspectorInputAgent : public InspectorAgentBase, public InspectorInputBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorInputAgent);
 public:
     static PassOwnPtr<InspectorInputAgent> create(InstrumentingAgents* instrumentingAgents, Page* page)
@@ -54,7 +54,7 @@
 
     ~InspectorInputAgent();
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     // Methods called from the frontend for simulating input.
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp
index c4c51cb..117db15 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.cpp
+++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp
@@ -83,6 +83,8 @@
 #include <wtf/StdLibExtras.h>
 #include <wtf/text/CString.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 static const char* const requestAnimationFrameEventName = "requestAnimationFrame";
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.h b/Source/WebCore/inspector/InspectorInstrumentation.h
index bd5c952..33b6bc0 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.h
+++ b/Source/WebCore/inspector/InspectorInstrumentation.h
@@ -45,6 +45,10 @@
 #include "WebSocketFrame.h"
 #include <wtf/RefPtr.h>
 
+namespace Deprecated {
+class ScriptObject;
+}
+
 namespace WebCore {
 
 class CSSRule;
@@ -77,7 +81,6 @@
 class ScriptArguments;
 class ScriptCallStack;
 class ScriptExecutionContext;
-class ScriptObject;
 class ScriptProfile;
 class SecurityOrigin;
 class ShadowRoot;
@@ -276,9 +279,9 @@
     static void didReceiveWebSocketFrameError(Document*, unsigned long identifier, const String& errorMessage);
 #endif
 
-    static ScriptObject wrapCanvas2DRenderingContextForInstrumentation(Document*, const ScriptObject&);
+    static Deprecated::ScriptObject wrapCanvas2DRenderingContextForInstrumentation(Document*, const Deprecated::ScriptObject&);
 #if ENABLE(WEBGL)
-    static ScriptObject wrapWebGLRenderingContextForInstrumentation(Document*, const ScriptObject&);
+    static Deprecated::ScriptObject wrapWebGLRenderingContextForInstrumentation(Document*, const Deprecated::ScriptObject&);
 #endif
 
     static void networkStateChanged(Page*);
diff --git a/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp b/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp
index d27f909..c415bfa 100644
--- a/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp
+++ b/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp
@@ -46,10 +46,12 @@
 #include "RenderLayerCompositor.h"
 #include "RenderView.h"
 
+using namespace Inspector;
+
 namespace WebCore {
 
 InspectorLayerTreeAgent::InspectorLayerTreeAgent(InstrumentingAgents* instrumentingAgents)
-    : InspectorBaseAgent(ASCIILiteral("LayerTree"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("LayerTree"), instrumentingAgents)
 {
 }
 
@@ -58,7 +60,7 @@
     reset();
 }
 
-void InspectorLayerTreeAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void InspectorLayerTreeAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorLayerTreeFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorLayerTreeBackendDispatcher::create(backendDispatcher, this);
@@ -105,9 +107,9 @@
     unbindPseudoElement(pseudoElement);
 }
 
-void InspectorLayerTreeAgent::layersForNode(ErrorString* errorString, int nodeId, RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer>>& layers)
+void InspectorLayerTreeAgent::layersForNode(ErrorString* errorString, int nodeId, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::LayerTree::Layer>>& layers)
 {
-    layers = TypeBuilder::Array<TypeBuilder::LayerTree::Layer>::create();
+    layers = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::LayerTree::Layer>::create();
 
     Node* node = m_instrumentingAgents->inspectorDOMAgent()->nodeForId(nodeId);
     if (!node) {
@@ -124,7 +126,7 @@
     gatherLayersUsingRenderObjectHierarchy(errorString, renderer, layers);
 }
 
-void InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy(ErrorString* errorString, RenderObject* renderer, RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer>>& layers)
+void InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy(ErrorString* errorString, RenderObject* renderer, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::LayerTree::Layer>>& layers)
 {
     if (renderer->hasLayer()) {
         gatherLayersUsingRenderLayerHierarchy(errorString, toRenderLayerModelObject(renderer)->layer(), layers);
@@ -135,7 +137,7 @@
         gatherLayersUsingRenderObjectHierarchy(errorString, renderer, layers);
 }
 
-void InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy(ErrorString* errorString, RenderLayer* renderLayer, RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer>>& layers)
+void InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy(ErrorString* errorString, RenderLayer* renderLayer, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::LayerTree::Layer>>& layers)
 {
     if (renderLayer->isComposited())
         layers->addItem(buildObjectForLayer(errorString, renderLayer));
@@ -144,7 +146,7 @@
         gatherLayersUsingRenderLayerHierarchy(errorString, renderLayer, layers);
 }
 
-PassRefPtr<TypeBuilder::LayerTree::Layer> InspectorLayerTreeAgent::buildObjectForLayer(ErrorString* errorString, RenderLayer* renderLayer)
+PassRefPtr<Inspector::TypeBuilder::LayerTree::Layer> InspectorLayerTreeAgent::buildObjectForLayer(ErrorString* errorString, RenderLayer* renderLayer)
 {
     RenderObject* renderer = &renderLayer->renderer();
     RenderLayerBacking* backing = renderLayer->backing();
@@ -164,7 +166,7 @@
         node = renderer->parent()->element();
 
     // Basic set of properties.
-    RefPtr<TypeBuilder::LayerTree::Layer> layerObject = TypeBuilder::LayerTree::Layer::create()
+    RefPtr<Inspector::TypeBuilder::LayerTree::Layer> layerObject = Inspector::TypeBuilder::LayerTree::Layer::create()
         .setLayerId(bind(renderLayer))
         .setNodeId(idForNode(errorString, node))
         .setBounds(buildObjectForIntRect(renderer->absoluteBoundingBoxRect()))
@@ -216,16 +218,16 @@
     return nodeId;
 }
 
-PassRefPtr<TypeBuilder::LayerTree::IntRect> InspectorLayerTreeAgent::buildObjectForIntRect(const IntRect& rect)
+PassRefPtr<Inspector::TypeBuilder::LayerTree::IntRect> InspectorLayerTreeAgent::buildObjectForIntRect(const IntRect& rect)
 {
-    return TypeBuilder::LayerTree::IntRect::create()
+    return Inspector::TypeBuilder::LayerTree::IntRect::create()
         .setX(rect.x())
         .setY(rect.y())
         .setWidth(rect.width())
         .setHeight(rect.height()).release();
 }
 
-void InspectorLayerTreeAgent::reasonsForCompositingLayer(ErrorString* errorString, const String& layerId, RefPtr<TypeBuilder::LayerTree::CompositingReasons>& compositingReasons)
+void InspectorLayerTreeAgent::reasonsForCompositingLayer(ErrorString* errorString, const String& layerId, RefPtr<Inspector::TypeBuilder::LayerTree::CompositingReasons>& compositingReasons)
 {
     const RenderLayer* renderLayer = m_idToLayer.get(layerId);
 
@@ -235,7 +237,7 @@
     }
 
     CompositingReasons reasonsBitmask = renderLayer->compositor().reasonsForCompositing(*renderLayer);
-    compositingReasons = TypeBuilder::LayerTree::CompositingReasons::create();
+    compositingReasons = Inspector::TypeBuilder::LayerTree::CompositingReasons::create();
 
     if (reasonsBitmask & CompositingReason3DTransform)
         compositingReasons->setTransform3D(true);
diff --git a/Source/WebCore/inspector/InspectorLayerTreeAgent.h b/Source/WebCore/inspector/InspectorLayerTreeAgent.h
index af55a92..174560d 100644
--- a/Source/WebCore/inspector/InspectorLayerTreeAgent.h
+++ b/Source/WebCore/inspector/InspectorLayerTreeAgent.h
@@ -31,9 +31,10 @@
 
 #if ENABLE(INSPECTOR)
 
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
 #include "InspectorFrontend.h"
-#include "InspectorTypeBuilder.h"
+#include "InspectorWebAgentBase.h"
+#include "InspectorWebTypeBuilders.h"
 #include "RenderLayer.h"
 #include <wtf/PassOwnPtr.h>
 #include <wtf/PassRefPtr.h>
@@ -46,7 +47,7 @@
 
 typedef String ErrorString;
 
-class InspectorLayerTreeAgent : public InspectorBaseAgent, public InspectorLayerTreeBackendDispatcherHandler {
+class InspectorLayerTreeAgent : public InspectorAgentBase, public InspectorLayerTreeBackendDispatcherHandler {
 public:
     static PassOwnPtr<InspectorLayerTreeAgent> create(InstrumentingAgents* instrumentingAgents)
     {
@@ -54,7 +55,7 @@
     }
     ~InspectorLayerTreeAgent();
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
     void reset();
 
@@ -65,8 +66,8 @@
     // Called from the front-end.
     virtual void enable(ErrorString*);
     virtual void disable(ErrorString*);
-    virtual void layersForNode(ErrorString*, int nodeId, RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer>>&);
-    virtual void reasonsForCompositingLayer(ErrorString*, const String& layerId, RefPtr<TypeBuilder::LayerTree::CompositingReasons>&);
+    virtual void layersForNode(ErrorString*, int nodeId, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::LayerTree::Layer>>&);
+    virtual void reasonsForCompositingLayer(ErrorString*, const String& layerId, RefPtr<Inspector::TypeBuilder::LayerTree::CompositingReasons>&);
 
 private:
     InspectorLayerTreeAgent(InstrumentingAgents*);
@@ -75,11 +76,11 @@
     String bind(const RenderLayer*);
     void unbind(const RenderLayer*);
 
-    void gatherLayersUsingRenderObjectHierarchy(ErrorString*, RenderObject*, RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer>>&);
-    void gatherLayersUsingRenderLayerHierarchy(ErrorString*, RenderLayer*, RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer>>&);
+    void gatherLayersUsingRenderObjectHierarchy(ErrorString*, RenderObject*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::LayerTree::Layer>>&);
+    void gatherLayersUsingRenderLayerHierarchy(ErrorString*, RenderLayer*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::LayerTree::Layer>>&);
 
-    PassRefPtr<TypeBuilder::LayerTree::Layer> buildObjectForLayer(ErrorString*, RenderLayer*);
-    PassRefPtr<TypeBuilder::LayerTree::IntRect> buildObjectForIntRect(const IntRect&);
+    PassRefPtr<Inspector::TypeBuilder::LayerTree::Layer> buildObjectForLayer(ErrorString*, RenderLayer*);
+    PassRefPtr<Inspector::TypeBuilder::LayerTree::IntRect> buildObjectForIntRect(const IntRect&);
 
     int idForNode(ErrorString*, Node*);
 
diff --git a/Source/WebCore/inspector/InspectorMemoryAgent.cpp b/Source/WebCore/inspector/InspectorMemoryAgent.cpp
index 758b7b4..32d01ff 100644
--- a/Source/WebCore/inspector/InspectorMemoryAgent.cpp
+++ b/Source/WebCore/inspector/InspectorMemoryAgent.cpp
@@ -41,13 +41,13 @@
 #include "Frame.h"
 #include "InspectorDOMStorageAgent.h"
 #include "InspectorFrontend.h"
-#include "InspectorValues.h"
 #include "InstrumentingAgents.h"
 #include "MemoryCache.h"
 #include "Node.h"
 #include "NodeTraversal.h"
 #include "ScriptProfiler.h"
 #include "StyledElement.h"
+#include <inspector/InspectorValues.h>
 #include <runtime/ArrayBufferView.h>
 #include <wtf/HashSet.h>
 #include <wtf/OwnPtr.h>
@@ -58,8 +58,10 @@
 #include <wtf/text/WTFString.h>
 
 // Use a type alias instead of 'using' here which would cause a conflict on Mac.
-typedef WebCore::TypeBuilder::Memory::MemoryBlock InspectorMemoryBlock;
-typedef WebCore::TypeBuilder::Array<InspectorMemoryBlock> InspectorMemoryBlocks;
+typedef Inspector::TypeBuilder::Memory::MemoryBlock InspectorMemoryBlock;
+typedef Inspector::TypeBuilder::Array<InspectorMemoryBlock> InspectorMemoryBlocks;
+
+using namespace Inspector;
 
 namespace WebCore {
 
@@ -67,7 +69,7 @@
 {
 }
 
-void InspectorMemoryAgent::didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher* backendDispatcher)
+void InspectorMemoryAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, InspectorBackendDispatcher* backendDispatcher)
 {
     m_backendDispatcher = InspectorMemoryBackendDispatcher::create(backendDispatcher, this);
 }
@@ -85,7 +87,7 @@
 }
 
 InspectorMemoryAgent::InspectorMemoryAgent(InstrumentingAgents* instrumentingAgents)
-    : InspectorBaseAgent(ASCIILiteral("Memory"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("Memory"), instrumentingAgents)
 {
 }
 
diff --git a/Source/WebCore/inspector/InspectorMemoryAgent.h b/Source/WebCore/inspector/InspectorMemoryAgent.h
index e1910de..8f15654 100644
--- a/Source/WebCore/inspector/InspectorMemoryAgent.h
+++ b/Source/WebCore/inspector/InspectorMemoryAgent.h
@@ -33,8 +33,8 @@
 
 #if ENABLE(INSPECTOR)
 
-#include "InspectorBaseAgent.h"
-#include "InspectorFrontend.h"
+#include "InspectorBackendDispatchers.h"
+#include "InspectorWebAgentBase.h"
 #include <wtf/PassOwnPtr.h>
 #include <wtf/RefPtr.h>
 
@@ -45,13 +45,13 @@
 
 typedef String ErrorString;
 
-class InspectorMemoryAgent : public InspectorBaseAgent, public InspectorMemoryBackendDispatcherHandler {
+class InspectorMemoryAgent : public InspectorAgentBase, public InspectorMemoryBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorMemoryAgent);
 public:
     static PassOwnPtr<InspectorMemoryAgent> create(InstrumentingAgents* instrumentingAgents);
     virtual ~InspectorMemoryAgent();
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     virtual void getDOMCounters(ErrorString*, int* documents, int* nodes, int* jsEventListeners);
diff --git a/Source/WebCore/inspector/InspectorOverlay.cpp b/Source/WebCore/inspector/InspectorOverlay.cpp
index 0329be7..05eaa12 100644
--- a/Source/WebCore/inspector/InspectorOverlay.cpp
+++ b/Source/WebCore/inspector/InspectorOverlay.cpp
@@ -39,7 +39,6 @@
 #include "GraphicsContext.h"
 #include "InspectorClient.h"
 #include "InspectorOverlayPage.h"
-#include "InspectorValues.h"
 #include "MainFrame.h"
 #include "Node.h"
 #include "Page.h"
@@ -55,11 +54,14 @@
 #include "RenderView.h"
 #include "ScriptController.h"
 #include "ScriptSourceCode.h"
-#include "ScriptValue.h"
 #include "Settings.h"
 #include "StyledElement.h"
+#include <bindings/ScriptValue.h>
+#include <inspector/InspectorValues.h>
 #include <wtf/text/StringBuilder.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 namespace {
diff --git a/Source/WebCore/inspector/InspectorOverlay.h b/Source/WebCore/inspector/InspectorOverlay.h
index ef99230..b529228 100644
--- a/Source/WebCore/inspector/InspectorOverlay.h
+++ b/Source/WebCore/inspector/InspectorOverlay.h
@@ -32,20 +32,22 @@
 #include "Color.h"
 #include "FloatQuad.h"
 #include "LayoutRect.h"
-
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/RefPtr.h>
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
+namespace Inspector {
+class InspectorObject;
+class InspectorValue;
+}
+
 namespace WebCore {
 
 class Color;
 class GraphicsContext;
 class InspectorClient;
-class InspectorValue;
-class InspectorObject;
 class IntRect;
 class Node;
 class Page;
@@ -124,7 +126,7 @@
 
     void didSetSearchingForNode(bool enabled);
 
-    PassRefPtr<InspectorObject> buildObjectForHighlightedNode() const;
+    PassRefPtr<Inspector::InspectorObject> buildObjectForHighlightedNode() const;
 
     void freePage();
 private:
@@ -137,7 +139,7 @@
     Page* overlayPage();
     void reset(const IntSize& viewportSize, const IntSize& frameViewFullSize);
     void evaluateInOverlay(const String& method, const String& argument);
-    void evaluateInOverlay(const String& method, PassRefPtr<InspectorValue> argument);
+    void evaluateInOverlay(const String& method, PassRefPtr<Inspector::InspectorValue> argument);
 
     Page* m_page;
     InspectorClient* m_client;
diff --git a/Source/WebCore/inspector/InspectorPageAgent.cpp b/Source/WebCore/inspector/InspectorPageAgent.cpp
index c0bed9e..f4dbfd5 100644
--- a/Source/WebCore/inspector/InspectorPageAgent.cpp
+++ b/Source/WebCore/inspector/InspectorPageAgent.cpp
@@ -66,7 +66,6 @@
 #include "InspectorFrontend.h"
 #include "InspectorInstrumentation.h"
 #include "InspectorOverlay.h"
-#include "InspectorValues.h"
 #include "InstrumentingAgents.h"
 #include "MainFrame.h"
 #include "MemoryCache.h"
@@ -74,12 +73,13 @@
 #include "RegularExpression.h"
 #include "ResourceBuffer.h"
 #include "ScriptController.h"
-#include "ScriptObject.h"
 #include "SecurityOrigin.h"
 #include "Settings.h"
 #include "TextEncoding.h"
 #include "TextResourceDecoder.h"
 #include "UserGestureIndicator.h"
+#include <bindings/ScriptValue.h>
+#include <inspector/InspectorValues.h>
 #include <wtf/CurrentTime.h>
 #include <wtf/ListHashSet.h>
 #include <wtf/Vector.h>
@@ -90,6 +90,8 @@
 #include "LegacyWebArchive.h"
 #endif
 
+using namespace Inspector;
+
 namespace WebCore {
 
 static bool decodeBuffer(const char* buffer, unsigned size, const String& textEncodingName, String* result)
@@ -297,27 +299,27 @@
     return cachedResource;
 }
 
-TypeBuilder::Page::ResourceType::Enum InspectorPageAgent::resourceTypeJson(InspectorPageAgent::ResourceType resourceType)
+Inspector::TypeBuilder::Page::ResourceType::Enum InspectorPageAgent::resourceTypeJson(InspectorPageAgent::ResourceType resourceType)
 {
     switch (resourceType) {
     case DocumentResource:
-        return TypeBuilder::Page::ResourceType::Document;
+        return Inspector::TypeBuilder::Page::ResourceType::Document;
     case ImageResource:
-        return TypeBuilder::Page::ResourceType::Image;
+        return Inspector::TypeBuilder::Page::ResourceType::Image;
     case FontResource:
-        return TypeBuilder::Page::ResourceType::Font;
+        return Inspector::TypeBuilder::Page::ResourceType::Font;
     case StylesheetResource:
-        return TypeBuilder::Page::ResourceType::Stylesheet;
+        return Inspector::TypeBuilder::Page::ResourceType::Stylesheet;
     case ScriptResource:
-        return TypeBuilder::Page::ResourceType::Script;
+        return Inspector::TypeBuilder::Page::ResourceType::Script;
     case XHRResource:
-        return TypeBuilder::Page::ResourceType::XHR;
+        return Inspector::TypeBuilder::Page::ResourceType::XHR;
     case WebSocketResource:
-        return TypeBuilder::Page::ResourceType::WebSocket;
+        return Inspector::TypeBuilder::Page::ResourceType::WebSocket;
     case OtherResource:
-        return TypeBuilder::Page::ResourceType::Other;
+        return Inspector::TypeBuilder::Page::ResourceType::Other;
     }
-    return TypeBuilder::Page::ResourceType::Other;
+    return Inspector::TypeBuilder::Page::ResourceType::Other;
 }
 
 InspectorPageAgent::ResourceType InspectorPageAgent::cachedResourceType(const CachedResource& cachedResource)
@@ -345,13 +347,13 @@
     return InspectorPageAgent::OtherResource;
 }
 
-TypeBuilder::Page::ResourceType::Enum InspectorPageAgent::cachedResourceTypeJson(const CachedResource& cachedResource)
+Inspector::TypeBuilder::Page::ResourceType::Enum InspectorPageAgent::cachedResourceTypeJson(const CachedResource& cachedResource)
 {
     return resourceTypeJson(cachedResourceType(cachedResource));
 }
 
 InspectorPageAgent::InspectorPageAgent(InstrumentingAgents* instrumentingAgents, Page* page, InspectorAgent* inspectorAgent, InjectedScriptManager* injectedScriptManager, InspectorClient* client, InspectorOverlay* overlay)
-    : InspectorBaseAgent(ASCIILiteral("Page"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("Page"), instrumentingAgents)
     , m_page(page)
     , m_inspectorAgent(inspectorAgent)
     , m_injectedScriptManager(injectedScriptManager)
@@ -371,7 +373,7 @@
 {
 }
 
-void InspectorPageAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void InspectorPageAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorPageFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorPageBackendDispatcher::create(backendDispatcher, this);
@@ -460,9 +462,9 @@
     frame.loader().changeLocation(frame.document()->securityOrigin(), frame.document()->completeURL(url), "", false, false);
 }
 
-static PassRefPtr<TypeBuilder::Page::Cookie> buildObjectForCookie(const Cookie& cookie)
+static PassRefPtr<Inspector::TypeBuilder::Page::Cookie> buildObjectForCookie(const Cookie& cookie)
 {
-    return TypeBuilder::Page::Cookie::create()
+    return Inspector::TypeBuilder::Page::Cookie::create()
         .setName(cookie.name)
         .setValue(cookie.value)
         .setDomain(cookie.domain)
@@ -475,9 +477,9 @@
         .release();
 }
 
-static PassRefPtr<TypeBuilder::Array<TypeBuilder::Page::Cookie>> buildArrayForCookies(ListHashSet<Cookie>& cookiesList)
+static PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::Cookie>> buildArrayForCookies(ListHashSet<Cookie>& cookiesList)
 {
-    RefPtr<TypeBuilder::Array<TypeBuilder::Page::Cookie>> cookies = TypeBuilder::Array<TypeBuilder::Page::Cookie>::create();
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::Cookie>> cookies = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::Cookie>::create();
 
     ListHashSet<Cookie>::iterator end = cookiesList.end();
     ListHashSet<Cookie>::iterator it = cookiesList.begin();
@@ -528,7 +530,7 @@
     return result;
 }
 
-void InspectorPageAgent::getCookies(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Page::Cookie>>& cookies)
+void InspectorPageAgent::getCookies(ErrorString*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::Cookie>>& cookies)
 {
     // If we can get raw cookies.
     ListHashSet<Cookie> rawCookiesList;
@@ -567,7 +569,7 @@
     if (rawCookiesImplemented)
         cookies = buildArrayForCookies(rawCookiesList);
     else
-        cookies = TypeBuilder::Array<TypeBuilder::Page::Cookie>::create();
+        cookies = Inspector::TypeBuilder::Array<TypeBuilder::Page::Cookie>::create();
 }
 
 void InspectorPageAgent::deleteCookie(ErrorString*, const String& cookieName, const String& url)
@@ -577,7 +579,7 @@
         WebCore::deleteCookie(frame->document(), parsedURL, cookieName);
 }
 
-void InspectorPageAgent::getResourceTree(ErrorString*, RefPtr<TypeBuilder::Page::FrameResourceTree>& object)
+void InspectorPageAgent::getResourceTree(ErrorString*, RefPtr<Inspector::TypeBuilder::Page::FrameResourceTree>& object)
 {
     object = buildObjectForFrameTree(&m_page->mainFrame());
 }
@@ -604,9 +606,9 @@
     return false;
 }
 
-void InspectorPageAgent::searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch>>& results)
+void InspectorPageAgent::searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::SearchMatch>>& results)
 {
-    results = TypeBuilder::Array<TypeBuilder::Page::SearchMatch>::create();
+    results = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::SearchMatch>::create();
 
     bool isRegex = optionalIsRegex ? *optionalIsRegex : false;
     bool caseSensitive = optionalCaseSensitive ? *optionalCaseSensitive : false;
@@ -638,18 +640,18 @@
     results = ContentSearchUtils::searchInTextByLines(content, query, caseSensitive, isRegex);
 }
 
-static PassRefPtr<TypeBuilder::Page::SearchResult> buildObjectForSearchResult(const String& frameId, const String& url, int matchesCount)
+static PassRefPtr<Inspector::TypeBuilder::Page::SearchResult> buildObjectForSearchResult(const String& frameId, const String& url, int matchesCount)
 {
-    return TypeBuilder::Page::SearchResult::create()
+    return Inspector::TypeBuilder::Page::SearchResult::create()
         .setUrl(url)
         .setFrameId(frameId)
         .setMatchesCount(matchesCount)
         .release();
 }
 
-void InspectorPageAgent::searchInResources(ErrorString*, const String& text, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchResult>>& results)
+void InspectorPageAgent::searchInResources(ErrorString*, const String& text, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::SearchResult>>& results)
 {
-    RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchResult>> searchResults = TypeBuilder::Array<TypeBuilder::Page::SearchResult>::create();
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::SearchResult>> searchResults = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::SearchResult>::create();
 
     bool isRegex = optionalIsRegex ? *optionalIsRegex : false;
     bool caseSensitive = optionalCaseSensitive ? *optionalCaseSensitive : false;
@@ -1035,9 +1037,9 @@
     m_frontendDispatcher->scriptsEnabled(isEnabled);
 }
 
-PassRefPtr<TypeBuilder::Page::Frame> InspectorPageAgent::buildObjectForFrame(Frame* frame)
+PassRefPtr<Inspector::TypeBuilder::Page::Frame> InspectorPageAgent::buildObjectForFrame(Frame* frame)
 {
-    RefPtr<TypeBuilder::Page::Frame> frameObject = TypeBuilder::Page::Frame::create()
+    RefPtr<Inspector::TypeBuilder::Page::Frame> frameObject = Inspector::TypeBuilder::Page::Frame::create()
         .setId(frameId(frame))
         .setLoaderId(loaderId(frame->loader().documentLoader()))
         .setUrl(frame->document()->url().string())
@@ -1055,11 +1057,11 @@
     return frameObject;
 }
 
-PassRefPtr<TypeBuilder::Page::FrameResourceTree> InspectorPageAgent::buildObjectForFrameTree(Frame* frame)
+PassRefPtr<Inspector::TypeBuilder::Page::FrameResourceTree> InspectorPageAgent::buildObjectForFrameTree(Frame* frame)
 {
-    RefPtr<TypeBuilder::Page::Frame> frameObject = buildObjectForFrame(frame);
-    RefPtr<TypeBuilder::Array<TypeBuilder::Page::FrameResourceTree::Resources>> subresources = TypeBuilder::Array<TypeBuilder::Page::FrameResourceTree::Resources>::create();
-    RefPtr<TypeBuilder::Page::FrameResourceTree> result = TypeBuilder::Page::FrameResourceTree::create()
+    RefPtr<Inspector::TypeBuilder::Page::Frame> frameObject = buildObjectForFrame(frame);
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::FrameResourceTree::Resources>> subresources = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::FrameResourceTree::Resources>::create();
+    RefPtr<Inspector::TypeBuilder::Page::FrameResourceTree> result = Inspector::TypeBuilder::Page::FrameResourceTree::create()
          .setFrame(frameObject)
          .setResources(subresources);
 
@@ -1067,7 +1069,7 @@
     for (Vector<CachedResource*>::const_iterator it = allResources.begin(); it != allResources.end(); ++it) {
         CachedResource* cachedResource = *it;
 
-        RefPtr<TypeBuilder::Page::FrameResourceTree::Resources> resourceObject = TypeBuilder::Page::FrameResourceTree::Resources::create()
+        RefPtr<Inspector::TypeBuilder::Page::FrameResourceTree::Resources> resourceObject = Inspector::TypeBuilder::Page::FrameResourceTree::Resources::create()
             .setUrl(cachedResource->url())
             .setType(cachedResourceTypeJson(*cachedResource))
             .setMimeType(cachedResource->response().mimeType());
@@ -1081,10 +1083,10 @@
         subresources->addItem(resourceObject);
     }
 
-    RefPtr<TypeBuilder::Array<TypeBuilder::Page::FrameResourceTree>> childrenArray;
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::FrameResourceTree>> childrenArray;
     for (Frame* child = frame->tree().firstChild(); child; child = child->tree().nextSibling()) {
         if (!childrenArray) {
-            childrenArray = TypeBuilder::Array<TypeBuilder::Page::FrameResourceTree>::create();
+            childrenArray = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::FrameResourceTree>::create();
             result->setChildFrames(childrenArray);
         }
         childrenArray->addItem(buildObjectForFrameTree(child));
diff --git a/Source/WebCore/inspector/InspectorPageAgent.h b/Source/WebCore/inspector/InspectorPageAgent.h
index 1b26b6e..5d65699 100644
--- a/Source/WebCore/inspector/InspectorPageAgent.h
+++ b/Source/WebCore/inspector/InspectorPageAgent.h
@@ -35,8 +35,9 @@
 
 #include "DeviceOrientationData.h"
 #include "GeolocationPosition.h"
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
 #include "InspectorFrontend.h"
+#include "InspectorWebAgentBase.h"
 #include "IntSize.h"
 #include "LayoutRect.h"
 #include <wtf/HashMap.h>
@@ -44,6 +45,11 @@
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
+namespace Inspector {
+class InspectorArray;
+class InspectorObject;
+}
+
 namespace WebCore {
 
 class CachedResource;
@@ -54,9 +60,7 @@
 class GraphicsContext;
 class InjectedScriptManager;
 class InspectorAgent;
-class InspectorArray;
 class InspectorClient;
-class InspectorObject;
 class InspectorOverlay;
 class InstrumentingAgents;
 class URL;
@@ -67,7 +71,7 @@
 
 typedef String ErrorString;
 
-class InspectorPageAgent : public InspectorBaseAgent, public InspectorPageBackendDispatcherHandler {
+class InspectorPageAgent : public InspectorAgentBase, public InspectorPageBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorPageAgent);
 public:
     enum ResourceType {
@@ -90,9 +94,9 @@
 
     static PassRefPtr<SharedBuffer> resourceData(Frame*, const URL&, String* textEncodingName);
     static CachedResource* cachedResource(Frame*, const URL&);
-    static TypeBuilder::Page::ResourceType::Enum resourceTypeJson(ResourceType);
+    static Inspector::TypeBuilder::Page::ResourceType::Enum resourceTypeJson(ResourceType);
     static ResourceType cachedResourceType(const CachedResource&);
-    static TypeBuilder::Page::ResourceType::Enum cachedResourceTypeJson(const CachedResource&);
+    static Inspector::TypeBuilder::Page::ResourceType::Enum cachedResourceTypeJson(const CachedResource&);
 
     // Page API for InspectorFrontend
     virtual void enable(ErrorString*);
@@ -101,12 +105,12 @@
     virtual void removeScriptToEvaluateOnLoad(ErrorString*, const String& identifier);
     virtual void reload(ErrorString*, const bool* optionalIgnoreCache, const String* optionalScriptToEvaluateOnLoad, const String* optionalScriptPreprocessor);
     virtual void navigate(ErrorString*, const String& url);
-    virtual void getCookies(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Page::Cookie>>& cookies);
+    virtual void getCookies(ErrorString*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::Cookie>>& cookies);
     virtual void deleteCookie(ErrorString*, const String& cookieName, const String& url);
-    virtual void getResourceTree(ErrorString*, RefPtr<TypeBuilder::Page::FrameResourceTree>&);
+    virtual void getResourceTree(ErrorString*, RefPtr<Inspector::TypeBuilder::Page::FrameResourceTree>&);
     virtual void getResourceContent(ErrorString*, const String& frameId, const String& url, String* content, bool* base64Encoded);
-    virtual void searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch>>&);
-    virtual void searchInResources(ErrorString*, const String&, const bool* caseSensitive, const bool* isRegex, RefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchResult>>&);
+    virtual void searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::SearchMatch>>&);
+    virtual void searchInResources(ErrorString*, const String&, const bool* caseSensitive, const bool* isRegex, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::SearchResult>>&);
     virtual void setDocumentContent(ErrorString*, const String& frameId, const String& html);
     virtual void canOverrideDeviceMetrics(ErrorString*, bool*);
     virtual void setDeviceMetricsOverride(ErrorString*, int width, int height, double fontScaleFactor, bool fitWindow);
@@ -163,7 +167,7 @@
     void scriptsEnabled(bool isEnabled);
 
     // Inspector Controller API
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     // Cross-agents API
@@ -190,8 +194,8 @@
     static bool mainResourceContent(Frame*, bool withBase64Encode, String* result);
     static bool dataContent(const char* data, unsigned size, const String& textEncodingName, bool withBase64Encode, String* result);
 
-    PassRefPtr<TypeBuilder::Page::Frame> buildObjectForFrame(Frame*);
-    PassRefPtr<TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Frame*);
+    PassRefPtr<Inspector::TypeBuilder::Page::Frame> buildObjectForFrame(Frame*);
+    PassRefPtr<Inspector::TypeBuilder::Page::FrameResourceTree> buildObjectForFrameTree(Frame*);
     Page* m_page;
     InspectorAgent* m_inspectorAgent;
     InjectedScriptManager* m_injectedScriptManager;
@@ -218,7 +222,7 @@
     bool m_ignoreScriptsEnabledNotification;
     bool m_showPaintRects;
     String m_emulatedMedia;
-    RefPtr<InspectorObject> m_scriptsToEvaluateOnLoad;
+    RefPtr<Inspector::InspectorObject> m_scriptsToEvaluateOnLoad;
     RefPtr<GeolocationPosition> m_geolocationPosition;
     RefPtr<GeolocationPosition> m_platformGeolocationPosition;
     RefPtr<DeviceOrientationData> m_deviceOrientation;
diff --git a/Source/WebCore/inspector/InspectorProfilerAgent.cpp b/Source/WebCore/inspector/InspectorProfilerAgent.cpp
index baf51f4..27dd5d2 100644
--- a/Source/WebCore/inspector/InspectorProfilerAgent.cpp
+++ b/Source/WebCore/inspector/InspectorProfilerAgent.cpp
@@ -40,20 +40,22 @@
 #include "InjectedScriptHost.h"
 #include "InspectorConsoleAgent.h"
 #include "InspectorFrontend.h"
-#include "InspectorValues.h"
 #include "InstrumentingAgents.h"
 #include "URL.h"
 #include "Page.h"
 #include "PageScriptDebugServer.h"
 #include "ScriptHeapSnapshot.h"
-#include "ScriptObject.h"
 #include "ScriptProfile.h"
 #include "ScriptProfiler.h"
 #include "WorkerScriptDebugServer.h"
+#include <bindings/ScriptObject.h>
+#include <inspector/InspectorValues.h>
 #include <wtf/CurrentTime.h>
 #include <wtf/OwnPtr.h>
 #include <wtf/text/StringConcatenate.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 static const char* const UserInitiatedProfileName = "org.webkit.profiles.user-initiated";
@@ -119,7 +121,7 @@
 }
 
 InspectorProfilerAgent::InspectorProfilerAgent(InstrumentingAgents* instrumentingAgents, InspectorConsoleAgent* consoleAgent, InjectedScriptManager* injectedScriptManager)
-    : InspectorBaseAgent(ASCIILiteral("Profiler"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("Profiler"), instrumentingAgents)
     , m_consoleAgent(consoleAgent)
     , m_injectedScriptManager(injectedScriptManager)
     , m_enabled(false)
@@ -168,19 +170,19 @@
     ScriptProfiler::collectGarbage();
 }
 
-PassRefPtr<TypeBuilder::Profiler::ProfileHeader> InspectorProfilerAgent::createProfileHeader(const ScriptProfile& profile)
+PassRefPtr<Inspector::TypeBuilder::Profiler::ProfileHeader> InspectorProfilerAgent::createProfileHeader(const ScriptProfile& profile)
 {
-    return TypeBuilder::Profiler::ProfileHeader::create()
-        .setTypeId(TypeBuilder::Profiler::ProfileHeader::TypeId::CPU)
+    return Inspector::TypeBuilder::Profiler::ProfileHeader::create()
+        .setTypeId(Inspector::TypeBuilder::Profiler::ProfileHeader::TypeId::CPU)
         .setUid(profile.uid())
         .setTitle(profile.title())
         .release();
 }
 
-PassRefPtr<TypeBuilder::Profiler::ProfileHeader> InspectorProfilerAgent::createSnapshotHeader(const ScriptHeapSnapshot& snapshot)
+PassRefPtr<Inspector::TypeBuilder::Profiler::ProfileHeader> InspectorProfilerAgent::createSnapshotHeader(const ScriptHeapSnapshot& snapshot)
 {
-    RefPtr<TypeBuilder::Profiler::ProfileHeader> header = TypeBuilder::Profiler::ProfileHeader::create()
-        .setTypeId(TypeBuilder::Profiler::ProfileHeader::TypeId::HEAP)
+    RefPtr<Inspector::TypeBuilder::Profiler::ProfileHeader> header = Inspector::TypeBuilder::Profiler::ProfileHeader::create()
+        .setTypeId(Inspector::TypeBuilder::Profiler::ProfileHeader::TypeId::HEAP)
         .setUid(snapshot.uid())
         .setTitle(snapshot.title());
     header->setMaxJSObjectId(snapshot.maxSnapshotJSObjectId());
@@ -240,10 +242,10 @@
     return makeString(UserInitiatedProfileName, '.', String::number(m_currentUserInitiatedProfileNumber));
 }
 
-void InspectorProfilerAgent::getProfileHeaders(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Profiler::ProfileHeader>>& headers)
+void InspectorProfilerAgent::getProfileHeaders(ErrorString*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Profiler::ProfileHeader>>& headers)
 {
     m_profileHeadersRequested = true;
-    headers = TypeBuilder::Array<TypeBuilder::Profiler::ProfileHeader>::create();
+    headers = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Profiler::ProfileHeader>::create();
 
     ProfilesMap::iterator profilesEnd = m_profiles.end();
     for (ProfilesMap::iterator it = m_profiles.begin(); it != profilesEnd; ++it)
@@ -268,7 +270,7 @@
 
 } // namespace
 
-void InspectorProfilerAgent::getCPUProfile(ErrorString* errorString, int rawUid, RefPtr<TypeBuilder::Profiler::CPUProfile>& profileObject)
+void InspectorProfilerAgent::getCPUProfile(ErrorString* errorString, int rawUid, RefPtr<Inspector::TypeBuilder::Profiler::CPUProfile>& profileObject)
 {
     unsigned uid = static_cast<unsigned>(rawUid);
     ProfilesMap::iterator it = m_profiles.find(uid);
@@ -276,7 +278,7 @@
         *errorString = "Profile wasn't found";
         return;
     }
-    profileObject = TypeBuilder::Profiler::CPUProfile::create();
+    profileObject = Inspector::TypeBuilder::Profiler::CPUProfile::create();
     profileObject->setHead(it->value->buildInspectorObjectForHead());
     profileObject->setIdleTime(it->value->idleTime());
 }
@@ -327,7 +329,7 @@
         m_frontendDispatcher->resetProfiles();
 }
 
-void InspectorProfilerAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void InspectorProfilerAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorProfilerFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorProfilerBackendDispatcher::create(backendDispatcher, this);
@@ -414,7 +416,7 @@
         m_frontendDispatcher->setRecordingProfile(isProfiling);
 }
 
-void InspectorProfilerAgent::getObjectByHeapObjectId(ErrorString* error, const String& heapSnapshotObjectId, const String* objectGroup, RefPtr<TypeBuilder::Runtime::RemoteObject>& result)
+void InspectorProfilerAgent::getObjectByHeapObjectId(ErrorString* error, const String& heapSnapshotObjectId, const String* objectGroup, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result)
 {
     bool ok;
     unsigned id = heapSnapshotObjectId.toUInt(&ok);
@@ -422,7 +424,7 @@
         *error = "Invalid heap snapshot object id";
         return;
     }
-    ScriptObject heapObject = ScriptProfiler::objectByHeapObjectId(id);
+    Deprecated::ScriptObject heapObject = ScriptProfiler::objectByHeapObjectId(id);
     if (heapObject.hasNoValue()) {
         *error = "Object is not available";
         return;
@@ -444,7 +446,7 @@
         *errorString = "Inspected context has gone";
         return;
     }
-    ScriptValue value = injectedScript.findObjectById(objectId);
+    Deprecated::ScriptValue value = injectedScript.findObjectById(objectId);
     if (value.hasNoValue() || value.isUndefined()) {
         *errorString = "Object with given id not found";
         return;
diff --git a/Source/WebCore/inspector/InspectorProfilerAgent.h b/Source/WebCore/inspector/InspectorProfilerAgent.h
index 53709c5..3f7836d 100644
--- a/Source/WebCore/inspector/InspectorProfilerAgent.h
+++ b/Source/WebCore/inspector/InspectorProfilerAgent.h
@@ -32,20 +32,24 @@
 
 #if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR)
 
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
 #include "InspectorFrontend.h"
+#include "InspectorWebAgentBase.h"
 #include <wtf/Forward.h>
 #include <wtf/HashMap.h>
 #include <wtf/Noncopyable.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/text/WTFString.h>
 
+namespace Inspector {
+class InspectorArray;
+class InspectorObject;
+}
+
 namespace WebCore {
 
 class InjectedScriptManager;
-class InspectorArray;
 class InspectorConsoleAgent;
-class InspectorObject;
 class InstrumentingAgents;
 class Page;
 class ScriptHeapSnapshot;
@@ -54,7 +58,7 @@
 
 typedef String ErrorString;
 
-class InspectorProfilerAgent : public InspectorBaseAgent, public InspectorProfilerBackendDispatcherHandler {
+class InspectorProfilerAgent : public InspectorAgentBase, public InspectorProfilerBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorProfilerAgent); WTF_MAKE_FAST_ALLOCATED;
 public:
     static PassOwnPtr<InspectorProfilerAgent> create(InstrumentingAgents*, InspectorConsoleAgent*, Page*, InjectedScriptManager*);
@@ -83,18 +87,18 @@
     void enable(bool skipRecompile);
     bool enabled() const { return m_enabled; }
     String getCurrentUserInitiatedProfileName(bool incrementProfileNumber = false);
-    virtual void getProfileHeaders(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Profiler::ProfileHeader>>&);
-    virtual void getCPUProfile(ErrorString*, int uid, RefPtr<TypeBuilder::Profiler::CPUProfile>&);
+    virtual void getProfileHeaders(ErrorString*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Profiler::ProfileHeader>>&);
+    virtual void getCPUProfile(ErrorString*, int uid, RefPtr<Inspector::TypeBuilder::Profiler::CPUProfile>&);
     virtual void getHeapSnapshot(ErrorString*, int uid);
     virtual void removeProfile(ErrorString*, const String& type, int uid);
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     virtual void takeHeapSnapshot(ErrorString*, const bool* reportProgress);
     void toggleRecordButton(bool isProfiling);
 
-    virtual void getObjectByHeapObjectId(ErrorString*, const String& heapSnapshotObjectId, const String* objectGroup, RefPtr<TypeBuilder::Runtime::RemoteObject>& result);
+    virtual void getObjectByHeapObjectId(ErrorString*, const String& heapSnapshotObjectId, const String* objectGroup, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result);
     virtual void getHeapObjectId(ErrorString*, const String& objectId, String* heapSnapshotObjectId);
 
 protected:
@@ -109,8 +113,8 @@
     void resetFrontendProfiles();
     void restoreEnablement();
 
-    PassRefPtr<TypeBuilder::Profiler::ProfileHeader> createProfileHeader(const ScriptProfile&);
-    PassRefPtr<TypeBuilder::Profiler::ProfileHeader> createSnapshotHeader(const ScriptHeapSnapshot&);
+    PassRefPtr<Inspector::TypeBuilder::Profiler::ProfileHeader> createProfileHeader(const ScriptProfile&);
+    PassRefPtr<Inspector::TypeBuilder::Profiler::ProfileHeader> createSnapshotHeader(const ScriptHeapSnapshot&);
 
     InspectorConsoleAgent* m_consoleAgent;
     InjectedScriptManager* m_injectedScriptManager;
diff --git a/Source/WebCore/inspector/InspectorResourceAgent.cpp b/Source/WebCore/inspector/InspectorResourceAgent.cpp
index e12b0a0..44f49c5 100644
--- a/Source/WebCore/inspector/InspectorResourceAgent.cpp
+++ b/Source/WebCore/inspector/InspectorResourceAgent.cpp
@@ -48,7 +48,6 @@
 #include "InspectorClient.h"
 #include "InspectorFrontend.h"
 #include "InspectorPageAgent.h"
-#include "InspectorValues.h"
 #include "InstrumentingAgents.h"
 #include "URL.h"
 #include "MemoryCache.h"
@@ -67,16 +66,18 @@
 #include "SubresourceLoader.h"
 #include "WebSocketFrame.h"
 #include "XMLHttpRequest.h"
-
+#include <inspector/InspectorValues.h>
 #include <wtf/CurrentTime.h>
 #include <wtf/HexNumber.h>
 #include <wtf/ListHashSet.h>
 #include <wtf/RefPtr.h>
 #include <wtf/text/StringBuilder.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
-void InspectorResourceAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void InspectorResourceAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorNetworkFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorNetworkBackendDispatcher::create(backendDispatcher, this);
@@ -100,9 +101,9 @@
     return headersObject;
 }
 
-static PassRefPtr<TypeBuilder::Network::ResourceTiming> buildObjectForTiming(const ResourceLoadTiming& timing, DocumentLoader* loader)
+static PassRefPtr<Inspector::TypeBuilder::Network::ResourceTiming> buildObjectForTiming(const ResourceLoadTiming& timing, DocumentLoader* loader)
 {
-    return TypeBuilder::Network::ResourceTiming::create()
+    return Inspector::TypeBuilder::Network::ResourceTiming::create()
         .setRequestTime(loader->timing()->monotonicTimeToPseudoWallTime(timing.convertResourceLoadTimeToMonotonicTime(0)))
         .setProxyStart(timing.proxyStart)
         .setProxyEnd(timing.proxyEnd)
@@ -118,9 +119,9 @@
         .release();
 }
 
-static PassRefPtr<TypeBuilder::Network::Request> buildObjectForResourceRequest(const ResourceRequest& request)
+static PassRefPtr<Inspector::TypeBuilder::Network::Request> buildObjectForResourceRequest(const ResourceRequest& request)
 {
-    RefPtr<TypeBuilder::Network::Request> requestObject = TypeBuilder::Network::Request::create()
+    RefPtr<Inspector::TypeBuilder::Network::Request> requestObject = Inspector::TypeBuilder::Network::Request::create()
         .setUrl(request.url().string())
         .setMethod(request.httpMethod())
         .setHeaders(buildObjectForHeaders(request.httpHeaderFields()));
@@ -129,7 +130,7 @@
     return requestObject;
 }
 
-static PassRefPtr<TypeBuilder::Network::Response> buildObjectForResourceResponse(const ResourceResponse& response, DocumentLoader* loader)
+static PassRefPtr<Inspector::TypeBuilder::Network::Response> buildObjectForResourceResponse(const ResourceResponse& response, DocumentLoader* loader)
 {
     if (response.isNull())
         return 0;
@@ -137,7 +138,7 @@
     double status = response.httpStatusCode();
     RefPtr<InspectorObject> headers = buildObjectForHeaders(response.httpHeaderFields());
 
-    RefPtr<TypeBuilder::Network::Response> responseObject = TypeBuilder::Network::Response::create()
+    RefPtr<Inspector::TypeBuilder::Network::Response> responseObject = Inspector::TypeBuilder::Network::Response::create()
         .setUrl(response.url().string())
         .setStatus(status)
         .setStatusText(response.httpStatusText())
@@ -153,14 +154,14 @@
     return responseObject;
 }
 
-static PassRefPtr<TypeBuilder::Network::CachedResource> buildObjectForCachedResource(CachedResource* cachedResource, DocumentLoader* loader)
+static PassRefPtr<Inspector::TypeBuilder::Network::CachedResource> buildObjectForCachedResource(CachedResource* cachedResource, DocumentLoader* loader)
 {
-    RefPtr<TypeBuilder::Network::CachedResource> resourceObject = TypeBuilder::Network::CachedResource::create()
+    RefPtr<Inspector::TypeBuilder::Network::CachedResource> resourceObject = Inspector::TypeBuilder::Network::CachedResource::create()
         .setUrl(cachedResource->url())
         .setType(InspectorPageAgent::cachedResourceTypeJson(*cachedResource))
         .setBodySize(cachedResource->encodedSize());
 
-    RefPtr<TypeBuilder::Network::Response> resourceResponse = buildObjectForResourceResponse(cachedResource->response(), loader);
+    RefPtr<Inspector::TypeBuilder::Network::Response> resourceResponse = buildObjectForResourceResponse(cachedResource->response(), loader);
     if (resourceResponse)
         resourceObject->setResponse(resourceResponse);
 
@@ -216,9 +217,9 @@
         request.setHTTPHeaderField("Cache-Control", "no-cache");
     }
 
-    TypeBuilder::Page::ResourceType::Enum resourceType = InspectorPageAgent::resourceTypeJson(type);
+    Inspector::TypeBuilder::Page::ResourceType::Enum resourceType = InspectorPageAgent::resourceTypeJson(type);
 
-    RefPtr<TypeBuilder::Network::Initiator> initiatorObject = buildInitiatorObject(loader->frame() ? loader->frame()->document() : 0);
+    RefPtr<Inspector::TypeBuilder::Network::Initiator> initiatorObject = buildInitiatorObject(loader->frame() ? loader->frame()->document() : 0);
     m_frontendDispatcher->requestWillBeSent(requestId, m_pageAgent->frameId(loader->frame()), m_pageAgent->loaderId(loader), loader->url().string(), buildObjectForResourceRequest(request), currentTime(), initiatorObject, buildObjectForResourceResponse(redirectResponse, loader), type != InspectorPageAgent::OtherResource ? &resourceType : 0);
 }
 
@@ -230,7 +231,7 @@
 void InspectorResourceAgent::didReceiveResponse(unsigned long identifier, DocumentLoader* loader, const ResourceResponse& response, ResourceLoader* resourceLoader)
 {
     String requestId = IdentifiersFactory::requestId(identifier);
-    RefPtr<TypeBuilder::Network::Response> resourceResponse = buildObjectForResourceResponse(response, loader);
+    RefPtr<Inspector::TypeBuilder::Network::Response> resourceResponse = buildObjectForResourceResponse(response, loader);
 
     bool isNotModified = response.httpStatusCode() == 304;
 
@@ -243,7 +244,7 @@
     if (cachedResource) {
         // Use mime type from cached resource in case the one in response is empty.
         if (resourceResponse && response.mimeType().isEmpty())
-            resourceResponse->setString(TypeBuilder::Network::Response::MimeType, cachedResource->response().mimeType());
+            resourceResponse->setString(Inspector::TypeBuilder::Network::Response::MimeType, cachedResource->response().mimeType());
         m_resourcesData->addCachedResource(requestId, cachedResource);
     }
 
@@ -335,7 +336,7 @@
         m_resourcesData->reuseXHRReplayData(requestId, rawRequestId);
     }
 
-    RefPtr<TypeBuilder::Network::Initiator> initiatorObject = buildInitiatorObject(loader->frame() ? loader->frame()->document() : 0);
+    RefPtr<Inspector::TypeBuilder::Network::Initiator> initiatorObject = buildInitiatorObject(loader->frame() ? loader->frame()->document() : 0);
 
     m_frontendDispatcher->requestServedFromMemoryCache(requestId, frameId, loaderId, loader->url().string(), currentTime(), initiatorObject, buildObjectForCachedResource(resource, loader));
 }
@@ -440,19 +441,19 @@
         m_styleRecalculationInitiator = buildInitiatorObject(document);
 }
 
-PassRefPtr<TypeBuilder::Network::Initiator> InspectorResourceAgent::buildInitiatorObject(Document* document)
+PassRefPtr<Inspector::TypeBuilder::Network::Initiator> InspectorResourceAgent::buildInitiatorObject(Document* document)
 {
     RefPtr<ScriptCallStack> stackTrace = createScriptCallStack(ScriptCallStack::maxCallStackSizeToCapture, true);
     if (stackTrace && stackTrace->size() > 0) {
-        RefPtr<TypeBuilder::Network::Initiator> initiatorObject = TypeBuilder::Network::Initiator::create()
-            .setType(TypeBuilder::Network::Initiator::Type::Script);
+        RefPtr<Inspector::TypeBuilder::Network::Initiator> initiatorObject = Inspector::TypeBuilder::Network::Initiator::create()
+            .setType(Inspector::TypeBuilder::Network::Initiator::Type::Script);
         initiatorObject->setStackTrace(stackTrace->buildInspectorArray());
         return initiatorObject;
     }
 
     if (document && document->scriptableDocumentParser()) {
-        RefPtr<TypeBuilder::Network::Initiator> initiatorObject = TypeBuilder::Network::Initiator::create()
-            .setType(TypeBuilder::Network::Initiator::Type::Parser);
+        RefPtr<Inspector::TypeBuilder::Network::Initiator> initiatorObject = Inspector::TypeBuilder::Network::Initiator::create()
+            .setType(Inspector::TypeBuilder::Network::Initiator::Type::Parser);
         initiatorObject->setUrl(document->url().string());
         initiatorObject->setLineNumber(document->scriptableDocumentParser()->textPosition().m_line.oneBasedInt());
         return initiatorObject;
@@ -461,8 +462,8 @@
     if (m_isRecalculatingStyle && m_styleRecalculationInitiator)
         return m_styleRecalculationInitiator;
 
-    return TypeBuilder::Network::Initiator::create()
-        .setType(TypeBuilder::Network::Initiator::Type::Other)
+    return Inspector::TypeBuilder::Network::Initiator::create()
+        .setType(Inspector::TypeBuilder::Network::Initiator::Type::Other)
         .release();
 }
 
@@ -475,14 +476,14 @@
 
 void InspectorResourceAgent::willSendWebSocketHandshakeRequest(unsigned long identifier, const ResourceRequest& request)
 {
-    RefPtr<TypeBuilder::Network::WebSocketRequest> requestObject = TypeBuilder::Network::WebSocketRequest::create()
+    RefPtr<Inspector::TypeBuilder::Network::WebSocketRequest> requestObject = Inspector::TypeBuilder::Network::WebSocketRequest::create()
         .setHeaders(buildObjectForHeaders(request.httpHeaderFields()));
     m_frontendDispatcher->webSocketWillSendHandshakeRequest(IdentifiersFactory::requestId(identifier), currentTime(), requestObject);
 }
 
 void InspectorResourceAgent::didReceiveWebSocketHandshakeResponse(unsigned long identifier, const ResourceResponse& response)
 {
-    RefPtr<TypeBuilder::Network::WebSocketResponse> responseObject = TypeBuilder::Network::WebSocketResponse::create()
+    RefPtr<Inspector::TypeBuilder::Network::WebSocketResponse> responseObject = Inspector::TypeBuilder::Network::WebSocketResponse::create()
         .setStatus(response.httpStatusCode())
         .setStatusText(response.httpStatusText())
         .setHeaders(buildObjectForHeaders(response.httpHeaderFields()));
@@ -496,7 +497,7 @@
 
 void InspectorResourceAgent::didReceiveWebSocketFrame(unsigned long identifier, const WebSocketFrame& frame)
 {
-    RefPtr<TypeBuilder::Network::WebSocketFrame> frameObject = TypeBuilder::Network::WebSocketFrame::create()
+    RefPtr<Inspector::TypeBuilder::Network::WebSocketFrame> frameObject = Inspector::TypeBuilder::Network::WebSocketFrame::create()
         .setOpcode(frame.opCode)
         .setMask(frame.masked)
         .setPayloadData(String(frame.payload, frame.payloadLength));
@@ -505,7 +506,7 @@
 
 void InspectorResourceAgent::didSendWebSocketFrame(unsigned long identifier, const WebSocketFrame& frame)
 {
-    RefPtr<TypeBuilder::Network::WebSocketFrame> frameObject = TypeBuilder::Network::WebSocketFrame::create()
+    RefPtr<Inspector::TypeBuilder::Network::WebSocketFrame> frameObject = Inspector::TypeBuilder::Network::WebSocketFrame::create()
         .setOpcode(frame.opCode)
         .setMask(frame.masked)
         .setPayloadData(String(frame.payload, frame.payloadLength));
@@ -650,7 +651,7 @@
 }
 
 InspectorResourceAgent::InspectorResourceAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorClient* client)
-    : InspectorBaseAgent(ASCIILiteral("Network"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("Network"), instrumentingAgents)
     , m_pageAgent(pageAgent)
     , m_client(client)
     , m_resourcesData(adoptPtr(new NetworkResourcesData()))
diff --git a/Source/WebCore/inspector/InspectorResourceAgent.h b/Source/WebCore/inspector/InspectorResourceAgent.h
index 8c27f94..9f2e72a 100644
--- a/Source/WebCore/inspector/InspectorResourceAgent.h
+++ b/Source/WebCore/inspector/InspectorResourceAgent.h
@@ -31,9 +31,9 @@
 #ifndef InspectorResourceAgent_h
 #define InspectorResourceAgent_h
 
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
 #include "InspectorFrontend.h"
-
+#include "InspectorWebAgentBase.h"
 #include <wtf/PassOwnPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/Vector.h>
@@ -41,8 +41,9 @@
 
 #if ENABLE(INSPECTOR)
 
-namespace WTF {
-class String;
+namespace Inspector {
+class InspectorArray;
+class InspectorObject;
 }
 
 namespace WebCore {
@@ -53,9 +54,7 @@
 class FormData;
 class Frame;
 class HTTPHeaderMap;
-class InspectorArray;
 class InspectorClient;
-class InspectorObject;
 class InspectorPageAgent;
 class InstrumentingAgents;
 class URL;
@@ -76,7 +75,7 @@
 
 typedef String ErrorString;
 
-class InspectorResourceAgent : public InspectorBaseAgent, public InspectorNetworkBackendDispatcherHandler {
+class InspectorResourceAgent : public InspectorAgentBase, public InspectorNetworkBackendDispatcherHandler {
 public:
     static PassOwnPtr<InspectorResourceAgent> create(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorClient* client)
     {
@@ -85,7 +84,7 @@
 
     ~InspectorResourceAgent();
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     void willSendRequest(unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse);
@@ -116,7 +115,7 @@
     void didRecalculateStyle();
     void didScheduleStyleRecalculation(Document*);
 
-    PassRefPtr<TypeBuilder::Network::Initiator> buildInitiatorObject(Document*);
+    PassRefPtr<Inspector::TypeBuilder::Network::Initiator> buildInitiatorObject(Document*);
 
 #if ENABLE(WEB_SOCKETS)
     void didCreateWebSocket(unsigned long identifier, const URL& requestURL);
@@ -135,7 +134,7 @@
     virtual void enable(ErrorString*);
     virtual void disable(ErrorString*);
     virtual void setUserAgentOverride(ErrorString*, const String& userAgent);
-    virtual void setExtraHTTPHeaders(ErrorString*, const RefPtr<InspectorObject>&);
+    virtual void setExtraHTTPHeaders(ErrorString*, const RefPtr<Inspector::InspectorObject>&);
     virtual void getResponseBody(ErrorString*, const String& requestId, String* content, bool* base64Encoded);
 
     virtual void replayXHR(ErrorString*, const String& requestId);
@@ -160,12 +159,12 @@
     bool m_enabled;
     bool m_cacheDisabled;
     bool m_loadingXHRSynchronously;
-    RefPtr<InspectorObject> m_extraRequestHeaders;
+    RefPtr<Inspector::InspectorObject> m_extraRequestHeaders;
 
     typedef HashMap<ThreadableLoaderClient*, RefPtr<XHRReplayData>> PendingXHRReplayDataMap;
     PendingXHRReplayDataMap m_pendingXHRReplayData;
     // FIXME: InspectorResourceAgent should now be aware of style recalculation.
-    RefPtr<TypeBuilder::Network::Initiator> m_styleRecalculationInitiator;
+    RefPtr<Inspector::TypeBuilder::Network::Initiator> m_styleRecalculationInitiator;
     bool m_isRecalculatingStyle;
 };
 
diff --git a/Source/WebCore/inspector/InspectorRuntimeAgent.cpp b/Source/WebCore/inspector/InspectorRuntimeAgent.cpp
index 8b34690..ad8c435 100644
--- a/Source/WebCore/inspector/InspectorRuntimeAgent.cpp
+++ b/Source/WebCore/inspector/InspectorRuntimeAgent.cpp
@@ -36,8 +36,8 @@
 
 #include "InjectedScript.h"
 #include "InjectedScriptManager.h"
-#include "InspectorValues.h"
 #include "JSDOMWindowBase.h"
+#include <inspector/InspectorValues.h>
 #include <parser/ParserError.h>
 #include <parser/SourceCode.h>
 #include <runtime/Completion.h>
@@ -50,6 +50,8 @@
 
 using namespace JSC;
 
+using namespace Inspector;
+
 namespace WebCore {
 
 static bool asBool(const bool* const b)
@@ -58,7 +60,7 @@
 }
 
 InspectorRuntimeAgent::InspectorRuntimeAgent(InstrumentingAgents* instrumentingAgents, InjectedScriptManager* injectedScriptManager)
-    : InspectorBaseAgent(ASCIILiteral("Runtime"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("Runtime"), instrumentingAgents)
     , m_enabled(false)
     , m_injectedScriptManager(injectedScriptManager)
 #if ENABLE(JAVASCRIPT_DEBUGGER)
@@ -82,15 +84,15 @@
 }
 #endif
 
-static PassRefPtr<TypeBuilder::Runtime::ErrorRange> buildErrorRangeObject(const JSTokenLocation& tokenLocation)
+static PassRefPtr<Inspector::TypeBuilder::Runtime::ErrorRange> buildErrorRangeObject(const JSTokenLocation& tokenLocation)
 {
-    RefPtr<TypeBuilder::Runtime::ErrorRange> result = TypeBuilder::Runtime::ErrorRange::create()
+    RefPtr<Inspector::TypeBuilder::Runtime::ErrorRange> result = Inspector::TypeBuilder::Runtime::ErrorRange::create()
         .setStartOffset(tokenLocation.startOffset)
         .setEndOffset(tokenLocation.endOffset);
     return result.release();
 }
 
-void InspectorRuntimeAgent::parse(ErrorString*, const String& expression, TypeBuilder::Runtime::SyntaxErrorType::Enum* result, TypeBuilder::OptOutput<String>* message, RefPtr<TypeBuilder::Runtime::ErrorRange>& range)
+void InspectorRuntimeAgent::parse(ErrorString*, const String& expression, Inspector::TypeBuilder::Runtime::SyntaxErrorType::Enum* result, Inspector::TypeBuilder::OptOutput<String>* message, RefPtr<Inspector::TypeBuilder::Runtime::ErrorRange>& range)
 {
     VM* vm = JSDOMWindowBase::commonVM();
     JSLockHolder lock(vm);
@@ -100,16 +102,16 @@
 
     switch (error.m_syntaxErrorType) {
     case ParserError::SyntaxErrorNone:
-        *result = TypeBuilder::Runtime::SyntaxErrorType::None;
+        *result = Inspector::TypeBuilder::Runtime::SyntaxErrorType::None;
         break;
     case ParserError::SyntaxErrorIrrecoverable:
-        *result = TypeBuilder::Runtime::SyntaxErrorType::Irrecoverable;
+        *result = Inspector::TypeBuilder::Runtime::SyntaxErrorType::Irrecoverable;
         break;
     case ParserError::SyntaxErrorUnterminatedLiteral:
-        *result = TypeBuilder::Runtime::SyntaxErrorType::UnterminatedLiteral;
+        *result = Inspector::TypeBuilder::Runtime::SyntaxErrorType::UnterminatedLiteral;
         break;
     case ParserError::SyntaxErrorRecoverable:
-        *result = TypeBuilder::Runtime::SyntaxErrorType::Recoverable;
+        *result = Inspector::TypeBuilder::Runtime::SyntaxErrorType::Recoverable;
         break;
     }
 
@@ -119,7 +121,7 @@
     }
 }
 
-void InspectorRuntimeAgent::evaluate(ErrorString* errorString, const String& expression, const String* const objectGroup, const bool* const includeCommandLineAPI, const bool* const doNotPauseOnExceptionsAndMuteConsole, const int* executionContextId, const bool* const returnByValue, const bool* generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>& result, TypeBuilder::OptOutput<bool>* wasThrown)
+void InspectorRuntimeAgent::evaluate(ErrorString* errorString, const String& expression, const String* const objectGroup, const bool* const includeCommandLineAPI, const bool* const doNotPauseOnExceptionsAndMuteConsole, const int* executionContextId, const bool* const returnByValue, const bool* generatePreview, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result, Inspector::TypeBuilder::OptOutput<bool>* wasThrown)
 {
     InjectedScript injectedScript = injectedScriptForEval(errorString, executionContextId);
     if (injectedScript.hasNoValue())
@@ -142,7 +144,7 @@
     }
 }
 
-void InspectorRuntimeAgent::callFunctionOn(ErrorString* errorString, const String& objectId, const String& expression, const RefPtr<InspectorArray>* const optionalArguments, const bool* const doNotPauseOnExceptionsAndMuteConsole, const bool* const returnByValue, const bool* generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>& result, TypeBuilder::OptOutput<bool>* wasThrown)
+void InspectorRuntimeAgent::callFunctionOn(ErrorString* errorString, const String& objectId, const String& expression, const RefPtr<InspectorArray>* const optionalArguments, const bool* const doNotPauseOnExceptionsAndMuteConsole, const bool* const returnByValue, const bool* generatePreview, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result, Inspector::TypeBuilder::OptOutput<bool>* wasThrown)
 {
     InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(objectId);
     if (injectedScript.hasNoValue()) {
@@ -171,7 +173,7 @@
     }
 }
 
-void InspectorRuntimeAgent::getProperties(ErrorString* errorString, const String& objectId, const bool* const ownProperties, RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::PropertyDescriptor>>& result, RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::InternalPropertyDescriptor>>& internalProperties)
+void InspectorRuntimeAgent::getProperties(ErrorString* errorString, const String& objectId, const bool* const ownProperties, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::PropertyDescriptor>>& result, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::InternalPropertyDescriptor>>& internalProperties)
 {
     InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(objectId);
     if (injectedScript.hasNoValue()) {
diff --git a/Source/WebCore/inspector/InspectorRuntimeAgent.h b/Source/WebCore/inspector/InspectorRuntimeAgent.h
index cf44e58..8b444d9 100644
--- a/Source/WebCore/inspector/InspectorRuntimeAgent.h
+++ b/Source/WebCore/inspector/InspectorRuntimeAgent.h
@@ -33,25 +33,29 @@
 
 #if ENABLE(INSPECTOR)
 
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
+#include "InspectorWebAgentBase.h"
 #include "ScriptState.h"
 #include <wtf/Forward.h>
 #include <wtf/Noncopyable.h>
 
+namespace Inspector {
+class InspectorArray;
+class InspectorObject;
+class InspectorValue;
+}
+
 namespace WebCore {
 
 class InjectedScript;
 class InjectedScriptManager;
-class InspectorArray;
-class InspectorObject;
-class InspectorValue;
 class InstrumentingAgents;
 class ScriptDebugServer;
 class WorkerGlobalScope;
 
 typedef String ErrorString;
 
-class InspectorRuntimeAgent : public InspectorBaseAgent, public InspectorRuntimeBackendDispatcherHandler {
+class InspectorRuntimeAgent : public InspectorAgentBase, public InspectorRuntimeBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorRuntimeAgent);
 public:
     virtual ~InspectorRuntimeAgent();
@@ -59,7 +63,7 @@
     // Part of the protocol.
     virtual void enable(ErrorString*) { m_enabled = true; }
     virtual void disable(ErrorString*) { m_enabled = false; }
-    virtual void parse(ErrorString*, const String& expression, TypeBuilder::Runtime::SyntaxErrorType::Enum* result, TypeBuilder::OptOutput<String>* message, RefPtr<TypeBuilder::Runtime::ErrorRange>&);
+    virtual void parse(ErrorString*, const String& expression, Inspector::TypeBuilder::Runtime::SyntaxErrorType::Enum* result, Inspector::TypeBuilder::OptOutput<String>* message, RefPtr<Inspector::TypeBuilder::Runtime::ErrorRange>&);
     virtual void evaluate(ErrorString*,
                   const String& expression,
                   const String* objectGroup,
@@ -68,19 +72,19 @@
                   const int* executionContextId,
                   const bool* returnByValue,
                   const bool* generatePreview,
-                  RefPtr<TypeBuilder::Runtime::RemoteObject>& result,
-                  TypeBuilder::OptOutput<bool>* wasThrown);
+                  RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result,
+                  Inspector::TypeBuilder::OptOutput<bool>* wasThrown);
     virtual void callFunctionOn(ErrorString*,
                         const String& objectId,
                         const String& expression,
-                        const RefPtr<InspectorArray>* optionalArguments,
+                        const RefPtr<Inspector::InspectorArray>* optionalArguments,
                         const bool* doNotPauseOnExceptionsAndMuteConsole,
                         const bool* returnByValue,
                         const bool* generatePreview,
-                        RefPtr<TypeBuilder::Runtime::RemoteObject>& result,
-                        TypeBuilder::OptOutput<bool>* wasThrown);
+                        RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result,
+                        Inspector::TypeBuilder::OptOutput<bool>* wasThrown);
     virtual void releaseObject(ErrorString*, const String& objectId);
-    virtual void getProperties(ErrorString*, const String& objectId, const bool* ownProperties, RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::PropertyDescriptor>>& result, RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::InternalPropertyDescriptor>>& internalProperties);
+    virtual void getProperties(ErrorString*, const String& objectId, const bool* ownProperties, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::PropertyDescriptor>>& result, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Runtime::InternalPropertyDescriptor>>& internalProperties);
     virtual void releaseObjectGroup(ErrorString*, const String& objectGroup);
     virtual void run(ErrorString*);
 
diff --git a/Source/WebCore/inspector/InspectorStyleSheet.cpp b/Source/WebCore/inspector/InspectorStyleSheet.cpp
index 676622b..caa44ce 100644
--- a/Source/WebCore/inspector/InspectorStyleSheet.cpp
+++ b/Source/WebCore/inspector/InspectorStyleSheet.cpp
@@ -49,7 +49,6 @@
 #include "HTMLStyleElement.h"
 #include "InspectorCSSAgent.h"
 #include "InspectorPageAgent.h"
-#include "InspectorValues.h"
 #include "Node.h"
 #include "RegularExpression.h"
 #include "SVGNames.h"
@@ -60,13 +59,13 @@
 #include "StyleSheetContents.h"
 #include "StyleSheetList.h"
 #include "WebKitCSSKeyframesRule.h"
-
+#include <inspector/InspectorValues.h>
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/Vector.h>
 #include <wtf/text/StringBuilder.h>
 
-using WebCore::TypeBuilder::Array;
+using Inspector::TypeBuilder::Array;
 using WebCore::RuleSourceDataList;
 using WebCore::CSSRuleSourceData;
 
@@ -144,6 +143,8 @@
     return m_sourceData->at(index);
 }
 
+using namespace Inspector;
+
 namespace WebCore {
 
 enum MediaListSource {
@@ -153,14 +154,14 @@
     MediaListSourceImportRule
 };
 
-static PassRefPtr<TypeBuilder::CSS::SourceRange> buildSourceRangeObject(const SourceRange& range, Vector<size_t>* lineEndings)
+static PassRefPtr<Inspector::TypeBuilder::CSS::SourceRange> buildSourceRangeObject(const SourceRange& range, Vector<size_t>* lineEndings)
 {
     if (!lineEndings)
         return 0;
     TextPosition start = ContentSearchUtils::textPositionFromOffset(range.start, *lineEndings);
     TextPosition end = ContentSearchUtils::textPositionFromOffset(range.end, *lineEndings);
 
-    RefPtr<TypeBuilder::CSS::SourceRange> result = TypeBuilder::CSS::SourceRange::create()
+    RefPtr<Inspector::TypeBuilder::CSS::SourceRange> result = Inspector::TypeBuilder::CSS::SourceRange::create()
         .setStartLine(start.m_line.zeroBasedInt())
         .setStartColumn(start.m_column.zeroBasedInt())
         .setEndLine(end.m_line.zeroBasedInt())
@@ -168,26 +169,26 @@
     return result.release();
 }
 
-static PassRefPtr<TypeBuilder::CSS::CSSMedia> buildMediaObject(const MediaList* media, MediaListSource mediaListSource, const String& sourceURL)
+static PassRefPtr<Inspector::TypeBuilder::CSS::CSSMedia> buildMediaObject(const MediaList* media, MediaListSource mediaListSource, const String& sourceURL)
 {
     // Make certain compilers happy by initializing |source| up-front.
-    TypeBuilder::CSS::CSSMedia::Source::Enum source = TypeBuilder::CSS::CSSMedia::Source::InlineSheet;
+    Inspector::TypeBuilder::CSS::CSSMedia::Source::Enum source = Inspector::TypeBuilder::CSS::CSSMedia::Source::InlineSheet;
     switch (mediaListSource) {
     case MediaListSourceMediaRule:
-        source = TypeBuilder::CSS::CSSMedia::Source::MediaRule;
+        source = Inspector::TypeBuilder::CSS::CSSMedia::Source::MediaRule;
         break;
     case MediaListSourceImportRule:
-        source = TypeBuilder::CSS::CSSMedia::Source::ImportRule;
+        source = Inspector::TypeBuilder::CSS::CSSMedia::Source::ImportRule;
         break;
     case MediaListSourceLinkedSheet:
-        source = TypeBuilder::CSS::CSSMedia::Source::LinkedSheet;
+        source = Inspector::TypeBuilder::CSS::CSSMedia::Source::LinkedSheet;
         break;
     case MediaListSourceInlineSheet:
-        source = TypeBuilder::CSS::CSSMedia::Source::InlineSheet;
+        source = Inspector::TypeBuilder::CSS::CSSMedia::Source::InlineSheet;
         break;
     }
 
-    RefPtr<TypeBuilder::CSS::CSSMedia> mediaObject = TypeBuilder::CSS::CSSMedia::create()
+    RefPtr<Inspector::TypeBuilder::CSS::CSSMedia> mediaObject = Inspector::TypeBuilder::CSS::CSSMedia::create()
         .setText(media->mediaText())
         .setSource(source);
 
@@ -238,7 +239,7 @@
     return 0;
 }
 
-static void fillMediaListChain(CSSRule* rule, Array<TypeBuilder::CSS::CSSMedia>* mediaArray)
+static void fillMediaListChain(CSSRule* rule, Array<Inspector::TypeBuilder::CSS::CSSMedia>* mediaArray)
 {
     MediaList* mediaList;
     CSSRule* parentRule = rule;
@@ -316,11 +317,11 @@
 {
 }
 
-PassRefPtr<TypeBuilder::CSS::CSSStyle> InspectorStyle::buildObjectForStyle() const
+PassRefPtr<Inspector::TypeBuilder::CSS::CSSStyle> InspectorStyle::buildObjectForStyle() const
 {
-    RefPtr<TypeBuilder::CSS::CSSStyle> result = styleWithProperties();
+    RefPtr<Inspector::TypeBuilder::CSS::CSSStyle> result = styleWithProperties();
     if (!m_styleId.isEmpty())
-        result->setStyleId(m_styleId.asProtocolValue<TypeBuilder::CSS::CSSStyleId>());
+        result->setStyleId(m_styleId.asProtocolValue<Inspector::TypeBuilder::CSS::CSSStyleId>());
 
     result->setWidth(m_style->getPropertyValue("width"));
     result->setHeight(m_style->getPropertyValue("height"));
@@ -332,15 +333,15 @@
     return result.release();
 }
 
-PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSComputedStyleProperty>> InspectorStyle::buildArrayForComputedStyle() const
+PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSComputedStyleProperty>> InspectorStyle::buildArrayForComputedStyle() const
 {
-    RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSComputedStyleProperty>> result = TypeBuilder::Array<TypeBuilder::CSS::CSSComputedStyleProperty>::create();
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSComputedStyleProperty>> result = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSComputedStyleProperty>::create();
     Vector<InspectorStyleProperty> properties;
     populateAllProperties(&properties);
 
     for (Vector<InspectorStyleProperty>::iterator it = properties.begin(), itEnd = properties.end(); it != itEnd; ++it) {
         const CSSPropertySourceData& propertyEntry = it->sourceData;
-        RefPtr<TypeBuilder::CSS::CSSComputedStyleProperty> entry = TypeBuilder::CSS::CSSComputedStyleProperty::create()
+        RefPtr<Inspector::TypeBuilder::CSS::CSSComputedStyleProperty> entry = Inspector::TypeBuilder::CSS::CSSComputedStyleProperty::create()
             .setName(propertyEntry.name)
             .setValue(propertyEntry.value);
         result->addItem(entry);
@@ -519,14 +520,14 @@
     return true;
 }
 
-PassRefPtr<TypeBuilder::CSS::CSSStyle> InspectorStyle::styleWithProperties() const
+PassRefPtr<Inspector::TypeBuilder::CSS::CSSStyle> InspectorStyle::styleWithProperties() const
 {
     Vector<InspectorStyleProperty> properties;
     populateAllProperties(&properties);
 
-    RefPtr<Array<TypeBuilder::CSS::CSSProperty>> propertiesObject = Array<TypeBuilder::CSS::CSSProperty>::create();
-    RefPtr<Array<TypeBuilder::CSS::ShorthandEntry>> shorthandEntries = Array<TypeBuilder::CSS::ShorthandEntry>::create();
-    HashMap<String, RefPtr<TypeBuilder::CSS::CSSProperty>> propertyNameToPreviousActiveProperty;
+    RefPtr<Array<Inspector::TypeBuilder::CSS::CSSProperty>> propertiesObject = Array<Inspector::TypeBuilder::CSS::CSSProperty>::create();
+    RefPtr<Array<Inspector::TypeBuilder::CSS::ShorthandEntry>> shorthandEntries = Array<Inspector::TypeBuilder::CSS::ShorthandEntry>::create();
+    HashMap<String, RefPtr<Inspector::TypeBuilder::CSS::CSSProperty>> propertyNameToPreviousActiveProperty;
     HashSet<String> foundShorthands;
     String previousPriority;
     String previousStatus;
@@ -538,9 +539,9 @@
         const CSSPropertySourceData& propertyEntry = it->sourceData;
         const String& name = propertyEntry.name;
 
-        TypeBuilder::CSS::CSSProperty::Status::Enum status = it->disabled ? TypeBuilder::CSS::CSSProperty::Status::Disabled : TypeBuilder::CSS::CSSProperty::Status::Active;
+        Inspector::TypeBuilder::CSS::CSSProperty::Status::Enum status = it->disabled ? Inspector::TypeBuilder::CSS::CSSProperty::Status::Disabled : Inspector::TypeBuilder::CSS::CSSProperty::Status::Active;
 
-        RefPtr<TypeBuilder::CSS::CSSProperty> property = TypeBuilder::CSS::CSSProperty::create()
+        RefPtr<Inspector::TypeBuilder::CSS::CSSProperty> property = Inspector::TypeBuilder::CSS::CSSProperty::create()
             .setName(name)
             .setValue(propertyEntry.value);
 
@@ -573,22 +574,22 @@
                 CSSPropertyID propertyId = cssPropertyID(name);
                 // Canonicalize property names to treat non-prefixed and vendor-prefixed property names the same (opacity vs. -webkit-opacity).
                 String canonicalPropertyName = propertyId ? getPropertyNameString(propertyId) : name;
-                HashMap<String, RefPtr<TypeBuilder::CSS::CSSProperty>>::iterator activeIt = propertyNameToPreviousActiveProperty.find(canonicalPropertyName);
+                HashMap<String, RefPtr<Inspector::TypeBuilder::CSS::CSSProperty>>::iterator activeIt = propertyNameToPreviousActiveProperty.find(canonicalPropertyName);
                 if (activeIt != propertyNameToPreviousActiveProperty.end()) {
                     if (propertyEntry.parsedOk) {
-                        bool successPriority = activeIt->value->getString(TypeBuilder::CSS::CSSProperty::Priority, &previousPriority);
-                        bool successStatus = activeIt->value->getString(TypeBuilder::CSS::CSSProperty::Status, &previousStatus);
+                        bool successPriority = activeIt->value->getString(Inspector::TypeBuilder::CSS::CSSProperty::Priority, &previousPriority);
+                        bool successStatus = activeIt->value->getString(Inspector::TypeBuilder::CSS::CSSProperty::Status, &previousStatus);
                         if (successStatus && previousStatus != "inactive") {
                             if (propertyEntry.important || !successPriority) // Priority not set == "not important".
                                 shouldInactivate = true;
-                            else if (status == TypeBuilder::CSS::CSSProperty::Status::Active) {
+                            else if (status == Inspector::TypeBuilder::CSS::CSSProperty::Status::Active) {
                                 // Inactivate a non-important property following the same-named important property.
-                                status = TypeBuilder::CSS::CSSProperty::Status::Inactive;
+                                status = Inspector::TypeBuilder::CSS::CSSProperty::Status::Inactive;
                             }
                         }
                     } else {
                         bool previousParsedOk;
-                        bool success = activeIt->value->getBoolean(TypeBuilder::CSS::CSSProperty::ParsedOk, &previousParsedOk);
+                        bool success = activeIt->value->getBoolean(Inspector::TypeBuilder::CSS::CSSProperty::ParsedOk, &previousParsedOk);
                         if (success && !previousParsedOk)
                             shouldInactivate = true;
                     }
@@ -596,7 +597,7 @@
                     propertyNameToPreviousActiveProperty.set(canonicalPropertyName, property);
 
                 if (shouldInactivate) {
-                    activeIt->value->setStatus(TypeBuilder::CSS::CSSProperty::Status::Inactive);
+                    activeIt->value->setStatus(Inspector::TypeBuilder::CSS::CSSProperty::Status::Inactive);
                     propertyNameToPreviousActiveProperty.set(canonicalPropertyName, property);
                 }
             } else {
@@ -604,13 +605,13 @@
                 // Default "implicit" == false.
                 if (implicit)
                     property->setImplicit(true);
-                status = TypeBuilder::CSS::CSSProperty::Status::Style;
+                status = Inspector::TypeBuilder::CSS::CSSProperty::Status::Style;
 
                 String shorthand = m_style->getPropertyShorthand(name);
                 if (!shorthand.isEmpty()) {
                     if (!foundShorthands.contains(shorthand)) {
                         foundShorthands.add(shorthand);
-                        RefPtr<TypeBuilder::CSS::ShorthandEntry> entry = TypeBuilder::CSS::ShorthandEntry::create()
+                        RefPtr<Inspector::TypeBuilder::CSS::ShorthandEntry> entry = Inspector::TypeBuilder::CSS::ShorthandEntry::create()
                             .setName(shorthand)
                             .setValue(shorthandValue(shorthand));
                         shorthandEntries->addItem(entry);
@@ -620,11 +621,11 @@
         }
 
         // Default "status" == "style".
-        if (status != TypeBuilder::CSS::CSSProperty::Status::Style)
+        if (status != Inspector::TypeBuilder::CSS::CSSProperty::Status::Style)
             property->setStatus(status);
     }
 
-    RefPtr<TypeBuilder::CSS::CSSStyle> result = TypeBuilder::CSS::CSSStyle::create()
+    RefPtr<Inspector::TypeBuilder::CSS::CSSStyle> result = Inspector::TypeBuilder::CSS::CSSStyle::create()
         .setCssProperties(propertiesObject)
         .setShorthandEntries(shorthandEntries);
     return result.release();
@@ -759,7 +760,7 @@
     return m_format;
 }
 
-PassRefPtr<InspectorStyleSheet> InspectorStyleSheet::create(InspectorPageAgent* pageAgent, const String& id, PassRefPtr<CSSStyleSheet> pageStyleSheet, TypeBuilder::CSS::StyleSheetOrigin::Enum origin, const String& documentURL, Listener* listener)
+PassRefPtr<InspectorStyleSheet> InspectorStyleSheet::create(InspectorPageAgent* pageAgent, const String& id, PassRefPtr<CSSStyleSheet> pageStyleSheet, Inspector::TypeBuilder::CSS::StyleSheetOrigin::Enum origin, const String& documentURL, Listener* listener)
 {
     return adoptRef(new InspectorStyleSheet(pageAgent, id, pageStyleSheet, origin, documentURL, listener));
 }
@@ -772,7 +773,7 @@
     return emptyString();
 }
 
-InspectorStyleSheet::InspectorStyleSheet(InspectorPageAgent* pageAgent, const String& id, PassRefPtr<CSSStyleSheet> pageStyleSheet, TypeBuilder::CSS::StyleSheetOrigin::Enum origin, const String& documentURL, Listener* listener)
+InspectorStyleSheet::InspectorStyleSheet(InspectorPageAgent* pageAgent, const String& id, PassRefPtr<CSSStyleSheet> pageStyleSheet, Inspector::TypeBuilder::CSS::StyleSheetOrigin::Enum origin, const String& documentURL, Listener* listener)
     : m_pageAgent(pageAgent)
     , m_id(id)
     , m_pageStyleSheet(pageStyleSheet)
@@ -963,7 +964,7 @@
 
 }
 
-PassRefPtr<TypeBuilder::CSS::CSSStyleSheetBody> InspectorStyleSheet::buildObjectForStyleSheet()
+PassRefPtr<Inspector::TypeBuilder::CSS::CSSStyleSheetBody> InspectorStyleSheet::buildObjectForStyleSheet()
 {
     CSSStyleSheet* styleSheet = pageStyleSheet();
     if (!styleSheet)
@@ -971,7 +972,7 @@
 
     RefPtr<CSSRuleList> cssRuleList = asCSSRuleList(styleSheet);
 
-    RefPtr<TypeBuilder::CSS::CSSStyleSheetBody> result = TypeBuilder::CSS::CSSStyleSheetBody::create()
+    RefPtr<Inspector::TypeBuilder::CSS::CSSStyleSheetBody> result = Inspector::TypeBuilder::CSS::CSSStyleSheetBody::create()
         .setStyleSheetId(id())
         .setRules(buildArrayForRuleList(cssRuleList.get()));
 
@@ -983,7 +984,7 @@
     return result.release();
 }
 
-PassRefPtr<TypeBuilder::CSS::CSSStyleSheetHeader> InspectorStyleSheet::buildObjectForStyleSheetInfo()
+PassRefPtr<Inspector::TypeBuilder::CSS::CSSStyleSheetHeader> InspectorStyleSheet::buildObjectForStyleSheetInfo()
 {
     CSSStyleSheet* styleSheet = pageStyleSheet();
     if (!styleSheet)
@@ -991,7 +992,7 @@
 
     Document* document = styleSheet->ownerDocument();
     Frame* frame = document ? document->frame() : 0;
-    RefPtr<TypeBuilder::CSS::CSSStyleSheetHeader> result = TypeBuilder::CSS::CSSStyleSheetHeader::create()
+    RefPtr<Inspector::TypeBuilder::CSS::CSSStyleSheetHeader> result = Inspector::TypeBuilder::CSS::CSSStyleSheetHeader::create()
         .setStyleSheetId(id())
         .setOrigin(m_origin)
         .setDisabled(styleSheet->disabled())
@@ -1002,10 +1003,10 @@
     return result.release();
 }
 
-static PassRefPtr<TypeBuilder::Array<String>> selectorsFromSource(const CSSRuleSourceData* sourceData, const String& sheetText)
+static PassRefPtr<Inspector::TypeBuilder::Array<String>> selectorsFromSource(const CSSRuleSourceData* sourceData, const String& sheetText)
 {
     DEFINE_STATIC_LOCAL(RegularExpression, comment, ("/\\*[^]*?\\*/", TextCaseSensitive, MultilineEnabled));
-    RefPtr<TypeBuilder::Array<String>> result = TypeBuilder::Array<String>::create();
+    RefPtr<Inspector::TypeBuilder::Array<String>> result = Inspector::TypeBuilder::Array<String>::create();
     const SelectorRangeList& ranges = sourceData->selectorRanges;
     for (size_t i = 0, size = ranges.size(); i < size; ++i) {
         const SourceRange& range = ranges.at(i);
@@ -1018,12 +1019,12 @@
     return result.release();
 }
 
-PassRefPtr<TypeBuilder::CSS::SelectorList> InspectorStyleSheet::buildObjectForSelectorList(CSSStyleRule* rule)
+PassRefPtr<Inspector::TypeBuilder::CSS::SelectorList> InspectorStyleSheet::buildObjectForSelectorList(CSSStyleRule* rule)
 {
     RefPtr<CSSRuleSourceData> sourceData;
     if (ensureParsedDataReady())
         sourceData = ruleSourceDataFor(rule->style());
-    RefPtr<TypeBuilder::Array<String>> selectors;
+    RefPtr<Inspector::TypeBuilder::Array<String>> selectors;
 
     // This intentionally does not rely on the source data to avoid catching the trailing comments (before the declaration starting '{').
     String selectorText = rule->selectorText();
@@ -1031,12 +1032,12 @@
     if (sourceData)
         selectors = selectorsFromSource(sourceData.get(), m_parsedStyleSheet->text());
     else {
-        selectors = TypeBuilder::Array<String>::create();
+        selectors = Inspector::TypeBuilder::Array<String>::create();
         const CSSSelectorList& selectorList = rule->styleRule()->selectorList();
         for (const CSSSelector* selector = selectorList.first(); selector; selector = CSSSelectorList::next(selector))
             selectors->addItem(selector->selectorText());
     }
-    RefPtr<TypeBuilder::CSS::SelectorList> result = TypeBuilder::CSS::SelectorList::create()
+    RefPtr<Inspector::TypeBuilder::CSS::SelectorList> result = Inspector::TypeBuilder::CSS::SelectorList::create()
         .setSelectors(selectors)
         .setText(selectorText)
         .release();
@@ -1045,29 +1046,29 @@
     return result.release();
 }
 
-PassRefPtr<TypeBuilder::CSS::CSSRule> InspectorStyleSheet::buildObjectForRule(CSSStyleRule* rule)
+PassRefPtr<Inspector::TypeBuilder::CSS::CSSRule> InspectorStyleSheet::buildObjectForRule(CSSStyleRule* rule)
 {
     CSSStyleSheet* styleSheet = pageStyleSheet();
     if (!styleSheet)
         return 0;
 
-    RefPtr<TypeBuilder::CSS::CSSRule> result = TypeBuilder::CSS::CSSRule::create()
+    RefPtr<Inspector::TypeBuilder::CSS::CSSRule> result = Inspector::TypeBuilder::CSS::CSSRule::create()
         .setSelectorList(buildObjectForSelectorList(rule))
         .setSourceLine(rule->styleRule()->sourceLine())
         .setOrigin(m_origin)
         .setStyle(buildObjectForStyle(rule->style()));
 
     // "sourceURL" is present only for regular rules, otherwise "origin" should be used in the frontend.
-    if (m_origin == TypeBuilder::CSS::StyleSheetOrigin::Regular)
+    if (m_origin == Inspector::TypeBuilder::CSS::StyleSheetOrigin::Regular)
         result->setSourceURL(finalURL());
 
     if (canBind()) {
         InspectorCSSId id(ruleId(rule));
         if (!id.isEmpty())
-            result->setRuleId(id.asProtocolValue<TypeBuilder::CSS::CSSRuleId>());
+            result->setRuleId(id.asProtocolValue<Inspector::TypeBuilder::CSS::CSSRuleId>());
     }
 
-    RefPtr<Array<TypeBuilder::CSS::CSSMedia>> mediaArray = Array<TypeBuilder::CSS::CSSMedia>::create();
+    RefPtr<Array<Inspector::TypeBuilder::CSS::CSSMedia>> mediaArray = Array<Inspector::TypeBuilder::CSS::CSSMedia>::create();
 
     fillMediaListChain(rule, mediaArray.get());
     if (mediaArray->length())
@@ -1076,7 +1077,7 @@
     return result.release();
 }
 
-PassRefPtr<TypeBuilder::CSS::CSSStyle> InspectorStyleSheet::buildObjectForStyle(CSSStyleDeclaration* style)
+PassRefPtr<Inspector::TypeBuilder::CSS::CSSStyle> InspectorStyleSheet::buildObjectForStyle(CSSStyleDeclaration* style)
 {
     RefPtr<CSSRuleSourceData> sourceData;
     if (ensureParsedDataReady())
@@ -1084,13 +1085,13 @@
 
     InspectorCSSId id = ruleOrStyleId(style);
     if (id.isEmpty()) {
-        RefPtr<TypeBuilder::CSS::CSSStyle> bogusStyle = TypeBuilder::CSS::CSSStyle::create()
-            .setCssProperties(Array<TypeBuilder::CSS::CSSProperty>::create())
-            .setShorthandEntries(Array<TypeBuilder::CSS::ShorthandEntry>::create());
+        RefPtr<Inspector::TypeBuilder::CSS::CSSStyle> bogusStyle = Inspector::TypeBuilder::CSS::CSSStyle::create()
+            .setCssProperties(Array<Inspector::TypeBuilder::CSS::CSSProperty>::create())
+            .setShorthandEntries(Array<Inspector::TypeBuilder::CSS::ShorthandEntry>::create());
         return bogusStyle.release();
     }
     RefPtr<InspectorStyle> inspectorStyle = inspectorStyleForId(id);
-    RefPtr<TypeBuilder::CSS::CSSStyle> result = inspectorStyle->buildObjectForStyle();
+    RefPtr<Inspector::TypeBuilder::CSS::CSSStyle> result = inspectorStyle->buildObjectForStyle();
 
     // Style text cannot be retrieved without stylesheet, so set cssText here.
     if (sourceData) {
@@ -1374,7 +1375,7 @@
 
 bool InspectorStyleSheet::resourceStyleSheetText(String* result) const
 {
-    if (m_origin == TypeBuilder::CSS::StyleSheetOrigin::User || m_origin == TypeBuilder::CSS::StyleSheetOrigin::UserAgent)
+    if (m_origin == Inspector::TypeBuilder::CSS::StyleSheetOrigin::User || m_origin == Inspector::TypeBuilder::CSS::StyleSheetOrigin::UserAgent)
         return false;
 
     if (!m_pageStyleSheet || !ownerDocument() || !ownerDocument()->frame())
@@ -1406,9 +1407,9 @@
     return true;
 }
 
-PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSRule>> InspectorStyleSheet::buildArrayForRuleList(CSSRuleList* ruleList)
+PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSRule>> InspectorStyleSheet::buildArrayForRuleList(CSSRuleList* ruleList)
 {
-    RefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSRule>> result = TypeBuilder::Array<TypeBuilder::CSS::CSSRule>::create();
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSRule>> result = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSRule>::create();
     if (!ruleList)
         return result.release();
 
@@ -1440,12 +1441,12 @@
     }
 }
 
-PassRefPtr<InspectorStyleSheetForInlineStyle> InspectorStyleSheetForInlineStyle::create(InspectorPageAgent* pageAgent, const String& id, PassRefPtr<Element> element, TypeBuilder::CSS::StyleSheetOrigin::Enum origin, Listener* listener)
+PassRefPtr<InspectorStyleSheetForInlineStyle> InspectorStyleSheetForInlineStyle::create(InspectorPageAgent* pageAgent, const String& id, PassRefPtr<Element> element, Inspector::TypeBuilder::CSS::StyleSheetOrigin::Enum origin, Listener* listener)
 {
     return adoptRef(new InspectorStyleSheetForInlineStyle(pageAgent, id, element, origin, listener));
 }
 
-InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle(InspectorPageAgent* pageAgent, const String& id, PassRefPtr<Element> element, TypeBuilder::CSS::StyleSheetOrigin::Enum origin, Listener* listener)
+InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle(InspectorPageAgent* pageAgent, const String& id, PassRefPtr<Element> element, Inspector::TypeBuilder::CSS::StyleSheetOrigin::Enum origin, Listener* listener)
     : InspectorStyleSheet(pageAgent, id, 0, origin, "", listener)
     , m_element(element)
     , m_ruleSourceData(0)
diff --git a/Source/WebCore/inspector/InspectorStyleSheet.h b/Source/WebCore/inspector/InspectorStyleSheet.h
index f5039b4..2b316c3 100644
--- a/Source/WebCore/inspector/InspectorStyleSheet.h
+++ b/Source/WebCore/inspector/InspectorStyleSheet.h
@@ -29,9 +29,8 @@
 #include "CSSStyleDeclaration.h"
 #include "ExceptionCode.h"
 #include "InspectorStyleTextEditor.h"
-#include "InspectorTypeBuilder.h"
-#include "InspectorValues.h"
-
+#include "InspectorWebTypeBuilders.h"
+#include <inspector/InspectorValues.h>
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
 #include <wtf/PassRefPtr.h>
@@ -64,12 +63,12 @@
     {
     }
 
-    explicit InspectorCSSId(RefPtr<InspectorObject> value)
+    explicit InspectorCSSId(RefPtr<Inspector::InspectorObject> value)
     {
         if (!value->getString("styleSheetId", &m_styleSheetId))
             return;
         
-        RefPtr<InspectorValue> ordinalValue = value->get("ordinal");
+        RefPtr<Inspector::InspectorValue> ordinalValue = value->get("ordinal");
         if (!ordinalValue || !ordinalValue->asNumber(&m_ordinal))
             m_styleSheetId = "";
     }
@@ -85,7 +84,7 @@
     const String& styleSheetId() const { return m_styleSheetId; }
     unsigned ordinal() const { return m_ordinal; }
 
-    // ID type is either TypeBuilder::CSS::CSSStyleId or TypeBuilder::CSS::CSSRuleId.
+    // ID type is either Inspector::TypeBuilder::CSS::CSSStyleId or Inspector::TypeBuilder::CSS::CSSRuleId.
     template<typename ID>
     PassRefPtr<ID> asProtocolValue() const
     {
@@ -140,8 +139,8 @@
     virtual ~InspectorStyle();
 
     CSSStyleDeclaration* cssStyle() const { return m_style.get(); }
-    PassRefPtr<TypeBuilder::CSS::CSSStyle> buildObjectForStyle() const;
-    PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSComputedStyleProperty>> buildArrayForComputedStyle() const;
+    PassRefPtr<Inspector::TypeBuilder::CSS::CSSStyle> buildObjectForStyle() const;
+    PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSComputedStyleProperty>> buildArrayForComputedStyle() const;
     bool hasDisabledProperties() const { return !m_disabledProperties.isEmpty(); }
     bool setPropertyText(unsigned index, const String& text, bool overwrite, String* oldText, ExceptionCode&);
     bool toggleProperty(unsigned index, bool disable, ExceptionCode&);
@@ -157,7 +156,7 @@
     bool applyStyleText(const String& text) { ExceptionCode ec = 0; return setText(text, ec); }
 
     bool populateAllProperties(Vector<InspectorStyleProperty>* result) const;
-    PassRefPtr<TypeBuilder::CSS::CSSStyle> styleWithProperties() const;
+    PassRefPtr<Inspector::TypeBuilder::CSS::CSSStyle> styleWithProperties() const;
     PassRefPtr<CSSRuleSourceData> extractSourceData() const;
     String shorthandValue(const String& shorthandProperty) const;
     String shorthandPriority(const String& shorthandProperty) const;
@@ -182,7 +181,7 @@
     };
 
     typedef HashMap<CSSStyleDeclaration*, RefPtr<InspectorStyle>> InspectorStyleMap;
-    static PassRefPtr<InspectorStyleSheet> create(InspectorPageAgent*, const String& id, PassRefPtr<CSSStyleSheet> pageStyleSheet, TypeBuilder::CSS::StyleSheetOrigin::Enum, const String& documentURL, Listener*);
+    static PassRefPtr<InspectorStyleSheet> create(InspectorPageAgent*, const String& id, PassRefPtr<CSSStyleSheet> pageStyleSheet, Inspector::TypeBuilder::CSS::StyleSheetOrigin::Enum, const String& documentURL, Listener*);
     static String styleSheetURL(CSSStyleSheet* pageStyleSheet);
 
     virtual ~InspectorStyleSheet();
@@ -197,10 +196,10 @@
     CSSStyleRule* addRule(const String& selector, ExceptionCode&);
     bool deleteRule(const InspectorCSSId&, ExceptionCode&);
     CSSStyleRule* ruleForId(const InspectorCSSId&) const;
-    PassRefPtr<TypeBuilder::CSS::CSSStyleSheetBody> buildObjectForStyleSheet();
-    PassRefPtr<TypeBuilder::CSS::CSSStyleSheetHeader> buildObjectForStyleSheetInfo();
-    PassRefPtr<TypeBuilder::CSS::CSSRule> buildObjectForRule(CSSStyleRule*);
-    PassRefPtr<TypeBuilder::CSS::CSSStyle> buildObjectForStyle(CSSStyleDeclaration*);
+    PassRefPtr<Inspector::TypeBuilder::CSS::CSSStyleSheetBody> buildObjectForStyleSheet();
+    PassRefPtr<Inspector::TypeBuilder::CSS::CSSStyleSheetHeader> buildObjectForStyleSheetInfo();
+    PassRefPtr<Inspector::TypeBuilder::CSS::CSSRule> buildObjectForRule(CSSStyleRule*);
+    PassRefPtr<Inspector::TypeBuilder::CSS::CSSStyle> buildObjectForStyle(CSSStyleDeclaration*);
     bool setStyleText(const InspectorCSSId&, const String& text, String* oldText, ExceptionCode&);
     bool setPropertyText(const InspectorCSSId&, unsigned propertyIndex, const String& text, bool overwrite, String* oldPropertyText, ExceptionCode&);
     bool toggleProperty(const InspectorCSSId&, unsigned propertyIndex, bool disable, ExceptionCode&);
@@ -213,9 +212,9 @@
     InspectorCSSId styleId(CSSStyleDeclaration* style) const { return ruleOrStyleId(style); }
 
 protected:
-    InspectorStyleSheet(InspectorPageAgent*, const String& id, PassRefPtr<CSSStyleSheet> pageStyleSheet, TypeBuilder::CSS::StyleSheetOrigin::Enum, const String& documentURL, Listener*);
+    InspectorStyleSheet(InspectorPageAgent*, const String& id, PassRefPtr<CSSStyleSheet> pageStyleSheet, Inspector::TypeBuilder::CSS::StyleSheetOrigin::Enum, const String& documentURL, Listener*);
 
-    bool canBind() const { return m_origin != TypeBuilder::CSS::StyleSheetOrigin::UserAgent && m_origin != TypeBuilder::CSS::StyleSheetOrigin::User; }
+    bool canBind() const { return m_origin != Inspector::TypeBuilder::CSS::StyleSheetOrigin::UserAgent && m_origin != Inspector::TypeBuilder::CSS::StyleSheetOrigin::User; }
     InspectorCSSId ruleOrStyleId(CSSStyleDeclaration* style) const;
     virtual Document* ownerDocument() const;
     virtual RefPtr<CSSRuleSourceData> ruleSourceDataFor(CSSStyleDeclaration* style) const;
@@ -243,13 +242,13 @@
     bool originalStyleSheetText(String* result) const;
     bool resourceStyleSheetText(String* result) const;
     bool inlineStyleSheetText(String* result) const;
-    PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSRule>> buildArrayForRuleList(CSSRuleList*);
-    PassRefPtr<TypeBuilder::CSS::SelectorList> buildObjectForSelectorList(CSSStyleRule*);
+    PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSRule>> buildArrayForRuleList(CSSRuleList*);
+    PassRefPtr<Inspector::TypeBuilder::CSS::SelectorList> buildObjectForSelectorList(CSSStyleRule*);
 
     InspectorPageAgent* m_pageAgent;
     String m_id;
     RefPtr<CSSStyleSheet> m_pageStyleSheet;
-    TypeBuilder::CSS::StyleSheetOrigin::Enum m_origin;
+    Inspector::TypeBuilder::CSS::StyleSheetOrigin::Enum m_origin;
     String m_documentURL;
     bool m_isRevalidating;
     ParsedStyleSheet* m_parsedStyleSheet;
@@ -260,14 +259,14 @@
 
 class InspectorStyleSheetForInlineStyle : public InspectorStyleSheet {
 public:
-    static PassRefPtr<InspectorStyleSheetForInlineStyle> create(InspectorPageAgent*, const String& id, PassRefPtr<Element>, TypeBuilder::CSS::StyleSheetOrigin::Enum, Listener*);
+    static PassRefPtr<InspectorStyleSheetForInlineStyle> create(InspectorPageAgent*, const String& id, PassRefPtr<Element>, Inspector::TypeBuilder::CSS::StyleSheetOrigin::Enum, Listener*);
 
     void didModifyElementAttribute();
     virtual bool getText(String* result) const;
     virtual CSSStyleDeclaration* styleForId(const InspectorCSSId& id) const { ASSERT_UNUSED(id, !id.ordinal()); return inlineStyle(); }
 
 protected:
-    InspectorStyleSheetForInlineStyle(InspectorPageAgent*, const String& id, PassRefPtr<Element>, TypeBuilder::CSS::StyleSheetOrigin::Enum, Listener*);
+    InspectorStyleSheetForInlineStyle(InspectorPageAgent*, const String& id, PassRefPtr<Element>, Inspector::TypeBuilder::CSS::StyleSheetOrigin::Enum, Listener*);
 
     virtual Document* ownerDocument() const;
     virtual RefPtr<CSSRuleSourceData> ruleSourceDataFor(CSSStyleDeclaration* style) const { ASSERT_UNUSED(style, style == inlineStyle()); return m_ruleSourceData; }
diff --git a/Source/WebCore/inspector/InspectorStyleTextEditor.cpp b/Source/WebCore/inspector/InspectorStyleTextEditor.cpp
index b6ec4db..f3099a8 100644
--- a/Source/WebCore/inspector/InspectorStyleTextEditor.cpp
+++ b/Source/WebCore/inspector/InspectorStyleTextEditor.cpp
@@ -32,6 +32,8 @@
 #include "HTMLParserIdioms.h"
 #include "InspectorStyleSheet.h"
 
+using namespace Inspector;
+
 namespace WebCore {
 
 InspectorStyleTextEditor::InspectorStyleTextEditor(Vector<InspectorStyleProperty>* allProperties, Vector<InspectorStyleProperty>* disabledProperties, const String& styleText, const NewLineAndWhitespace& format)
diff --git a/Source/WebCore/inspector/InspectorTimelineAgent.cpp b/Source/WebCore/inspector/InspectorTimelineAgent.cpp
index 4c88b1b..2472ed8 100644
--- a/Source/WebCore/inspector/InspectorTimelineAgent.cpp
+++ b/Source/WebCore/inspector/InspectorTimelineAgent.cpp
@@ -54,6 +54,8 @@
 #include "TimelineRecordFactory.h"
 #include <wtf/CurrentTime.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 void TimelineTimeConverter::reset()
@@ -65,7 +67,7 @@
 {
 }
 
-void InspectorTimelineAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void InspectorTimelineAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorTimelineFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorTimelineBackendDispatcher::create(backendDispatcher, this);
@@ -422,99 +424,99 @@
     innerAddRecordToTimeline(record, type);
 }
 
-static TypeBuilder::Timeline::EventType::Enum toProtocol(TimelineRecordType type)
+static Inspector::TypeBuilder::Timeline::EventType::Enum toProtocol(TimelineRecordType type)
 {
     switch (type) {
     case TimelineRecordType::EventDispatch:
-        return TypeBuilder::Timeline::EventType::EventDispatch;
+        return Inspector::TypeBuilder::Timeline::EventType::EventDispatch;
     case TimelineRecordType::BeginFrame:
-        return TypeBuilder::Timeline::EventType::BeginFrame;
+        return Inspector::TypeBuilder::Timeline::EventType::BeginFrame;
     case TimelineRecordType::ScheduleStyleRecalculation:
-        return TypeBuilder::Timeline::EventType::ScheduleStyleRecalculation;
+        return Inspector::TypeBuilder::Timeline::EventType::ScheduleStyleRecalculation;
     case TimelineRecordType::RecalculateStyles:
-        return TypeBuilder::Timeline::EventType::RecalculateStyles;
+        return Inspector::TypeBuilder::Timeline::EventType::RecalculateStyles;
     case TimelineRecordType::InvalidateLayout:
-        return TypeBuilder::Timeline::EventType::InvalidateLayout;
+        return Inspector::TypeBuilder::Timeline::EventType::InvalidateLayout;
     case TimelineRecordType::Layout:
-        return TypeBuilder::Timeline::EventType::Layout;
+        return Inspector::TypeBuilder::Timeline::EventType::Layout;
     case TimelineRecordType::Paint:
-        return TypeBuilder::Timeline::EventType::Paint;
+        return Inspector::TypeBuilder::Timeline::EventType::Paint;
     case TimelineRecordType::ScrollLayer:
-        return TypeBuilder::Timeline::EventType::ScrollLayer;
+        return Inspector::TypeBuilder::Timeline::EventType::ScrollLayer;
     case TimelineRecordType::ResizeImage:
-        return TypeBuilder::Timeline::EventType::ResizeImage;
+        return Inspector::TypeBuilder::Timeline::EventType::ResizeImage;
     case TimelineRecordType::CompositeLayers:
-        return TypeBuilder::Timeline::EventType::CompositeLayers;
+        return Inspector::TypeBuilder::Timeline::EventType::CompositeLayers;
 
     case TimelineRecordType::ParseHTML:
-        return TypeBuilder::Timeline::EventType::ParseHTML;
+        return Inspector::TypeBuilder::Timeline::EventType::ParseHTML;
 
     case TimelineRecordType::TimerInstall:
-        return TypeBuilder::Timeline::EventType::TimerInstall;
+        return Inspector::TypeBuilder::Timeline::EventType::TimerInstall;
     case TimelineRecordType::TimerRemove:
-        return TypeBuilder::Timeline::EventType::TimerRemove;
+        return Inspector::TypeBuilder::Timeline::EventType::TimerRemove;
     case TimelineRecordType::TimerFire:
-        return TypeBuilder::Timeline::EventType::TimerFire;
+        return Inspector::TypeBuilder::Timeline::EventType::TimerFire;
 
     case TimelineRecordType::EvaluateScript:
-        return TypeBuilder::Timeline::EventType::EvaluateScript;
+        return Inspector::TypeBuilder::Timeline::EventType::EvaluateScript;
 
     case TimelineRecordType::MarkLoad:
-        return TypeBuilder::Timeline::EventType::MarkLoad;
+        return Inspector::TypeBuilder::Timeline::EventType::MarkLoad;
     case TimelineRecordType::MarkDOMContent:
-        return TypeBuilder::Timeline::EventType::MarkDOMContent;
+        return Inspector::TypeBuilder::Timeline::EventType::MarkDOMContent;
 
     case TimelineRecordType::TimeStamp:
-        return TypeBuilder::Timeline::EventType::TimeStamp;
+        return Inspector::TypeBuilder::Timeline::EventType::TimeStamp;
     case TimelineRecordType::Time:
-        return TypeBuilder::Timeline::EventType::Time;
+        return Inspector::TypeBuilder::Timeline::EventType::Time;
     case TimelineRecordType::TimeEnd:
-        return TypeBuilder::Timeline::EventType::TimeEnd;
+        return Inspector::TypeBuilder::Timeline::EventType::TimeEnd;
 
     case TimelineRecordType::ScheduleResourceRequest:
-        return TypeBuilder::Timeline::EventType::ScheduleResourceRequest;
+        return Inspector::TypeBuilder::Timeline::EventType::ScheduleResourceRequest;
     case TimelineRecordType::ResourceSendRequest:
-        return TypeBuilder::Timeline::EventType::ResourceSendRequest;
+        return Inspector::TypeBuilder::Timeline::EventType::ResourceSendRequest;
     case TimelineRecordType::ResourceReceiveResponse:
-        return TypeBuilder::Timeline::EventType::ResourceReceiveResponse;
+        return Inspector::TypeBuilder::Timeline::EventType::ResourceReceiveResponse;
     case TimelineRecordType::ResourceReceivedData:
-        return TypeBuilder::Timeline::EventType::ResourceReceivedData;
+        return Inspector::TypeBuilder::Timeline::EventType::ResourceReceivedData;
     case TimelineRecordType::ResourceFinish:
-        return TypeBuilder::Timeline::EventType::ResourceFinish;
+        return Inspector::TypeBuilder::Timeline::EventType::ResourceFinish;
 
     case TimelineRecordType::XHRReadyStateChange:
-        return TypeBuilder::Timeline::EventType::XHRReadyStateChange;
+        return Inspector::TypeBuilder::Timeline::EventType::XHRReadyStateChange;
     case TimelineRecordType::XHRLoad:
-        return TypeBuilder::Timeline::EventType::XHRLoad;
+        return Inspector::TypeBuilder::Timeline::EventType::XHRLoad;
 
     case TimelineRecordType::FunctionCall:
-        return TypeBuilder::Timeline::EventType::FunctionCall;
+        return Inspector::TypeBuilder::Timeline::EventType::FunctionCall;
 
     case TimelineRecordType::RequestAnimationFrame:
-        return TypeBuilder::Timeline::EventType::RequestAnimationFrame;
+        return Inspector::TypeBuilder::Timeline::EventType::RequestAnimationFrame;
     case TimelineRecordType::CancelAnimationFrame:
-        return TypeBuilder::Timeline::EventType::CancelAnimationFrame;
+        return Inspector::TypeBuilder::Timeline::EventType::CancelAnimationFrame;
     case TimelineRecordType::FireAnimationFrame:
-        return TypeBuilder::Timeline::EventType::FireAnimationFrame;
+        return Inspector::TypeBuilder::Timeline::EventType::FireAnimationFrame;
 
     case TimelineRecordType::WebSocketCreate:
-        return TypeBuilder::Timeline::EventType::WebSocketCreate;
+        return Inspector::TypeBuilder::Timeline::EventType::WebSocketCreate;
     case TimelineRecordType::WebSocketSendHandshakeRequest:
-        return TypeBuilder::Timeline::EventType::WebSocketSendHandshakeRequest;
+        return Inspector::TypeBuilder::Timeline::EventType::WebSocketSendHandshakeRequest;
     case TimelineRecordType::WebSocketReceiveHandshakeResponse:
-        return TypeBuilder::Timeline::EventType::WebSocketReceiveHandshakeResponse;
+        return Inspector::TypeBuilder::Timeline::EventType::WebSocketReceiveHandshakeResponse;
     case TimelineRecordType::WebSocketDestroy:
-        return TypeBuilder::Timeline::EventType::WebSocketDestroy;
+        return Inspector::TypeBuilder::Timeline::EventType::WebSocketDestroy;
     }
 
-    return TypeBuilder::Timeline::EventType::TimeStamp;
+    return Inspector::TypeBuilder::Timeline::EventType::TimeStamp;
 }
 
 void InspectorTimelineAgent::innerAddRecordToTimeline(PassRefPtr<InspectorObject> prpRecord, TimelineRecordType type)
 {
-    prpRecord->setString("type", TypeBuilder::getEnumConstantValue(toProtocol(type)));
+    prpRecord->setString("type", Inspector::TypeBuilder::getEnumConstantValue(toProtocol(type)));
 
-    RefPtr<TypeBuilder::Timeline::TimelineEvent> record = TypeBuilder::Timeline::TimelineEvent::runtimeCast(prpRecord);
+    RefPtr<Inspector::TypeBuilder::Timeline::TimelineEvent> record = Inspector::TypeBuilder::Timeline::TimelineEvent::runtimeCast(prpRecord);
 
     setDOMCounters(record.get());
 
@@ -531,7 +533,7 @@
     return JSDOMWindow::commonVM()->heap.size();
 }
 
-void InspectorTimelineAgent::setDOMCounters(TypeBuilder::Timeline::TimelineEvent* record)
+void InspectorTimelineAgent::setDOMCounters(Inspector::TypeBuilder::Timeline::TimelineEvent* record)
 {
     record->setUsedHeapSize(usedHeapSize());
 
@@ -543,7 +545,7 @@
             nodeCount = InspectorCounters::counterValue(InspectorCounters::NodeCounter);
         }
         int listenerCount = ThreadLocalInspectorCounters::current().counterValue(ThreadLocalInspectorCounters::JSEventListenerCounter);
-        RefPtr<TypeBuilder::Timeline::DOMCounters> counters = TypeBuilder::Timeline::DOMCounters::create()
+        RefPtr<Inspector::TypeBuilder::Timeline::DOMCounters> counters = Inspector::TypeBuilder::Timeline::DOMCounters::create()
             .setDocuments(documentCount)
             .setNodes(nodeCount)
             .setJsEventListeners(listenerCount);
@@ -580,7 +582,7 @@
 }
 
 InspectorTimelineAgent::InspectorTimelineAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorMemoryAgent* memoryAgent, InspectorType type, InspectorClient* client)
-    : InspectorBaseAgent(ASCIILiteral("Timeline"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("Timeline"), instrumentingAgents)
     , m_pageAgent(pageAgent)
     , m_memoryAgent(memoryAgent)
     , m_id(1)
@@ -604,7 +606,7 @@
 void InspectorTimelineAgent::sendEvent(PassRefPtr<InspectorObject> event)
 {
     // FIXME: runtimeCast is a hack. We do it because we can't build TimelineEvent directly now.
-    RefPtr<TypeBuilder::Timeline::TimelineEvent> recordChecked = TypeBuilder::Timeline::TimelineEvent::runtimeCast(event);
+    RefPtr<Inspector::TypeBuilder::Timeline::TimelineEvent> recordChecked = Inspector::TypeBuilder::Timeline::TimelineEvent::runtimeCast(event);
     m_frontendDispatcher->eventRecorded(recordChecked.release());
 }
 
diff --git a/Source/WebCore/inspector/InspectorTimelineAgent.h b/Source/WebCore/inspector/InspectorTimelineAgent.h
index 45dc2f3..05b8e02 100644
--- a/Source/WebCore/inspector/InspectorTimelineAgent.h
+++ b/Source/WebCore/inspector/InspectorTimelineAgent.h
@@ -33,10 +33,11 @@
 
 #if ENABLE(INSPECTOR)
 
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
 #include "InspectorFrontend.h"
-#include "InspectorValues.h"
+#include "InspectorWebAgentBase.h"
 #include "LayoutRect.h"
+#include <inspector/InspectorValues.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/Vector.h>
 #include <wtf/WeakPtr.h>
@@ -121,7 +122,7 @@
 };
 
 class InspectorTimelineAgent
-    : public InspectorBaseAgent
+    : public InspectorAgentBase
     , public InspectorTimelineBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorTimelineAgent);
 public:
@@ -134,7 +135,7 @@
 
     ~InspectorTimelineAgent();
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     virtual void start(ErrorString*, const int* maxCallStackDepth, const bool* includeDomCounters);
@@ -220,33 +221,33 @@
     friend class TimelineRecordStack;
 
     struct TimelineRecordEntry {
-        TimelineRecordEntry(PassRefPtr<InspectorObject> record, PassRefPtr<InspectorObject> data, PassRefPtr<InspectorArray> children, TimelineRecordType type, size_t usedHeapSizeAtStart)
+        TimelineRecordEntry(PassRefPtr<Inspector::InspectorObject> record, PassRefPtr<Inspector::InspectorObject> data, PassRefPtr<Inspector::InspectorArray> children, TimelineRecordType type, size_t usedHeapSizeAtStart)
             : record(record), data(data), children(children), type(type), usedHeapSizeAtStart(usedHeapSizeAtStart)
         {
         }
-        RefPtr<InspectorObject> record;
-        RefPtr<InspectorObject> data;
-        RefPtr<InspectorArray> children;
+        RefPtr<Inspector::InspectorObject> record;
+        RefPtr<Inspector::InspectorObject> data;
+        RefPtr<Inspector::InspectorArray> children;
         TimelineRecordType type;
         size_t usedHeapSizeAtStart;
     };
 
     InspectorTimelineAgent(InstrumentingAgents*, InspectorPageAgent*, InspectorMemoryAgent*, InspectorType, InspectorClient*);
 
-    void sendEvent(PassRefPtr<InspectorObject>);
-    void appendRecord(PassRefPtr<InspectorObject> data, TimelineRecordType, bool captureCallStack, Frame*);
-    void pushCurrentRecord(PassRefPtr<InspectorObject>, TimelineRecordType, bool captureCallStack, Frame*);
+    void sendEvent(PassRefPtr<Inspector::InspectorObject>);
+    void appendRecord(PassRefPtr<Inspector::InspectorObject> data, TimelineRecordType, bool captureCallStack, Frame*);
+    void pushCurrentRecord(PassRefPtr<Inspector::InspectorObject>, TimelineRecordType, bool captureCallStack, Frame*);
 
-    void setDOMCounters(TypeBuilder::Timeline::TimelineEvent* record);
-    void setFrameIdentifier(InspectorObject* record, Frame*);
+    void setDOMCounters(Inspector::TypeBuilder::Timeline::TimelineEvent* record);
+    void setFrameIdentifier(Inspector::InspectorObject* record, Frame*);
 
     void didCompleteCurrentRecord(TimelineRecordType);
 
-    void setHeapSizeStatistics(InspectorObject* record);
+    void setHeapSizeStatistics(Inspector::InspectorObject* record);
     void commitFrameRecord();
 
-    void addRecordToTimeline(PassRefPtr<InspectorObject>, TimelineRecordType);
-    void innerAddRecordToTimeline(PassRefPtr<InspectorObject>, TimelineRecordType);
+    void addRecordToTimeline(PassRefPtr<Inspector::InspectorObject>, TimelineRecordType);
+    void innerAddRecordToTimeline(PassRefPtr<Inspector::InspectorObject>, TimelineRecordType);
     void clearRecordStack();
 
     void localToPageQuad(const RenderObject&, const LayoutRect&, FloatQuad*);
@@ -266,7 +267,7 @@
 
     int m_id;
     int m_maxCallStackDepth;
-    RefPtr<InspectorObject> m_pendingFrameRecord;
+    RefPtr<Inspector::InspectorObject> m_pendingFrameRecord;
     InspectorType m_inspectorType;
     InspectorClient* m_client;
     WeakPtrFactory<InspectorTimelineAgent> m_weakFactory;
diff --git a/Source/WebCore/inspector/InspectorValues.cpp b/Source/WebCore/inspector/InspectorValues.cpp
deleted file mode 100644
index 8fce32d..0000000
--- a/Source/WebCore/inspector/InspectorValues.cpp
+++ /dev/null
@@ -1,836 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "InspectorValues.h"
-
-#include <wtf/DecimalNumber.h>
-#include <wtf/dtoa.h>
-#include <wtf/text/StringBuilder.h>
-
-namespace WebCore {
-
-namespace {
-
-static const int stackLimit = 1000;
-
-enum Token {
-    OBJECT_BEGIN,
-    OBJECT_END,
-    ARRAY_BEGIN,
-    ARRAY_END,
-    STRING,
-    NUMBER,
-    BOOL_TRUE,
-    BOOL_FALSE,
-    NULL_TOKEN,
-    LIST_SEPARATOR,
-    OBJECT_PAIR_SEPARATOR,
-    INVALID_TOKEN,
-};
-
-const char* const nullString = "null";
-const char* const trueString = "true";
-const char* const falseString = "false";
-
-bool parseConstToken(const UChar* start, const UChar* end, const UChar** tokenEnd, const char* token)
-{
-    while (start < end && *token != '\0' && *start++ == *token++) { }
-    if (*token != '\0')
-        return false;
-    *tokenEnd = start;
-    return true;
-}
-
-bool readInt(const UChar* start, const UChar* end, const UChar** tokenEnd, bool canHaveLeadingZeros)
-{
-    if (start == end)
-        return false;
-    bool haveLeadingZero = '0' == *start;
-    int length = 0;
-    while (start < end && '0' <= *start && *start <= '9') {
-        ++start;
-        ++length;
-    }
-    if (!length)
-        return false;
-    if (!canHaveLeadingZeros && length > 1 && haveLeadingZero)
-        return false;
-    *tokenEnd = start;
-    return true;
-}
-
-bool parseNumberToken(const UChar* start, const UChar* end, const UChar** tokenEnd)
-{
-    // We just grab the number here.  We validate the size in DecodeNumber.
-    // According   to RFC4627, a valid number is: [minus] int [frac] [exp]
-    if (start == end)
-        return false;
-    UChar c = *start;
-    if ('-' == c)
-        ++start;
-
-    if (!readInt(start, end, &start, false))
-        return false;
-    if (start == end) {
-        *tokenEnd = start;
-        return true;
-    }
-
-    // Optional fraction part
-    c = *start;
-    if ('.' == c) {
-        ++start;
-        if (!readInt(start, end, &start, true))
-            return false;
-        if (start == end) {
-            *tokenEnd = start;
-            return true;
-        }
-        c = *start;
-    }
-
-    // Optional exponent part
-    if ('e' == c || 'E' == c) {
-        ++start;
-        if (start == end)
-            return false;
-        c = *start;
-        if ('-' == c || '+' == c) {
-            ++start;
-            if (start == end)
-                return false;
-        }
-        if (!readInt(start, end, &start, true))
-            return false;
-    }
-
-    *tokenEnd = start;
-    return true;
-}
-
-bool readHexDigits(const UChar* start, const UChar* end, const UChar** tokenEnd, int digits)
-{
-    if (end - start < digits)
-        return false;
-    for (int i = 0; i < digits; ++i) {
-        UChar c = *start++;
-        if (!(('0' <= c && c <= '9') || ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F')))
-            return false;
-    }
-    *tokenEnd = start;
-    return true;
-}
-
-bool parseStringToken(const UChar* start, const UChar* end, const UChar** tokenEnd)
-{
-    while (start < end) {
-        UChar c = *start++;
-        if ('\\' == c) {
-            c = *start++;
-            // Make sure the escaped char is valid.
-            switch (c) {
-            case 'x':
-                if (!readHexDigits(start, end, &start, 2))
-                    return false;
-                break;
-            case 'u':
-                if (!readHexDigits(start, end, &start, 4))
-                    return false;
-                break;
-            case '\\':
-            case '/':
-            case 'b':
-            case 'f':
-            case 'n':
-            case 'r':
-            case 't':
-            case 'v':
-            case '"':
-                break;
-            default:
-                return false;
-            }
-        } else if ('"' == c) {
-            *tokenEnd = start;
-            return true;
-        }
-    }
-    return false;
-}
-
-Token parseToken(const UChar* start, const UChar* end, const UChar** tokenStart, const UChar** tokenEnd)
-{
-    while (start < end && isSpaceOrNewline(*start))
-        ++start;
-
-    if (start == end)
-        return INVALID_TOKEN;
-
-    *tokenStart = start;
-
-    switch (*start) {
-    case 'n':
-        if (parseConstToken(start, end, tokenEnd, nullString))
-            return NULL_TOKEN;
-        break;
-    case 't':
-        if (parseConstToken(start, end, tokenEnd, trueString))
-            return BOOL_TRUE;
-        break;
-    case 'f':
-        if (parseConstToken(start, end, tokenEnd, falseString))
-            return BOOL_FALSE;
-        break;
-    case '[':
-        *tokenEnd = start + 1;
-        return ARRAY_BEGIN;
-    case ']':
-        *tokenEnd = start + 1;
-        return ARRAY_END;
-    case ',':
-        *tokenEnd = start + 1;
-        return LIST_SEPARATOR;
-    case '{':
-        *tokenEnd = start + 1;
-        return OBJECT_BEGIN;
-    case '}':
-        *tokenEnd = start + 1;
-        return OBJECT_END;
-    case ':':
-        *tokenEnd = start + 1;
-        return OBJECT_PAIR_SEPARATOR;
-    case '0':
-    case '1':
-    case '2':
-    case '3':
-    case '4':
-    case '5':
-    case '6':
-    case '7':
-    case '8':
-    case '9':
-    case '-':
-        if (parseNumberToken(start, end, tokenEnd))
-            return NUMBER;
-        break;
-    case '"':
-        if (parseStringToken(start + 1, end, tokenEnd))
-            return STRING;
-        break;
-    }
-    return INVALID_TOKEN;
-}
-
-inline int hexToInt(UChar c)
-{
-    if ('0' <= c && c <= '9')
-        return c - '0';
-    if ('A' <= c && c <= 'F')
-        return c - 'A' + 10;
-    if ('a' <= c && c <= 'f')
-        return c - 'a' + 10;
-    ASSERT_NOT_REACHED();
-    return 0;
-}
-
-bool decodeString(const UChar* start, const UChar* end, StringBuilder* output)
-{
-    while (start < end) {
-        UChar c = *start++;
-        if ('\\' != c) {
-            output->append(c);
-            continue;
-        }
-        c = *start++;
-        switch (c) {
-        case '"':
-        case '/':
-        case '\\':
-            break;
-        case 'b':
-            c = '\b';
-            break;
-        case 'f':
-            c = '\f';
-            break;
-        case 'n':
-            c = '\n';
-            break;
-        case 'r':
-            c = '\r';
-            break;
-        case 't':
-            c = '\t';
-            break;
-        case 'v':
-            c = '\v';
-            break;
-        case 'x':
-            c = (hexToInt(*start) << 4) +
-                hexToInt(*(start + 1));
-            start += 2;
-            break;
-        case 'u':
-            c = (hexToInt(*start) << 12) +
-                (hexToInt(*(start + 1)) << 8) +
-                (hexToInt(*(start + 2)) << 4) +
-                hexToInt(*(start + 3));
-            start += 4;
-            break;
-        default:
-            return false;
-        }
-        output->append(c);
-    }
-    return true;
-}
-
-bool decodeString(const UChar* start, const UChar* end, String* output)
-{
-    if (start == end) {
-        *output = "";
-        return true;
-    }
-    if (start > end)
-        return false;
-    StringBuilder buffer;
-    buffer.reserveCapacity(end - start);
-    if (!decodeString(start, end, &buffer))
-        return false;
-    *output = buffer.toString();
-    return true;
-}
-
-PassRefPtr<InspectorValue> buildValue(const UChar* start, const UChar* end, const UChar** valueTokenEnd, int depth)
-{
-    if (depth > stackLimit)
-        return 0;
-
-    RefPtr<InspectorValue> result;
-    const UChar* tokenStart;
-    const UChar* tokenEnd;
-    Token token = parseToken(start, end, &tokenStart, &tokenEnd);
-    switch (token) {
-    case INVALID_TOKEN:
-        return 0;
-    case NULL_TOKEN:
-        result = InspectorValue::null();
-        break;
-    case BOOL_TRUE:
-        result = InspectorBasicValue::create(true);
-        break;
-    case BOOL_FALSE:
-        result = InspectorBasicValue::create(false);
-        break;
-    case NUMBER: {
-        bool ok;
-        double value = charactersToDouble(tokenStart, tokenEnd - tokenStart, &ok);
-        if (!ok)
-            return 0;
-        result = InspectorBasicValue::create(value);
-        break;
-    }
-    case STRING: {
-        String value;
-        bool ok = decodeString(tokenStart + 1, tokenEnd - 1, &value);
-        if (!ok)
-            return 0;
-        result = InspectorString::create(value);
-        break;
-    }
-    case ARRAY_BEGIN: {
-        RefPtr<InspectorArray> array = InspectorArray::create();
-        start = tokenEnd;
-        token = parseToken(start, end, &tokenStart, &tokenEnd);
-        while (token != ARRAY_END) {
-            RefPtr<InspectorValue> arrayNode = buildValue(start, end, &tokenEnd, depth + 1);
-            if (!arrayNode)
-                return 0;
-            array->pushValue(arrayNode);
-
-            // After a list value, we expect a comma or the end of the list.
-            start = tokenEnd;
-            token = parseToken(start, end, &tokenStart, &tokenEnd);
-            if (token == LIST_SEPARATOR) {
-                start = tokenEnd;
-                token = parseToken(start, end, &tokenStart, &tokenEnd);
-                if (token == ARRAY_END)
-                    return 0;
-            } else if (token != ARRAY_END) {
-                // Unexpected value after list value.  Bail out.
-                return 0;
-            }
-        }
-        if (token != ARRAY_END)
-            return 0;
-        result = array.release();
-        break;
-    }
-    case OBJECT_BEGIN: {
-        RefPtr<InspectorObject> object = InspectorObject::create();
-        start = tokenEnd;
-        token = parseToken(start, end, &tokenStart, &tokenEnd);
-        while (token != OBJECT_END) {
-            if (token != STRING)
-                return 0;
-            String key;
-            if (!decodeString(tokenStart + 1, tokenEnd - 1, &key))
-                return 0;
-            start = tokenEnd;
-
-            token = parseToken(start, end, &tokenStart, &tokenEnd);
-            if (token != OBJECT_PAIR_SEPARATOR)
-                return 0;
-            start = tokenEnd;
-
-            RefPtr<InspectorValue> value = buildValue(start, end, &tokenEnd, depth + 1);
-            if (!value)
-                return 0;
-            object->setValue(key, value);
-            start = tokenEnd;
-
-            // After a key/value pair, we expect a comma or the end of the
-            // object.
-            token = parseToken(start, end, &tokenStart, &tokenEnd);
-            if (token == LIST_SEPARATOR) {
-                start = tokenEnd;
-                token = parseToken(start, end, &tokenStart, &tokenEnd);
-                 if (token == OBJECT_END)
-                    return 0;
-            } else if (token != OBJECT_END) {
-                // Unexpected value after last object value.  Bail out.
-                return 0;
-            }
-        }
-        if (token != OBJECT_END)
-            return 0;
-        result = object.release();
-        break;
-    }
-
-    default:
-        // We got a token that's not a value.
-        return 0;
-    }
-    *valueTokenEnd = tokenEnd;
-    return result.release();
-}
-
-inline bool escapeChar(UChar c, StringBuilder* dst)
-{
-    switch (c) {
-    case '\b': dst->append("\\b", 2); break;
-    case '\f': dst->append("\\f", 2); break;
-    case '\n': dst->append("\\n", 2); break;
-    case '\r': dst->append("\\r", 2); break;
-    case '\t': dst->append("\\t", 2); break;
-    case '\\': dst->append("\\\\", 2); break;
-    case '"': dst->append("\\\"", 2); break;
-    default:
-        return false;
-    }
-    return true;
-}
-
-inline void doubleQuoteString(const String& str, StringBuilder* dst)
-{
-    dst->append('"');
-    for (unsigned i = 0; i < str.length(); ++i) {
-        UChar c = str[i];
-        if (!escapeChar(c, dst)) {
-            if (c < 32 || c > 126 || c == '<' || c == '>') {
-                // 1. Escaping <, > to prevent script execution.
-                // 2. Technically, we could also pass through c > 126 as UTF8, but this
-                //    is also optional.  It would also be a pain to implement here.
-                unsigned int symbol = static_cast<unsigned int>(c);
-                String symbolCode = String::format("\\u%04X", symbol);
-                dst->append(symbolCode.characters(), symbolCode.length());
-            } else
-                dst->append(c);
-        }
-    }
-    dst->append('"');
-}
-
-} // anonymous namespace
-
-bool InspectorValue::asBoolean(bool*) const
-{
-    return false;
-}
-
-bool InspectorValue::asNumber(double*) const
-{
-    return false;
-}
-
-bool InspectorValue::asNumber(long*) const
-{
-    return false;
-}
-
-bool InspectorValue::asNumber(int*) const
-{
-    return false;
-}
-
-bool InspectorValue::asNumber(unsigned long*) const
-{
-    return false;
-}
-
-bool InspectorValue::asNumber(unsigned int*) const
-{
-    return false;
-}
-
-bool InspectorValue::asString(String*) const
-{
-    return false;
-}
-
-bool InspectorValue::asValue(RefPtr<InspectorValue>* output)
-{
-    *output = this;
-    return true;
-}
-
-bool InspectorValue::asObject(RefPtr<InspectorObject>*)
-{
-    return false;
-}
-
-bool InspectorValue::asArray(RefPtr<InspectorArray>*)
-{
-    return false;
-}
-
-PassRefPtr<InspectorObject> InspectorValue::asObject()
-{
-    return 0;
-}
-
-PassRefPtr<InspectorArray> InspectorValue::asArray()
-{
-    return 0;
-}
-
-PassRefPtr<InspectorValue> InspectorValue::parseJSON(const String& json)
-{
-    const UChar* start = json.characters();
-    const UChar* end = json.characters() + json.length();
-    const UChar *tokenEnd;
-    RefPtr<InspectorValue> value = buildValue(start, end, &tokenEnd, 0);
-    if (!value || tokenEnd != end)
-        return 0;
-    return value.release();
-}
-
-String InspectorValue::toJSONString() const
-{
-    StringBuilder result;
-    result.reserveCapacity(512);
-    writeJSON(&result);
-    return result.toString();
-}
-
-void InspectorValue::writeJSON(StringBuilder* output) const
-{
-    ASSERT(m_type == TypeNull);
-    output->append(nullString, 4);
-}
-
-bool InspectorBasicValue::asBoolean(bool* output) const
-{
-    if (type() != TypeBoolean)
-        return false;
-    *output = m_boolValue;
-    return true;
-}
-
-bool InspectorBasicValue::asNumber(double* output) const
-{
-    if (type() != TypeNumber)
-        return false;
-    *output = m_doubleValue;
-    return true;
-}
-
-bool InspectorBasicValue::asNumber(long* output) const
-{
-    if (type() != TypeNumber)
-        return false;
-    *output = static_cast<long>(m_doubleValue);
-    return true;
-}
-
-bool InspectorBasicValue::asNumber(int* output) const
-{
-    if (type() != TypeNumber)
-        return false;
-    *output = static_cast<int>(m_doubleValue);
-    return true;
-}
-
-bool InspectorBasicValue::asNumber(unsigned long* output) const
-{
-    if (type() != TypeNumber)
-        return false;
-    *output = static_cast<unsigned long>(m_doubleValue);
-    return true;
-}
-
-bool InspectorBasicValue::asNumber(unsigned int* output) const
-{
-    if (type() != TypeNumber)
-        return false;
-    *output = static_cast<unsigned int>(m_doubleValue);
-    return true;
-}
-
-void InspectorBasicValue::writeJSON(StringBuilder* output) const
-{
-    ASSERT(type() == TypeBoolean || type() == TypeNumber);
-    if (type() == TypeBoolean) {
-        if (m_boolValue)
-            output->append(trueString, 4);
-        else
-            output->append(falseString, 5);
-    } else if (type() == TypeNumber) {
-        NumberToLStringBuffer buffer;
-        if (!std::isfinite(m_doubleValue)) {
-            output->append(nullString, 4);
-            return;
-        }
-        DecimalNumber decimal = m_doubleValue;
-        unsigned length = 0;
-        if (decimal.bufferLengthForStringDecimal() > WTF::NumberToStringBufferLength) {
-            // Not enough room for decimal. Use exponential format.
-            if (decimal.bufferLengthForStringExponential() > WTF::NumberToStringBufferLength) {
-                // Fallback for an abnormal case if it's too little even for exponential.
-                output->append("NaN", 3);
-                return;
-            }
-            length = decimal.toStringExponential(buffer, WTF::NumberToStringBufferLength);
-        } else
-            length = decimal.toStringDecimal(buffer, WTF::NumberToStringBufferLength);
-        output->append(buffer, length);
-    }
-}
-
-bool InspectorString::asString(String* output) const
-{
-    *output = m_stringValue;
-    return true;
-}
-
-void InspectorString::writeJSON(StringBuilder* output) const
-{
-    ASSERT(type() == TypeString);
-    doubleQuoteString(m_stringValue, output);
-}
-
-InspectorObjectBase::~InspectorObjectBase()
-{
-}
-
-bool InspectorObjectBase::asObject(RefPtr<InspectorObject>* output)
-{
-    COMPILE_ASSERT(sizeof(InspectorObject) == sizeof(InspectorObjectBase), cannot_cast);
-    *output = static_cast<InspectorObject*>(this);
-    return true;
-}
-
-PassRefPtr<InspectorObject> InspectorObjectBase::asObject()
-{
-    return openAccessors();
-}
-
-InspectorObject* InspectorObjectBase::openAccessors()
-{
-    COMPILE_ASSERT(sizeof(InspectorObject) == sizeof(InspectorObjectBase), cannot_cast);
-    return static_cast<InspectorObject*>(this);
-}
-
-bool InspectorObjectBase::getBoolean(const String& name, bool* output) const
-{
-    RefPtr<InspectorValue> value = get(name);
-    if (!value)
-        return false;
-    return value->asBoolean(output);
-}
-
-bool InspectorObjectBase::getString(const String& name, String* output) const
-{
-    RefPtr<InspectorValue> value = get(name);
-    if (!value)
-        return false;
-    return value->asString(output);
-}
-
-PassRefPtr<InspectorObject> InspectorObjectBase::getObject(const String& name) const
-{
-    PassRefPtr<InspectorValue> value = get(name);
-    if (!value)
-        return 0;
-    return value->asObject();
-}
-
-PassRefPtr<InspectorArray> InspectorObjectBase::getArray(const String& name) const
-{
-    PassRefPtr<InspectorValue> value = get(name);
-    if (!value)
-        return 0;
-    return value->asArray();
-}
-
-PassRefPtr<InspectorValue> InspectorObjectBase::get(const String& name) const
-{
-    Dictionary::const_iterator it = m_data.find(name);
-    if (it == m_data.end())
-        return 0;
-    return it->value;
-}
-
-void InspectorObjectBase::remove(const String& name)
-{
-    m_data.remove(name);
-    for (size_t i = 0; i < m_order.size(); ++i) {
-        if (m_order[i] == name) {
-            m_order.remove(i);
-            break;
-        }
-    }
-}
-
-void InspectorObjectBase::writeJSON(StringBuilder* output) const
-{
-    output->append('{');
-    for (size_t i = 0; i < m_order.size(); ++i) {
-        Dictionary::const_iterator it = m_data.find(m_order[i]);
-        ASSERT(it != m_data.end());
-        if (i)
-            output->append(',');
-        doubleQuoteString(it->key, output);
-        output->append(':');
-        it->value->writeJSON(output);
-    }
-    output->append('}');
-}
-
-InspectorObjectBase::InspectorObjectBase()
-    : InspectorValue(TypeObject)
-    , m_data()
-    , m_order()
-{
-}
-
-InspectorArrayBase::~InspectorArrayBase()
-{
-}
-
-bool InspectorArrayBase::asArray(RefPtr<InspectorArray>* output)
-{
-    COMPILE_ASSERT(sizeof(InspectorArrayBase) == sizeof(InspectorArray), cannot_cast);
-    *output = static_cast<InspectorArray*>(this);
-    return true;
-}
-
-PassRefPtr<InspectorArray> InspectorArrayBase::asArray()
-{
-    COMPILE_ASSERT(sizeof(InspectorArrayBase) == sizeof(InspectorArray), cannot_cast);
-    return static_cast<InspectorArray*>(this);
-}
-
-void InspectorArrayBase::writeJSON(StringBuilder* output) const
-{
-    output->append('[');
-    for (Vector<RefPtr<InspectorValue>>::const_iterator it = m_data.begin(); it != m_data.end(); ++it) {
-        if (it != m_data.begin())
-            output->append(',');
-        (*it)->writeJSON(output);
-    }
-    output->append(']');
-}
-
-InspectorArrayBase::InspectorArrayBase()
-    : InspectorValue(TypeArray)
-    , m_data()
-{
-}
-
-PassRefPtr<InspectorValue> InspectorArrayBase::get(size_t index)
-{
-    ASSERT_WITH_SECURITY_IMPLICATION(index < m_data.size());
-    return m_data[index];
-}
-
-PassRefPtr<InspectorObject> InspectorObject::create()
-{
-    return adoptRef(new InspectorObject);
-}
-
-PassRefPtr<InspectorArray> InspectorArray::create()
-{
-    return adoptRef(new InspectorArray);
-}
-
-PassRefPtr<InspectorValue> InspectorValue::null()
-{
-    return adoptRef(new InspectorValue);
-}
-
-PassRefPtr<InspectorString> InspectorString::create(const String& value)
-{
-    return adoptRef(new InspectorString(value));
-}
-
-PassRefPtr<InspectorString> InspectorString::create(const char* value)
-{
-    return adoptRef(new InspectorString(value));
-}
-
-PassRefPtr<InspectorBasicValue> InspectorBasicValue::create(bool value)
-{
-    return adoptRef(new InspectorBasicValue(value));
-}
-
-PassRefPtr<InspectorBasicValue> InspectorBasicValue::create(int value)
-{
-    return adoptRef(new InspectorBasicValue(value));
-}
-
-PassRefPtr<InspectorBasicValue> InspectorBasicValue::create(double value)
-{
-    return adoptRef(new InspectorBasicValue(value));
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/inspector/InspectorValues.h b/Source/WebCore/inspector/InspectorValues.h
deleted file mode 100644
index cbb7f71..0000000
--- a/Source/WebCore/inspector/InspectorValues.h
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef InspectorValues_h
-#define InspectorValues_h
-
-#include <wtf/Forward.h>
-#include <wtf/HashMap.h>
-#include <wtf/RefCounted.h>
-#include <wtf/Vector.h>
-#include <wtf/text/StringHash.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-class InspectorArray;
-class InspectorObject;
-
-class InspectorValue : public RefCounted<InspectorValue> {
-public:
-    static const int maxDepth = 1000;
-
-    InspectorValue() : m_type(TypeNull) { }
-    virtual ~InspectorValue() { }
-
-    static PassRefPtr<InspectorValue> null();
-
-    typedef enum {
-        TypeNull = 0,
-        TypeBoolean,
-        TypeNumber,
-        TypeString,
-        TypeObject,
-        TypeArray
-    } Type;
-
-    Type type() const { return m_type; }
-
-    bool isNull() const { return m_type == TypeNull; }
-
-    virtual bool asBoolean(bool* output) const;
-    virtual bool asNumber(double* output) const;
-    virtual bool asNumber(long* output) const;
-    virtual bool asNumber(int* output) const;
-    virtual bool asNumber(unsigned long* output) const;
-    virtual bool asNumber(unsigned int* output) const;
-    virtual bool asString(String* output) const;
-    virtual bool asValue(RefPtr<InspectorValue>* output);
-    virtual bool asObject(RefPtr<InspectorObject>* output);
-    virtual bool asArray(RefPtr<InspectorArray>* output);
-    virtual PassRefPtr<InspectorObject> asObject();
-    virtual PassRefPtr<InspectorArray> asArray();
-
-    static PassRefPtr<InspectorValue> parseJSON(const String& json);
-
-    String toJSONString() const;
-    virtual void writeJSON(StringBuilder* output) const;
-
-protected:
-    explicit InspectorValue(Type type) : m_type(type) { }
-
-private:
-    Type m_type;
-};
-
-class InspectorBasicValue : public InspectorValue {
-public:
-
-    static PassRefPtr<InspectorBasicValue> create(bool);
-    static PassRefPtr<InspectorBasicValue> create(int);
-    static PassRefPtr<InspectorBasicValue> create(double);
-
-    virtual bool asBoolean(bool* output) const OVERRIDE;
-    virtual bool asNumber(double* output) const OVERRIDE;
-    virtual bool asNumber(long* output) const OVERRIDE;
-    virtual bool asNumber(int* output) const OVERRIDE;
-    virtual bool asNumber(unsigned long* output) const OVERRIDE;
-    virtual bool asNumber(unsigned* output) const OVERRIDE;
-
-    virtual void writeJSON(StringBuilder* output) const OVERRIDE;
-
-private:
-    explicit InspectorBasicValue(bool value) : InspectorValue(TypeBoolean), m_boolValue(value) { }
-    explicit InspectorBasicValue(int value) : InspectorValue(TypeNumber), m_doubleValue((double)value) { }
-    explicit InspectorBasicValue(double value) : InspectorValue(TypeNumber), m_doubleValue(value) { }
-
-    union {
-        bool m_boolValue;
-        double m_doubleValue;
-    };
-};
-
-class InspectorString : public InspectorValue {
-public:
-    static PassRefPtr<InspectorString> create(const String&);
-    static PassRefPtr<InspectorString> create(const char*);
-
-    virtual bool asString(String* output) const OVERRIDE;
-
-    virtual void writeJSON(StringBuilder* output) const OVERRIDE;
-
-private:
-    explicit InspectorString(const String& value) : InspectorValue(TypeString), m_stringValue(value) { }
-    explicit InspectorString(const char* value) : InspectorValue(TypeString), m_stringValue(value) { }
-
-    String m_stringValue;
-};
-
-class InspectorObjectBase : public InspectorValue {
-private:
-    typedef HashMap<String, RefPtr<InspectorValue>> Dictionary;
-
-public:
-    typedef Dictionary::iterator iterator;
-    typedef Dictionary::const_iterator const_iterator;
-
-    virtual PassRefPtr<InspectorObject> asObject() OVERRIDE;
-    InspectorObject* openAccessors();
-
-protected:
-    virtual ~InspectorObjectBase();
-
-    virtual bool asObject(RefPtr<InspectorObject>* output) OVERRIDE;
-
-    void setBoolean(const String& name, bool);
-    void setNumber(const String& name, double);
-    void setString(const String& name, const String&);
-    void setValue(const String& name, PassRefPtr<InspectorValue>);
-    void setObject(const String& name, PassRefPtr<InspectorObject>);
-    void setArray(const String& name, PassRefPtr<InspectorArray>);
-
-    iterator find(const String& name);
-    const_iterator find(const String& name) const;
-    bool getBoolean(const String& name, bool* output) const;
-    template<class T> bool getNumber(const String& name, T* output) const
-    {
-        RefPtr<InspectorValue> value = get(name);
-        if (!value)
-            return false;
-        return value->asNumber(output);
-    }
-    bool getString(const String& name, String* output) const;
-    PassRefPtr<InspectorObject> getObject(const String& name) const;
-    PassRefPtr<InspectorArray> getArray(const String& name) const;
-    PassRefPtr<InspectorValue> get(const String& name) const;
-
-    void remove(const String& name);
-
-    virtual void writeJSON(StringBuilder* output) const OVERRIDE;
-
-    iterator begin() { return m_data.begin(); }
-    iterator end() { return m_data.end(); }
-    const_iterator begin() const { return m_data.begin(); }
-    const_iterator end() const { return m_data.end(); }
-
-    int size() const { return m_data.size(); }
-
-protected:
-    InspectorObjectBase();
-
-private:
-    Dictionary m_data;
-    Vector<String> m_order;
-};
-
-class InspectorObject : public InspectorObjectBase {
-public:
-    static PassRefPtr<InspectorObject> create();
-
-    using InspectorObjectBase::asObject;
-
-    using InspectorObjectBase::setBoolean;
-    using InspectorObjectBase::setNumber;
-    using InspectorObjectBase::setString;
-    using InspectorObjectBase::setValue;
-    using InspectorObjectBase::setObject;
-    using InspectorObjectBase::setArray;
-
-    using InspectorObjectBase::find;
-    using InspectorObjectBase::getBoolean;
-    using InspectorObjectBase::getNumber;
-    using InspectorObjectBase::getString;
-    using InspectorObjectBase::getObject;
-    using InspectorObjectBase::getArray;
-    using InspectorObjectBase::get;
-
-    using InspectorObjectBase::remove;
-
-    using InspectorObjectBase::begin;
-    using InspectorObjectBase::end;
-
-    using InspectorObjectBase::size;
-};
-
-
-class InspectorArrayBase : public InspectorValue {
-public:
-    typedef Vector<RefPtr<InspectorValue>>::iterator iterator;
-    typedef Vector<RefPtr<InspectorValue>>::const_iterator const_iterator;
-
-    virtual PassRefPtr<InspectorArray> asArray() OVERRIDE;
-
-    unsigned length() const { return m_data.size(); }
-
-protected:
-    virtual ~InspectorArrayBase();
-
-    virtual bool asArray(RefPtr<InspectorArray>* output) OVERRIDE;
-
-    void pushBoolean(bool);
-    void pushInt(int);
-    void pushNumber(double);
-    void pushString(const String&);
-    void pushValue(PassRefPtr<InspectorValue>);
-    void pushObject(PassRefPtr<InspectorObject>);
-    void pushArray(PassRefPtr<InspectorArray>);
-
-    PassRefPtr<InspectorValue> get(size_t index);
-
-    virtual void writeJSON(StringBuilder* output) const OVERRIDE;
-
-    iterator begin() { return m_data.begin(); }
-    iterator end() { return m_data.end(); }
-    const_iterator begin() const { return m_data.begin(); }
-    const_iterator end() const { return m_data.end(); }
-
-protected:
-    InspectorArrayBase();
-
-private:
-    Vector<RefPtr<InspectorValue>> m_data;
-};
-
-class InspectorArray : public InspectorArrayBase {
-public:
-    static PassRefPtr<InspectorArray> create();
-
-    using InspectorArrayBase::asArray;
-
-    using InspectorArrayBase::pushBoolean;
-    using InspectorArrayBase::pushInt;
-    using InspectorArrayBase::pushNumber;
-    using InspectorArrayBase::pushString;
-    using InspectorArrayBase::pushValue;
-    using InspectorArrayBase::pushObject;
-    using InspectorArrayBase::pushArray;
-
-    using InspectorArrayBase::get;
-
-    using InspectorArrayBase::begin;
-    using InspectorArrayBase::end;
-};
-
-
-inline InspectorObjectBase::iterator InspectorObjectBase::find(const String& name)
-{
-    return m_data.find(name);
-}
-
-inline InspectorObjectBase::const_iterator InspectorObjectBase::find(const String& name) const
-{
-    return m_data.find(name);
-}
-
-inline void InspectorObjectBase::setBoolean(const String& name, bool value)
-{
-    setValue(name, InspectorBasicValue::create(value));
-}
-
-inline void InspectorObjectBase::setNumber(const String& name, double value)
-{
-    setValue(name, InspectorBasicValue::create(value));
-}
-
-inline void InspectorObjectBase::setString(const String& name, const String& value)
-{
-    setValue(name, InspectorString::create(value));
-}
-
-inline void InspectorObjectBase::setValue(const String& name, PassRefPtr<InspectorValue> value)
-{
-    ASSERT(value);
-    if (m_data.set(name, value).isNewEntry)
-        m_order.append(name);
-}
-
-inline void InspectorObjectBase::setObject(const String& name, PassRefPtr<InspectorObject> value)
-{
-    ASSERT(value);
-    if (m_data.set(name, value).isNewEntry)
-        m_order.append(name);
-}
-
-inline void InspectorObjectBase::setArray(const String& name, PassRefPtr<InspectorArray> value)
-{
-    ASSERT(value);
-    if (m_data.set(name, value).isNewEntry)
-        m_order.append(name);
-}
-
-inline void InspectorArrayBase::pushBoolean(bool value)
-{
-    m_data.append(InspectorBasicValue::create(value));
-}
-
-inline void InspectorArrayBase::pushInt(int value)
-{
-    m_data.append(InspectorBasicValue::create(value));
-}
-
-inline void InspectorArrayBase::pushNumber(double value)
-{
-    m_data.append(InspectorBasicValue::create(value));
-}
-
-inline void InspectorArrayBase::pushString(const String& value)
-{
-    m_data.append(InspectorString::create(value));
-}
-
-inline void InspectorArrayBase::pushValue(PassRefPtr<InspectorValue> value)
-{
-    ASSERT(value);
-    m_data.append(value);
-}
-
-inline void InspectorArrayBase::pushObject(PassRefPtr<InspectorObject> value)
-{
-    ASSERT(value);
-    m_data.append(value);
-}
-
-inline void InspectorArrayBase::pushArray(PassRefPtr<InspectorArray> value)
-{
-    ASSERT(value);
-    m_data.append(value);
-}
-
-} // namespace WebCore
-
-#endif // !defined(InspectorValues_h)
diff --git a/Source/WebCore/inspector/InspectorAgentRegistry.h b/Source/WebCore/inspector/InspectorWebAgentBase.h
similarity index 68%
rename from Source/WebCore/inspector/InspectorAgentRegistry.h
rename to Source/WebCore/inspector/InspectorWebAgentBase.h
index 4fd0353..dfcc4a8 100644
--- a/Source/WebCore/inspector/InspectorAgentRegistry.h
+++ b/Source/WebCore/inspector/InspectorWebAgentBase.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All Rights Reserved.
  * Copyright (C) 2011 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -24,29 +24,28 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef InspectorAgentRegistry_h
-#define InspectorAgentRegistry_h
+#ifndef InspectorWebAgentBase_h
+#define InspectorWebAgentBase_h
 
-#include "InspectorBaseAgent.h"
-#include <wtf/PassOwnPtr.h>
-#include <wtf/Vector.h>
+#include "InspectorForwarding.h"
+#include <inspector/InspectorAgentBase.h>
+#include <wtf/text/WTFString.h>
 
 namespace WebCore {
 
-class InspectorBackendDispatcher;
+class InstrumentingAgents;
 
-class InspectorAgentRegistry {
-public:
-    void append(PassOwnPtr<InspectorBaseAgent>);
+class InspectorAgentBase : public Inspector::InspectorAgentBase {
+protected:
+    InspectorAgentBase(const String& name, InstrumentingAgents* instrumentingAgents)
+        : Inspector::InspectorAgentBase(name)
+        , m_instrumentingAgents(instrumentingAgents)
+    {
+    }
 
-    void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*);
-    void willDestroyFrontendAndBackend();
-    void discardAgents();
-
-private:
-    Vector<OwnPtr<InspectorBaseAgent>> m_agents;
+    InstrumentingAgents* m_instrumentingAgents;
 };
-
+    
 } // namespace WebCore
 
-#endif // !defined(InspectorAgentRegistry_h)
+#endif // !defined(InspectorWebAgentBase_h)
diff --git a/Source/WebCore/inspector/InspectorWorkerAgent.cpp b/Source/WebCore/inspector/InspectorWorkerAgent.cpp
index 32801c6..88456c5 100644
--- a/Source/WebCore/inspector/InspectorWorkerAgent.cpp
+++ b/Source/WebCore/inspector/InspectorWorkerAgent.cpp
@@ -36,13 +36,15 @@
 
 #include "InspectorForwarding.h"
 #include "InspectorFrontend.h"
-#include "InspectorValues.h"
 #include "InstrumentingAgents.h"
 #include "URL.h"
 #include "WorkerGlobalScopeProxy.h"
+#include <inspector/InspectorValues.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/RefPtr.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 class InspectorWorkerAgent::WorkerFrontendChannel : public WorkerGlobalScopeProxy::PageInspector {
@@ -107,7 +109,7 @@
 }
 
 InspectorWorkerAgent::InspectorWorkerAgent(InstrumentingAgents* instrumentingAgents)
-    : InspectorBaseAgent(ASCIILiteral("Worker"), instrumentingAgents)
+    : InspectorAgentBase(ASCIILiteral("Worker"), instrumentingAgents)
     , m_enabled(false)
     , m_shouldPauseDedicatedWorkerOnStart(false)
 {
@@ -119,7 +121,7 @@
     m_instrumentingAgents->setInspectorWorkerAgent(0);
 }
 
-void InspectorWorkerAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void InspectorWorkerAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorWorkerFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorWorkerBackendDispatcher::create(backendDispatcher, this);
diff --git a/Source/WebCore/inspector/InspectorWorkerAgent.h b/Source/WebCore/inspector/InspectorWorkerAgent.h
index ab6221a..ea475ed 100644
--- a/Source/WebCore/inspector/InspectorWorkerAgent.h
+++ b/Source/WebCore/inspector/InspectorWorkerAgent.h
@@ -31,12 +31,16 @@
 #ifndef InspectorWorkerAgent_h
 #define InspectorWorkerAgent_h
 
-#include "InspectorBaseAgent.h"
+#include "InspectorBackendDispatchers.h"
+#include "InspectorWebAgentBase.h"
 #include <wtf/Forward.h>
 #include <wtf/HashMap.h>
 
-namespace WebCore {
+namespace Inspector {
 class InspectorObject;
+}
+
+namespace WebCore {
 class InspectorWorkerFrontendDispatcher;
 class InstrumentingAgents;
 class URL;
@@ -44,12 +48,12 @@
 
 typedef String ErrorString;
 
-class InspectorWorkerAgent : public InspectorBaseAgent, public InspectorWorkerBackendDispatcherHandler {
+class InspectorWorkerAgent : public InspectorAgentBase, public InspectorWorkerBackendDispatcherHandler {
 public:
     static PassOwnPtr<InspectorWorkerAgent> create(InstrumentingAgents*);
     ~InspectorWorkerAgent();
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     // Called from InspectorInstrumentation
@@ -63,7 +67,7 @@
     virtual void canInspectWorkers(ErrorString*, bool*);
     virtual void connectToWorker(ErrorString*, int workerId);
     virtual void disconnectFromWorker(ErrorString*, int workerId);
-    virtual void sendMessageToWorker(ErrorString*, int workerId, const RefPtr<InspectorObject>& message);
+    virtual void sendMessageToWorker(ErrorString*, int workerId, const RefPtr<Inspector::InspectorObject>& message);
     virtual void setAutoconnectToWorkers(ErrorString*, bool value);
 
 private:
diff --git a/Source/WebCore/inspector/InstrumentingAgents.cpp b/Source/WebCore/inspector/InstrumentingAgents.cpp
index 8cfb328..628f128 100644
--- a/Source/WebCore/inspector/InstrumentingAgents.cpp
+++ b/Source/WebCore/inspector/InstrumentingAgents.cpp
@@ -40,6 +40,8 @@
 #include "WorkerInspectorController.h"
 #include <wtf/MainThread.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 InstrumentingAgents::InstrumentingAgents()
diff --git a/Source/WebCore/inspector/NetworkResourcesData.cpp b/Source/WebCore/inspector/NetworkResourcesData.cpp
index 969d30d..5cca447 100644
--- a/Source/WebCore/inspector/NetworkResourcesData.cpp
+++ b/Source/WebCore/inspector/NetworkResourcesData.cpp
@@ -46,6 +46,8 @@
 static size_t maximumSingleResourceContentSize = 10 * 1000 * 1000;
 }
 
+using namespace Inspector;
+
 namespace WebCore {
 
 
diff --git a/Source/WebCore/inspector/PageConsoleAgent.cpp b/Source/WebCore/inspector/PageConsoleAgent.cpp
index bcd89f2..ceabbd2 100644
--- a/Source/WebCore/inspector/PageConsoleAgent.cpp
+++ b/Source/WebCore/inspector/PageConsoleAgent.cpp
@@ -40,7 +40,8 @@
 #include "InspectorAgent.h"
 #include "InspectorDOMAgent.h"
 #include "Node.h"
-#include "ScriptObject.h"
+
+using namespace Inspector;
 
 namespace WebCore {
 
@@ -66,7 +67,7 @@
 class InspectableNode : public InjectedScriptHost::InspectableObject {
 public:
     explicit InspectableNode(Node* node) : m_node(node) { }
-    virtual ScriptValue get(JSC::ExecState* state)
+    virtual Deprecated::ScriptValue get(JSC::ExecState* state)
     {
         return InjectedScriptHost::nodeAsScriptValue(state, m_node);
     }
diff --git a/Source/WebCore/inspector/PageDebuggerAgent.cpp b/Source/WebCore/inspector/PageDebuggerAgent.cpp
index 87fabee..04d479d 100644
--- a/Source/WebCore/inspector/PageDebuggerAgent.cpp
+++ b/Source/WebCore/inspector/PageDebuggerAgent.cpp
@@ -41,6 +41,8 @@
 #include "PageConsole.h"
 #include "PageScriptDebugServer.h"
 
+using namespace Inspector;
+
 namespace WebCore {
 
 PassOwnPtr<PageDebuggerAgent> PageDebuggerAgent::create(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay)
diff --git a/Source/WebCore/inspector/PageDebuggerAgent.h b/Source/WebCore/inspector/PageDebuggerAgent.h
index 5586311..a5f8187 100644
--- a/Source/WebCore/inspector/PageDebuggerAgent.h
+++ b/Source/WebCore/inspector/PageDebuggerAgent.h
@@ -32,6 +32,7 @@
 #define PageDebuggerAgent_h
 
 #if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR)
+
 #include "InspectorDebuggerAgent.h"
 #include "PageScriptDebugServer.h"
 
diff --git a/Source/WebCore/inspector/PageRuntimeAgent.cpp b/Source/WebCore/inspector/PageRuntimeAgent.cpp
index 57b3b30..a1b6778 100644
--- a/Source/WebCore/inspector/PageRuntimeAgent.cpp
+++ b/Source/WebCore/inspector/PageRuntimeAgent.cpp
@@ -45,7 +45,9 @@
 #include "ScriptController.h"
 #include "SecurityOrigin.h"
 
-using WebCore::TypeBuilder::Runtime::ExecutionContextDescription;
+using Inspector::TypeBuilder::Runtime::ExecutionContextDescription;
+
+using namespace Inspector;
 
 namespace WebCore {
 
@@ -63,7 +65,7 @@
     m_instrumentingAgents->setPageRuntimeAgent(0);
 }
 
-void PageRuntimeAgent::didCreateFrontendAndBackend(InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
+void PageRuntimeAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel* frontendChannel, InspectorBackendDispatcher* backendDispatcher)
 {
     m_frontendDispatcher = std::make_unique<InspectorRuntimeFrontendDispatcher>(frontendChannel);
     m_backendDispatcher = InspectorRuntimeBackendDispatcher::create(backendDispatcher, this);
diff --git a/Source/WebCore/inspector/PageRuntimeAgent.h b/Source/WebCore/inspector/PageRuntimeAgent.h
index e8b33b2..cd04d94 100644
--- a/Source/WebCore/inspector/PageRuntimeAgent.h
+++ b/Source/WebCore/inspector/PageRuntimeAgent.h
@@ -51,7 +51,7 @@
         return adoptPtr(new PageRuntimeAgent(instrumentingAgents, injectedScriptManager, page, pageAgent));
     }
     virtual ~PageRuntimeAgent();
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
     virtual void enable(ErrorString*);
     virtual void disable(ErrorString*);
diff --git a/Source/WebCore/inspector/ScriptArguments.cpp b/Source/WebCore/inspector/ScriptArguments.cpp
index 89b9a0b..3657a98 100644
--- a/Source/WebCore/inspector/ScriptArguments.cpp
+++ b/Source/WebCore/inspector/ScriptArguments.cpp
@@ -31,16 +31,16 @@
 #include "config.h"
 #include "ScriptArguments.h"
 
-#include "ScriptValue.h"
+#include <bindings/ScriptValue.h>
 
 namespace WebCore {
 
-PassRefPtr<ScriptArguments> ScriptArguments::create(JSC::ExecState* scriptState, Vector<ScriptValue>& arguments)
+PassRefPtr<ScriptArguments> ScriptArguments::create(JSC::ExecState* scriptState, Vector<Deprecated::ScriptValue>& arguments)
 {
     return adoptRef(new ScriptArguments(scriptState, arguments));
 }
 
-ScriptArguments::ScriptArguments(JSC::ExecState* scriptState, Vector<ScriptValue>& arguments)
+ScriptArguments::ScriptArguments(JSC::ExecState* scriptState, Vector<Deprecated::ScriptValue>& arguments)
     : m_globalObject(scriptState->vm(), scriptState->lexicalGlobalObject())
 {
     m_arguments.swap(arguments);
@@ -50,7 +50,7 @@
 {
 }
 
-const ScriptValue &ScriptArguments::argumentAt(size_t index) const
+const Deprecated::ScriptValue &ScriptArguments::argumentAt(size_t index) const
 {
     ASSERT(m_arguments.size() > index);
     return m_arguments[index];
@@ -68,7 +68,7 @@
     if (!argumentCount())
         return false;
 
-    const ScriptValue& value = argumentAt(0);
+    const Deprecated::ScriptValue& value = argumentAt(0);
     if (checkForNullOrUndefined && (value.isNull() || value.isUndefined()))
         return false;
 
diff --git a/Source/WebCore/inspector/ScriptArguments.h b/Source/WebCore/inspector/ScriptArguments.h
index 17439a0..47a9623 100644
--- a/Source/WebCore/inspector/ScriptArguments.h
+++ b/Source/WebCore/inspector/ScriptArguments.h
@@ -1,10 +1,10 @@
 /*
  * Copyright (c) 2010 Google Inc. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  *     * Redistributions of source code must retain the above copyright
  * notice, this list of conditions and the following disclaimer.
  *     * Redistributions in binary form must reproduce the above
@@ -14,7 +14,7 @@
  *     * Neither the name of Google Inc. nor the names of its
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -37,6 +37,10 @@
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
+namespace Deprecated {
+class ScriptValue;
+}
+
 namespace JSC {
 class ExecState;
 class JSGlobalObject;
@@ -44,15 +48,13 @@
 
 namespace WebCore {
 
-class ScriptValue;
-
 class ScriptArguments : public RefCounted<ScriptArguments> {
 public:
-    static PassRefPtr<ScriptArguments> create(JSC::ExecState*, Vector<ScriptValue>& arguments);
+    static PassRefPtr<ScriptArguments> create(JSC::ExecState*, Vector<Deprecated::ScriptValue>& arguments);
 
     ~ScriptArguments();
 
-    const ScriptValue& argumentAt(size_t) const;
+    const Deprecated::ScriptValue& argumentAt(size_t) const;
     size_t argumentCount() const { return m_arguments.size(); }
 
     JSC::ExecState* globalState() const;
@@ -61,10 +63,10 @@
     bool isEqual(ScriptArguments*) const;
 
 private:
-    ScriptArguments(JSC::ExecState*, Vector<ScriptValue>& arguments);
+    ScriptArguments(JSC::ExecState*, Vector<Deprecated::ScriptValue>& arguments);
 
     JSC::Strong<JSC::JSGlobalObject> m_globalObject;
-    Vector<ScriptValue> m_arguments;
+    Vector<Deprecated::ScriptValue> m_arguments;
 };
 
 } // namespace WebCore
diff --git a/Source/WebCore/inspector/ScriptCallFrame.cpp b/Source/WebCore/inspector/ScriptCallFrame.cpp
index 1abbd75..abe9e12 100644
--- a/Source/WebCore/inspector/ScriptCallFrame.cpp
+++ b/Source/WebCore/inspector/ScriptCallFrame.cpp
@@ -32,9 +32,11 @@
 #include "ScriptCallFrame.h"
 
 #include "InspectorFrontend.h"
-#include "InspectorValues.h"
+#include <inspector/InspectorValues.h>
 #include <wtf/RefPtr.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 ScriptCallFrame::ScriptCallFrame(const String& functionName, const String& scriptName, unsigned lineNumber, unsigned column)
@@ -58,9 +60,9 @@
 }
 
 #if ENABLE(INSPECTOR)
-PassRefPtr<TypeBuilder::Console::CallFrame> ScriptCallFrame::buildInspectorObject() const
+PassRefPtr<Inspector::TypeBuilder::Console::CallFrame> ScriptCallFrame::buildInspectorObject() const
 {
-    return TypeBuilder::Console::CallFrame::create()
+    return Inspector::TypeBuilder::Console::CallFrame::create()
         .setFunctionName(m_functionName)
         .setUrl(m_scriptName)
         .setLineNumber(m_lineNumber)
diff --git a/Source/WebCore/inspector/ScriptCallFrame.h b/Source/WebCore/inspector/ScriptCallFrame.h
index 67f0d36..d6dcfa3 100644
--- a/Source/WebCore/inspector/ScriptCallFrame.h
+++ b/Source/WebCore/inspector/ScriptCallFrame.h
@@ -32,15 +32,17 @@
 #define ScriptCallFrame_h
 
 #if ENABLE(INSPECTOR)
-#include "InspectorTypeBuilder.h"
+#include "InspectorWebTypeBuilders.h"
 #endif
 
 #include <wtf/Forward.h>
 #include <wtf/text/WTFString.h>
 
-namespace WebCore {
-
+namespace Inspector {
 class InspectorObject;
+}
+
+namespace WebCore {
 
 class ScriptCallFrame  {
 public:
@@ -55,7 +57,7 @@
     bool isEqual(const ScriptCallFrame&) const;
 
 #if ENABLE(INSPECTOR)
-    PassRefPtr<TypeBuilder::Console::CallFrame> buildInspectorObject() const;
+    PassRefPtr<Inspector::TypeBuilder::Console::CallFrame> buildInspectorObject() const;
 #endif
 
 private:
diff --git a/Source/WebCore/inspector/ScriptCallStack.cpp b/Source/WebCore/inspector/ScriptCallStack.cpp
index e694bf1..c4af1b4 100644
--- a/Source/WebCore/inspector/ScriptCallStack.cpp
+++ b/Source/WebCore/inspector/ScriptCallStack.cpp
@@ -31,8 +31,10 @@
 #include "config.h"
 #include "ScriptCallStack.h"
 
-#include "InspectorTypeBuilder.h"
-#include "InspectorValues.h"
+#include "InspectorWebTypeBuilders.h"
+#include <inspector/InspectorValues.h>
+
+using namespace Inspector;
 
 namespace WebCore {
 
@@ -79,9 +81,9 @@
 }
 
 #if ENABLE(INSPECTOR)
-PassRefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame>> ScriptCallStack::buildInspectorArray() const
+PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Console::CallFrame>> ScriptCallStack::buildInspectorArray() const
 {
-    RefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame>> frames = TypeBuilder::Array<TypeBuilder::Console::CallFrame>::create();
+    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Console::CallFrame>> frames = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Console::CallFrame>::create();
     for (size_t i = 0; i < m_frames.size(); i++)
         frames->addItem(m_frames.at(i).buildInspectorObject());
     return frames;
diff --git a/Source/WebCore/inspector/ScriptCallStack.h b/Source/WebCore/inspector/ScriptCallStack.h
index e0d7fd5..1975da5c 100644
--- a/Source/WebCore/inspector/ScriptCallStack.h
+++ b/Source/WebCore/inspector/ScriptCallStack.h
@@ -32,7 +32,7 @@
 #define ScriptCallStack_h
 
 #if ENABLE(INSPECTOR)
-#include "InspectorTypeBuilder.h"
+#include "InspectorWebTypeBuilders.h"
 #endif
 
 #include "ScriptCallFrame.h"
@@ -42,8 +42,6 @@
 
 namespace WebCore {
 
-class InspectorArray;
-
 class ScriptCallStack : public RefCounted<ScriptCallStack> {
 public:
     static const size_t maxCallStackSizeToCapture = 200;
@@ -58,7 +56,7 @@
     bool isEqual(ScriptCallStack*) const;
 
 #if ENABLE(INSPECTOR)
-    PassRefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame>> buildInspectorArray() const;
+    PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Console::CallFrame>> buildInspectorArray() const;
 #endif
 
 private:
diff --git a/Source/WebCore/inspector/ScriptDebugListener.h b/Source/WebCore/inspector/ScriptDebugListener.h
index 5bca751..0eb4fb3 100644
--- a/Source/WebCore/inspector/ScriptDebugListener.h
+++ b/Source/WebCore/inspector/ScriptDebugListener.h
@@ -37,8 +37,11 @@
 #include <wtf/Forward.h>
 #include <wtf/text/WTFString.h>
 
-namespace WebCore {
+namespace Deprecated {
 class ScriptValue;
+}
+
+namespace WebCore {
 
 class ScriptDebugListener {
 public:
@@ -68,7 +71,7 @@
 
     virtual void didParseSource(SourceID, const Script&) = 0;
     virtual void failedToParseSource(const String& url, const String& data, int firstLine, int errorLine, const String& errorMessage) = 0;
-    virtual void didPause(JSC::ExecState*, const ScriptValue& callFrames, const ScriptValue& exception) = 0;
+    virtual void didPause(JSC::ExecState*, const Deprecated::ScriptValue& callFrames, const Deprecated::ScriptValue& exception) = 0;
     virtual void didContinue() = 0;
 };
 
diff --git a/Source/WebCore/inspector/TimelineRecordFactory.cpp b/Source/WebCore/inspector/TimelineRecordFactory.cpp
index 8baab9e..9f2f7fc 100644
--- a/Source/WebCore/inspector/TimelineRecordFactory.cpp
+++ b/Source/WebCore/inspector/TimelineRecordFactory.cpp
@@ -36,15 +36,17 @@
 
 #include "Event.h"
 #include "FloatQuad.h"
-#include "InspectorValues.h"
 #include "IntRect.h"
 #include "LayoutRect.h"
 #include "ResourceRequest.h"
 #include "ResourceResponse.h"
 #include "ScriptCallStack.h"
 #include "ScriptCallStackFactory.h"
+#include <inspector/InspectorValues.h>
 #include <wtf/CurrentTime.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 PassRefPtr<InspectorObject> TimelineRecordFactory::createGenericRecord(double startTime, int maxCallStackDepth)
diff --git a/Source/WebCore/inspector/TimelineRecordFactory.h b/Source/WebCore/inspector/TimelineRecordFactory.h
index db44b1e..e4bf90a 100644
--- a/Source/WebCore/inspector/TimelineRecordFactory.h
+++ b/Source/WebCore/inspector/TimelineRecordFactory.h
@@ -31,9 +31,8 @@
 #ifndef TimelineRecordFactory_h
 #define TimelineRecordFactory_h
 
-#include "InspectorValues.h"
 #include "URL.h"
-#include "LayoutRect.h"
+#include <inspector/InspectorValues.h>
 #include <wtf/Forward.h>
 #include <wtf/text/WTFString.h>
 
@@ -41,64 +40,62 @@
 
     class Event;
     class FloatQuad;
-    class InspectorObject;
-    class IntRect;
     class ResourceRequest;
     class ResourceResponse;
 
     class TimelineRecordFactory {
     public:
-        static PassRefPtr<InspectorObject> createGenericRecord(double startTime, int maxCallStackDepth);
-        static PassRefPtr<InspectorObject> createBackgroundRecord(double startTime, const String& thread);
+        static PassRefPtr<Inspector::InspectorObject> createGenericRecord(double startTime, int maxCallStackDepth);
+        static PassRefPtr<Inspector::InspectorObject> createBackgroundRecord(double startTime, const String& thread);
 
-        static PassRefPtr<InspectorObject> createGCEventData(const size_t usedHeapSizeDelta);
+        static PassRefPtr<Inspector::InspectorObject> createGCEventData(const size_t usedHeapSizeDelta);
 
-        static PassRefPtr<InspectorObject> createFunctionCallData(const String& scriptName, int scriptLine);
+        static PassRefPtr<Inspector::InspectorObject> createFunctionCallData(const String& scriptName, int scriptLine);
 
-        static PassRefPtr<InspectorObject> createEventDispatchData(const Event&);
+        static PassRefPtr<Inspector::InspectorObject> createEventDispatchData(const Event&);
 
-        static PassRefPtr<InspectorObject> createGenericTimerData(int timerId);
+        static PassRefPtr<Inspector::InspectorObject> createGenericTimerData(int timerId);
 
-        static PassRefPtr<InspectorObject> createTimerInstallData(int timerId, int timeout, bool singleShot);
+        static PassRefPtr<Inspector::InspectorObject> createTimerInstallData(int timerId, int timeout, bool singleShot);
 
-        static PassRefPtr<InspectorObject> createXHRReadyStateChangeData(const String& url, int readyState);
+        static PassRefPtr<Inspector::InspectorObject> createXHRReadyStateChangeData(const String& url, int readyState);
 
-        static PassRefPtr<InspectorObject> createXHRLoadData(const String& url);
+        static PassRefPtr<Inspector::InspectorObject> createXHRLoadData(const String& url);
 
-        static PassRefPtr<InspectorObject> createEvaluateScriptData(const String&, double lineNumber);
+        static PassRefPtr<Inspector::InspectorObject> createEvaluateScriptData(const String&, double lineNumber);
 
-        static PassRefPtr<InspectorObject> createTimeStampData(const String&);
+        static PassRefPtr<Inspector::InspectorObject> createTimeStampData(const String&);
 
-        static PassRefPtr<InspectorObject> createResourceSendRequestData(const String& requestId, const ResourceRequest&);
+        static PassRefPtr<Inspector::InspectorObject> createResourceSendRequestData(const String& requestId, const ResourceRequest&);
 
-        static PassRefPtr<InspectorObject> createScheduleResourceRequestData(const String&);
+        static PassRefPtr<Inspector::InspectorObject> createScheduleResourceRequestData(const String&);
 
-        static PassRefPtr<InspectorObject> createResourceReceiveResponseData(const String& requestId, const ResourceResponse&);
+        static PassRefPtr<Inspector::InspectorObject> createResourceReceiveResponseData(const String& requestId, const ResourceResponse&);
 
-        static PassRefPtr<InspectorObject> createReceiveResourceData(const String& requestId, int length);
+        static PassRefPtr<Inspector::InspectorObject> createReceiveResourceData(const String& requestId, int length);
 
-        static PassRefPtr<InspectorObject> createResourceFinishData(const String& requestId, bool didFail, double finishTime);
+        static PassRefPtr<Inspector::InspectorObject> createResourceFinishData(const String& requestId, bool didFail, double finishTime);
 
-        static PassRefPtr<InspectorObject> createLayoutData(unsigned dirtyObjects, unsigned totalObjects, bool partialLayout);
+        static PassRefPtr<Inspector::InspectorObject> createLayoutData(unsigned dirtyObjects, unsigned totalObjects, bool partialLayout);
 
-        static PassRefPtr<InspectorObject> createDecodeImageData(const String& imageType);
+        static PassRefPtr<Inspector::InspectorObject> createDecodeImageData(const String& imageType);
 
-        static PassRefPtr<InspectorObject> createResizeImageData(bool shouldCache);
+        static PassRefPtr<Inspector::InspectorObject> createResizeImageData(bool shouldCache);
 
-        static PassRefPtr<InspectorObject> createMarkData(bool isMainFrame);
+        static PassRefPtr<Inspector::InspectorObject> createMarkData(bool isMainFrame);
 
-        static PassRefPtr<InspectorObject> createParseHTMLData(unsigned startLine);
+        static PassRefPtr<Inspector::InspectorObject> createParseHTMLData(unsigned startLine);
 
-        static PassRefPtr<InspectorObject> createAnimationFrameData(int callbackId);
+        static PassRefPtr<Inspector::InspectorObject> createAnimationFrameData(int callbackId);
 
-        static PassRefPtr<InspectorObject> createPaintData(const FloatQuad&);
+        static PassRefPtr<Inspector::InspectorObject> createPaintData(const FloatQuad&);
 
-        static void appendLayoutRoot(InspectorObject* data, const FloatQuad&);
+        static void appendLayoutRoot(Inspector::InspectorObject* data, const FloatQuad&);
 
 #if ENABLE(WEB_SOCKETS)
-        static inline PassRefPtr<InspectorObject> createWebSocketCreateData(unsigned long identifier, const URL& url, const String& protocol)
+        static inline PassRefPtr<Inspector::InspectorObject> createWebSocketCreateData(unsigned long identifier, const URL& url, const String& protocol)
         {
-            RefPtr<InspectorObject> data = InspectorObject::create();
+            RefPtr<Inspector::InspectorObject> data = Inspector::InspectorObject::create();
             data->setNumber("identifier", identifier);
             data->setString("url", url.string());
             if (!protocol.isNull())
@@ -106,9 +103,9 @@
             return data.release();
         }
 
-        static inline PassRefPtr<InspectorObject> createGenericWebSocketData(unsigned long identifier)
+        static inline PassRefPtr<Inspector::InspectorObject> createGenericWebSocketData(unsigned long identifier)
         {
-            RefPtr<InspectorObject> data = InspectorObject::create();
+            RefPtr<Inspector::InspectorObject> data = Inspector::InspectorObject::create();
             data->setNumber("identifier", identifier);
             return data.release();
         }
diff --git a/Source/WebCore/inspector/WorkerConsoleAgent.cpp b/Source/WebCore/inspector/WorkerConsoleAgent.cpp
index 15bb7a8..666a8df 100644
--- a/Source/WebCore/inspector/WorkerConsoleAgent.cpp
+++ b/Source/WebCore/inspector/WorkerConsoleAgent.cpp
@@ -34,6 +34,8 @@
 
 #include "WorkerConsoleAgent.h"
 
+using namespace Inspector;
+
 namespace WebCore {
 
 WorkerConsoleAgent::WorkerConsoleAgent(InstrumentingAgents* instrumentingAgents, InjectedScriptManager* injectedScriptManager)
diff --git a/Source/WebCore/inspector/WorkerDebuggerAgent.cpp b/Source/WebCore/inspector/WorkerDebuggerAgent.cpp
index 7136e46..97d00e0 100644
--- a/Source/WebCore/inspector/WorkerDebuggerAgent.cpp
+++ b/Source/WebCore/inspector/WorkerDebuggerAgent.cpp
@@ -38,6 +38,8 @@
 #include "WorkerThread.h"
 #include <wtf/MessageQueue.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 namespace {
diff --git a/Source/WebCore/inspector/WorkerInspectorController.cpp b/Source/WebCore/inspector/WorkerInspectorController.cpp
index ef23037..7f5e70f 100644
--- a/Source/WebCore/inspector/WorkerInspectorController.cpp
+++ b/Source/WebCore/inspector/WorkerInspectorController.cpp
@@ -51,8 +51,11 @@
 #include "WorkerReportingProxy.h"
 #include "WorkerRuntimeAgent.h"
 #include "WorkerThread.h"
+#include <inspector/InspectorBackendDispatcher.h>
 #include <wtf/PassOwnPtr.h>
 
+using namespace Inspector;
+
 namespace WebCore {
 
 namespace {
diff --git a/Source/WebCore/inspector/WorkerInspectorController.h b/Source/WebCore/inspector/WorkerInspectorController.h
index 58bda20..aa0d90d 100644
--- a/Source/WebCore/inspector/WorkerInspectorController.h
+++ b/Source/WebCore/inspector/WorkerInspectorController.h
@@ -33,19 +33,21 @@
 
 #if ENABLE(INSPECTOR)
 
-#include "InspectorAgentRegistry.h"
-#include "InspectorBaseAgent.h"
+#include "InspectorWebAgentBase.h"
+#include <inspector/InspectorAgentRegistry.h>
 #include <wtf/FastMalloc.h>
 #include <wtf/Forward.h>
 #include <wtf/Noncopyable.h>
 #include <wtf/OwnPtr.h>
 #include <wtf/RefPtr.h>
 
+namespace Inspector {
+class InspectorBackendDispatcher;
+}
+
 namespace WebCore {
 
 class InjectedScriptManager;
-class InspectorBackendDispatcher;
-class InspectorFrontendChannel;
 class InspectorInstrumentation;
 class InspectorRuntimeAgent;
 class InstrumentingAgents;
@@ -72,9 +74,9 @@
     RefPtr<InstrumentingAgents> m_instrumentingAgents;
     OwnPtr<InjectedScriptManager> m_injectedScriptManager;
     InspectorRuntimeAgent* m_runtimeAgent;
-    InspectorAgentRegistry m_agents;
+    Inspector::InspectorAgentRegistry m_agents;
     OwnPtr<InspectorFrontendChannel> m_frontendChannel;
-    RefPtr<InspectorBackendDispatcher> m_backendDispatcher;
+    RefPtr<Inspector::InspectorBackendDispatcher> m_backendDispatcher;
 };
 
 }
diff --git a/Source/WebCore/inspector/WorkerRuntimeAgent.cpp b/Source/WebCore/inspector/WorkerRuntimeAgent.cpp
index b07b633..1ef8373 100644
--- a/Source/WebCore/inspector/WorkerRuntimeAgent.cpp
+++ b/Source/WebCore/inspector/WorkerRuntimeAgent.cpp
@@ -42,6 +42,8 @@
 #include "WorkerRunLoop.h"
 #include "WorkerThread.h"
 
+using namespace Inspector;
+
 namespace WebCore {
 
 WorkerRuntimeAgent::WorkerRuntimeAgent(InstrumentingAgents* instrumentingAgents, InjectedScriptManager* injectedScriptManager, WorkerGlobalScope* workerGlobalScope)
@@ -57,7 +59,7 @@
     m_instrumentingAgents->setWorkerRuntimeAgent(0);
 }
 
-void WorkerRuntimeAgent::didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher* backendDispatcher)
+void WorkerRuntimeAgent::didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, InspectorBackendDispatcher* backendDispatcher)
 {
     m_backendDispatcher = InspectorRuntimeBackendDispatcher::create(backendDispatcher, this);
 }
diff --git a/Source/WebCore/inspector/WorkerRuntimeAgent.h b/Source/WebCore/inspector/WorkerRuntimeAgent.h
index 67de08a..5b629c1 100644
--- a/Source/WebCore/inspector/WorkerRuntimeAgent.h
+++ b/Source/WebCore/inspector/WorkerRuntimeAgent.h
@@ -48,7 +48,7 @@
     }
     virtual ~WorkerRuntimeAgent();
 
-    virtual void didCreateFrontendAndBackend(InspectorFrontendChannel*, InspectorBackendDispatcher*) OVERRIDE;
+    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
     virtual void willDestroyFrontendAndBackend() OVERRIDE;
 
     // Protocol commands.