Reviewed by Yury Semikhatsky.
Web Inspector: move InspectorController's methods from InspectorAgent to InspectorController.
https://bugs.webkit.org/show_bug.cgi?id=53169
All the Inspector API for WebCore has two parts.
The first one is InspectorInstrumentation for WebCore.
The second is InspectorController for WebKit.
InspectorAgent was produced by renaming original InspectorController.
This patch extracts WebKit related methods from InspectorAgent to InspectorController.
* WebCore.exp.in:
* bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::createParser):
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
(WebCore::InspectorAgent::~InspectorAgent):
(WebCore::InspectorAgent::restoreInspectorStateFromCookie):
(WebCore::InspectorAgent::inspect):
(WebCore::InspectorAgent::handleMousePress):
(WebCore::InspectorAgent::didClearWindowObjectInWorld):
(WebCore::InspectorAgent::setFrontend):
(WebCore::InspectorAgent::disconnectFrontend):
(WebCore::InspectorAgent::resourceAgent):
(WebCore::InspectorAgent::createFrontendLifetimeAgents):
(WebCore::InspectorAgent::releaseFrontendLifetimeAgents):
(WebCore::InspectorAgent::populateScriptObjects):
(WebCore::InspectorAgent::pushDataCollectedOffline):
(WebCore::InspectorAgent::restoreProfiler):
(WebCore::InspectorAgent::startTimelineProfiler):
(WebCore::PostWorkerNotificationToFrontendTask::performTask):
(WebCore::InspectorAgent::didOpenDatabase):
(WebCore::InspectorAgent::didUseDOMStorage):
(WebCore::InspectorAgent::showAndEnableDebugger):
(WebCore::InspectorAgent::enableDebugger):
(WebCore::InspectorAgent::enabled):
* inspector/InspectorAgent.h:
(WebCore::InspectorAgent::frontend):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::~InspectorController):
(WebCore::InspectorController::setInspectorFrontendClient):
(WebCore::InspectorController::hasInspectorFrontendClient):
(WebCore::InspectorController::didClearWindowObjectInWorld):
(WebCore::InspectorController::startTimelineProfiler):
(WebCore::InspectorController::stopTimelineProfiler):
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):
(WebCore::InspectorController::disconnectFrontendImpl):
(WebCore::InspectorController::show):
(WebCore::InspectorController::close):
(WebCore::InspectorController::restoreInspectorStateFromCookie):
(WebCore::InspectorController::evaluateForTestInFrontend):
(WebCore::InspectorController::drawNodeHighlight):
(WebCore::InspectorController::inspect):
(WebCore::InspectorController::enabled):
(WebCore::InspectorController::showPanel):
(WebCore::InspectorController::frontendLoaded):
(WebCore::InspectorController::timelineProfilerEnabled):
(WebCore::InspectorController::enableProfiler):
(WebCore::InspectorController::disableProfiler):
(WebCore::InspectorController::profilerEnabled):
(WebCore::InspectorController::debuggerEnabled):
(WebCore::InspectorController::showAndEnableDebugger):
(WebCore::InspectorController::disableDebugger):
(WebCore::InspectorController::startUserInitiatedProfiling):
(WebCore::InspectorController::stopUserInitiatedProfiling):
(WebCore::InspectorController::isRecordingUserInitiatedProfile):
(WebCore::InspectorController::setInspectorExtensionAPI):
(WebCore::InspectorController::resume):
(WebCore::InspectorController::hideHighlight):
(WebCore::InspectorController::dispatchMessageFromFrontend):
* inspector/InspectorController.h:
(WebCore::InspectorController::inspectorClient):
(WebCore::InspectorController::inspectedPage):
(WebCore::InspectorController::hasFrontend):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::sendMessageToBackend):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::setExtensionAPI):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
(WebCore::InspectorInstrumentation::profilerEnabledImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::hasFrontend):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2011-02-02 Ilya Tikhonovsky <loislo@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: move InspectorController's methods from InspectorAgent to InspectorController.
https://bugs.webkit.org/show_bug.cgi?id=53169
Minor change enforced by major changes in WebCore/inspector/InspectorController.
* src/WebDevToolsAgentImpl.cpp:
(WebKit::WebDevToolsAgentImpl::dispatchOnInspectorBackend):
* src/WebViewImpl.h:
2011-02-02 Ilya Tikhonovsky <loislo@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: move InspectorController's methods from InspectorAgent to InspectorController.
https://bugs.webkit.org/show_bug.cgi?id=53169
Minor change enforced by major changes in WebCore/inspector/InspectorController.
* WebCoreSupport/InspectorClientGtk.cpp:
* webkit/webkitwebinspector.cpp:
(webkit_web_inspector_get_property):
2011-02-02 Ilya Tikhonovsky <loislo@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: move InspectorController's methods from InspectorAgent to InspectorController.
https://bugs.webkit.org/show_bug.cgi?id=53169
Minor change enforced by major changes in WebCore/inspector/InspectorController.
* WebInspector/WebInspector.mm:
(-[WebInspector isTimelineProfilingEnabled]):
2011-02-02 Ilya Tikhonovsky <loislo@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: move InspectorController's methods from InspectorAgent to InspectorController.
https://bugs.webkit.org/show_bug.cgi?id=53169
Minor change enforced by major changes in WebCore/inspector/InspectorController.
* WebInspector.cpp:
(WebInspector::isTimelineProfilingEnabled):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@77950
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-02-02 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: move InspectorController's methods from InspectorAgent to InspectorController.
+
+ https://bugs.webkit.org/show_bug.cgi?id=53169
+
+ All the Inspector API for WebCore has two parts.
+ The first one is InspectorInstrumentation for WebCore.
+ The second is InspectorController for WebKit.
+ InspectorAgent was produced by renaming original InspectorController.
+ This patch extracts WebKit related methods from InspectorAgent to InspectorController.
+
+ * WebCore.exp.in:
+ * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
+ * html/HTMLDocument.cpp:
+ (WebCore::HTMLDocument::createParser):
+ * inspector/InspectorAgent.cpp:
+ (WebCore::InspectorAgent::InspectorAgent):
+ (WebCore::InspectorAgent::~InspectorAgent):
+ (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
+ (WebCore::InspectorAgent::inspect):
+ (WebCore::InspectorAgent::handleMousePress):
+ (WebCore::InspectorAgent::didClearWindowObjectInWorld):
+ (WebCore::InspectorAgent::setFrontend):
+ (WebCore::InspectorAgent::disconnectFrontend):
+ (WebCore::InspectorAgent::resourceAgent):
+ (WebCore::InspectorAgent::createFrontendLifetimeAgents):
+ (WebCore::InspectorAgent::releaseFrontendLifetimeAgents):
+ (WebCore::InspectorAgent::populateScriptObjects):
+ (WebCore::InspectorAgent::pushDataCollectedOffline):
+ (WebCore::InspectorAgent::restoreProfiler):
+ (WebCore::InspectorAgent::startTimelineProfiler):
+ (WebCore::PostWorkerNotificationToFrontendTask::performTask):
+ (WebCore::InspectorAgent::didOpenDatabase):
+ (WebCore::InspectorAgent::didUseDOMStorage):
+ (WebCore::InspectorAgent::showAndEnableDebugger):
+ (WebCore::InspectorAgent::enableDebugger):
+ (WebCore::InspectorAgent::enabled):
+ * inspector/InspectorAgent.h:
+ (WebCore::InspectorAgent::frontend):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::InspectorController):
+ (WebCore::InspectorController::~InspectorController):
+ (WebCore::InspectorController::setInspectorFrontendClient):
+ (WebCore::InspectorController::hasInspectorFrontendClient):
+ (WebCore::InspectorController::didClearWindowObjectInWorld):
+ (WebCore::InspectorController::startTimelineProfiler):
+ (WebCore::InspectorController::stopTimelineProfiler):
+ (WebCore::InspectorController::connectFrontend):
+ (WebCore::InspectorController::disconnectFrontend):
+ (WebCore::InspectorController::disconnectFrontendImpl):
+ (WebCore::InspectorController::show):
+ (WebCore::InspectorController::close):
+ (WebCore::InspectorController::restoreInspectorStateFromCookie):
+ (WebCore::InspectorController::evaluateForTestInFrontend):
+ (WebCore::InspectorController::drawNodeHighlight):
+ (WebCore::InspectorController::inspect):
+ (WebCore::InspectorController::enabled):
+ (WebCore::InspectorController::showPanel):
+ (WebCore::InspectorController::frontendLoaded):
+ (WebCore::InspectorController::timelineProfilerEnabled):
+ (WebCore::InspectorController::enableProfiler):
+ (WebCore::InspectorController::disableProfiler):
+ (WebCore::InspectorController::profilerEnabled):
+ (WebCore::InspectorController::debuggerEnabled):
+ (WebCore::InspectorController::showAndEnableDebugger):
+ (WebCore::InspectorController::disableDebugger):
+ (WebCore::InspectorController::startUserInitiatedProfiling):
+ (WebCore::InspectorController::stopUserInitiatedProfiling):
+ (WebCore::InspectorController::isRecordingUserInitiatedProfile):
+ (WebCore::InspectorController::setInspectorExtensionAPI):
+ (WebCore::InspectorController::resume):
+ (WebCore::InspectorController::hideHighlight):
+ (WebCore::InspectorController::dispatchMessageFromFrontend):
+ * inspector/InspectorController.h:
+ (WebCore::InspectorController::inspectorClient):
+ (WebCore::InspectorController::inspectedPage):
+ (WebCore::InspectorController::hasFrontend):
+ * inspector/InspectorFrontendClientLocal.cpp:
+ (WebCore::InspectorFrontendClientLocal::sendMessageToBackend):
+ * inspector/InspectorFrontendHost.cpp:
+ (WebCore::InspectorFrontendHost::setExtensionAPI):
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
+ (WebCore::InspectorInstrumentation::profilerEnabledImpl):
+ * inspector/InspectorInstrumentation.h:
+ (WebCore::InspectorInstrumentation::hasFrontend):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
+
2011-02-08 George Wright <gwright@rim.com>
Reviewed by Adam Barth.
#endif
#if ENABLE(INSPECTOR)
-__ZN7WebCore14InspectorAgent4showEv
-__ZN7WebCore14InspectorAgent5closeEv
-__ZN7WebCore14InspectorAgent9showPanelERKN3WTF6StringE
-__ZN7WebCore14InspectorAgent12ConsolePanelE
-__ZN7WebCore14InspectorAgent13ProfilesPanelE
-__ZN7WebCore14InspectorAgent14enableProfilerEv
-__ZN7WebCore14InspectorAgent15disableDebuggerEv
-__ZN7WebCore14InspectorAgent15disableProfilerEv
-__ZN7WebCore14InspectorAgent18disconnectFrontendEv
-__ZN7WebCore14InspectorAgent20stopTimelineProfilerEv
-__ZN7WebCore14InspectorAgent21showAndEnableDebuggerEv
-__ZN7WebCore14InspectorAgent21startTimelineProfilerEv
-__ZN7WebCore14InspectorAgent25evaluateForTestInFrontendElRKN3WTF6StringE
-__ZN7WebCore14InspectorAgent26setInspectorFrontendClientEN3WTF10PassOwnPtrINS_23InspectorFrontendClientEEE
-__ZN7WebCore14InspectorAgent26stopUserInitiatedProfilingEv
-__ZN7WebCore14InspectorAgent27startUserInitiatedProfilingEv
__ZN7WebCore15InspectorClient31doDispatchMessageOnFrontendPageEPNS_4PageERKN3WTF6StringE
+__ZN7WebCore19InspectorController12ConsolePanelE
+__ZN7WebCore19InspectorController13ProfilesPanelE
+__ZN7WebCore19InspectorController14enableProfilerEv
+__ZN7WebCore19InspectorController15debuggerEnabledEv
+__ZN7WebCore19InspectorController15disableDebuggerEv
+__ZN7WebCore19InspectorController15disableProfilerEv
+__ZN7WebCore19InspectorController15profilerEnabledEv
+__ZN7WebCore19InspectorController18disconnectFrontendEv
+__ZN7WebCore19InspectorController20stopTimelineProfilerEv
+__ZN7WebCore19InspectorController21showAndEnableDebuggerEv
+__ZN7WebCore19InspectorController21startTimelineProfilerEv
+__ZN7WebCore19InspectorController23timelineProfilerEnabledEv
+__ZN7WebCore19InspectorController25evaluateForTestInFrontendElRKN3WTF6StringE
+__ZN7WebCore19InspectorController26setInspectorFrontendClientEN3WTF10PassOwnPtrINS_23InspectorFrontendClientEEE
+__ZN7WebCore19InspectorController26stopUserInitiatedProfilingEv
+__ZN7WebCore19InspectorController27startUserInitiatedProfilingEv
+__ZN7WebCore19InspectorController4showEv
+__ZN7WebCore19InspectorController5closeEv
+__ZN7WebCore19InspectorController9showPanelERKN3WTF6StringE
__ZN7WebCore28InspectorFrontendClientLocal12moveWindowByEff
__ZN7WebCore28InspectorFrontendClientLocal14frontendLoadedEv
__ZN7WebCore28InspectorFrontendClientLocal15canAttachWindowEv
__ZN7WebCore28InspectorFrontendClientLocal27restoreAttachedWindowHeightEv
__ZN7WebCore28InspectorFrontendClientLocalC2EPNS_19InspectorControllerEPNS_4PageEN3WTF10PassOwnPtrINS0_8SettingsEEE
__ZN7WebCore28InspectorFrontendClientLocalD2Ev
-__ZNK7WebCore14InspectorAgent15profilerEnabledEv
-__ZNK7WebCore14InspectorAgent17drawNodeHighlightERNS_15GraphicsContextE
-__ZNK7WebCore14InspectorAgent31isRecordingUserInitiatedProfileEv
+__ZNK7WebCore19InspectorController17drawNodeHighlightERNS_15GraphicsContextE
+__ZNK7WebCore19InspectorController31isRecordingUserInitiatedProfileEv
#endif
#if ENABLE(JAVA_BRIDGE)
#include "V8InspectorFrontendHost.h"
#include "InspectorController.h"
+#include "InspectorFrontendClient.h"
#include "InspectorFrontendHost.h"
#include "PlatformString.h"
#include "HTMLBodyElement.h"
#include "HTMLElementFactory.h"
#include "HTMLNames.h"
-#include "InspectorController.h"
+#include "InspectorInstrumentation.h"
#include "KURL.h"
#include "Page.h"
#include "Settings.h"
PassRefPtr<DocumentParser> HTMLDocument::createParser()
{
- bool reportErrors = false;
-#if ENABLE(INSPECTOR)
- if (Page* page = this->page())
- reportErrors = page->inspectorController()->hasFrontend();
-#endif
+ bool reportErrors = InspectorInstrumentation::hasFrontend(this->page());
return HTMLDocumentParser::create(this, reportErrors);
}
#include "HitTestResult.h"
#include "InjectedScript.h"
#include "InjectedScriptHost.h"
-#include "InspectorBackendDispatcher.h"
#include "InspectorBrowserDebuggerAgent.h"
#include "InspectorCSSAgent.h"
#include "InspectorClient.h"
static const char profilerEnabled[] = "profilerEnabled";
}
-const char* const InspectorAgent::ElementsPanel = "elements";
-const char* const InspectorAgent::ConsolePanel = "console";
-const char* const InspectorAgent::ScriptsPanel = "scripts";
-const char* const InspectorAgent::ProfilesPanel = "profiles";
-
InspectorAgent::InspectorAgent(InspectorController* inspectorController, Page* page, InspectorClient* client)
: m_inspectorController(inspectorController)
, m_inspectedPage(page)
, m_client(client)
- , m_openingFrontend(false)
+ , m_frontend(0)
, m_cssAgent(new InspectorCSSAgent())
, m_state(new InspectorState(client))
- , m_inspectorBackendDispatcher(new InspectorBackendDispatcher(this))
, m_injectedScriptHost(InjectedScriptHost::create(this))
, m_consoleAgent(new InspectorConsoleAgent(this))
#if ENABLE(JAVASCRIPT_DEBUGGER)
m_client = 0;
}
-bool InspectorAgent::enabled() const
-{
- if (!m_inspectedPage)
- return false;
- return m_inspectedPage->settings()->developerExtrasEnabled();
-}
-
bool InspectorAgent::searchingForNodeInPage() const
{
return m_state->getBoolean(InspectorAgentState::searchingForNode);
m_state->restoreFromInspectorCookie(inspectorStateCookie);
if (!m_frontend) {
- connectFrontend();
+ m_inspectorController->connectFrontend();
m_frontend->frontendReused();
m_frontend->inspectedURLChanged(inspectedURL().string());
m_domAgent->setDocument(m_inspectedPage->mainFrame()->document());
pushDataCollectedOffline();
}
- m_resourceAgent = InspectorResourceAgent::restore(m_inspectedPage, m_state.get(), m_frontend.get());
+ m_resourceAgent = InspectorResourceAgent::restore(m_inspectedPage, m_state.get(), m_frontend);
if (m_state->getBoolean(InspectorAgentState::timelineProfilerEnabled))
startTimelineProfiler();
void InspectorAgent::inspect(Node* node)
{
- if (!enabled())
- return;
-
- show();
-
if (node->nodeType() != Node::ELEMENT_NODE && node->nodeType() != Node::DOCUMENT_NODE)
node = node->parentNode();
m_nodeToFocus = node;
return true;
}
-void InspectorAgent::setInspectorFrontendClient(PassOwnPtr<InspectorFrontendClient> client)
-{
- ASSERT(!m_inspectorFrontendClient);
- m_inspectorFrontendClient = client;
-}
-
void InspectorAgent::didClearWindowObjectInWorld(Frame* frame, DOMWrapperWorld* world)
{
if (world != mainThreadNormalWorld())
return;
- // If the page is supposed to serve as InspectorFrontend notify inspetor frontend
- // client that it's cleared so that the client can expose inspector bindings.
- if (m_inspectorFrontendClient && frame == m_inspectedPage->mainFrame())
- m_inspectorFrontendClient->windowObjectCleared();
-
if (enabled()) {
if (m_frontend && frame == m_inspectedPage->mainFrame())
m_injectedScriptHost->discardInjectedScripts();
+
if (m_scriptsToEvaluateOnLoad.size()) {
ScriptState* scriptState = mainWorldScriptState(frame);
for (Vector<String>::iterator it = m_scriptsToEvaluateOnLoad.begin();
- it != m_scriptsToEvaluateOnLoad.end(); ++it) {
+ it != m_scriptsToEvaluateOnLoad.end(); ++it) {
m_injectedScriptHost->injectScript(*it, scriptState);
}
}
}
+
if (!m_inspectorExtensionAPI.isEmpty())
m_injectedScriptHost->injectScript(m_inspectorExtensionAPI, mainWorldScriptState(frame));
}
setSearchingForNode(enabled);
}
-void InspectorAgent::connectFrontend()
+void InspectorAgent::setFrontend(InspectorFrontend* inspectorFrontend)
{
- m_openingFrontend = false;
releaseFrontendLifetimeAgents();
- m_frontend = new InspectorFrontend(m_client);
- m_domAgent = InspectorDOMAgent::create(m_injectedScriptHost.get(), m_frontend.get());
- m_runtimeAgent = InspectorRuntimeAgent::create(m_injectedScriptHost.get());
- m_cssAgent->setDOMAgent(m_domAgent.get());
-
-#if ENABLE(DATABASE)
- m_databaseAgent = InspectorDatabaseAgent::create(&m_databaseResources, m_frontend.get());
-#endif
+ m_frontend = inspectorFrontend;
+ createFrontendLifetimeAgents();
-#if ENABLE(DOM_STORAGE)
- m_domStorageAgent = InspectorDOMStorageAgent::create(&m_domStorageResources, m_frontend.get());
-#endif
+ m_cssAgent->setDOMAgent(m_domAgent.get());
if (m_timelineAgent)
- m_timelineAgent->resetFrontendProxyObject(m_frontend.get());
+ m_timelineAgent->resetFrontendProxyObject(m_frontend);
- m_consoleAgent->setFrontend(m_frontend.get());
+ m_consoleAgent->setFrontend(m_frontend);
// Initialize Web Inspector title.
m_frontend->inspectedURLChanged(inspectedURL().string());
-
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
- m_applicationCacheAgent = new InspectorApplicationCacheAgent(this, m_frontend.get());
-#endif
-
-#if ENABLE(FILE_SYSTEM)
- m_fileSystemAgent = InspectorFileSystemAgent::create(this, m_frontend.get());
-#endif
-
- if (!InspectorInstrumentation::hasFrontends())
- ScriptController::setCaptureCallStackForUncaughtExceptions(true);
- InspectorInstrumentation::frontendCreated();
-}
-
-void InspectorAgent::show()
-{
- if (!enabled())
- return;
-
- if (m_openingFrontend)
- return;
-
- if (m_frontend)
- m_frontend->bringToFront();
- else {
- m_openingFrontend = true;
- m_client->openInspectorFrontend(inspectorController());
- }
-}
-
-void InspectorAgent::showPanel(const String& panel)
-{
- if (!enabled())
- return;
-
- show();
-
- if (!m_frontend) {
- m_showAfterVisible = panel;
- return;
- }
- m_frontend->showPanel(panel);
-}
-
-void InspectorAgent::close()
-{
- if (!m_frontend)
- return;
- m_frontend->disconnectFromBackend();
- disconnectFrontend();
}
void InspectorAgent::disconnectFrontend()
if (!m_frontend)
return;
- m_frontend.clear();
+ m_frontend = 0;
- InspectorInstrumentation::frontendDeleted();
- if (!InspectorInstrumentation::hasFrontends())
- ScriptController::setCaptureCallStackForUncaughtExceptions(false);
+ m_inspectorController->disconnectFrontendImpl();
#if ENABLE(JAVASCRIPT_DEBUGGER)
// If the window is being closed with the debugger enabled,
#endif
setSearchingForNode(false);
unbindAllResources();
- stopTimelineProfiler();
hideHighlight();
InspectorResourceAgent* InspectorAgent::resourceAgent()
{
if (!m_resourceAgent && m_frontend)
- m_resourceAgent = InspectorResourceAgent::create(m_inspectedPage, m_state.get(), m_frontend.get());
+ m_resourceAgent = InspectorResourceAgent::create(m_inspectedPage, m_state.get(), m_frontend);
return m_resourceAgent.get();
}
+void InspectorAgent::createFrontendLifetimeAgents()
+{
+ m_domAgent = InspectorDOMAgent::create(m_injectedScriptHost.get(), m_frontend);
+ m_runtimeAgent = InspectorRuntimeAgent::create(m_injectedScriptHost.get());
+
+#if ENABLE(DATABASE)
+ m_databaseAgent = InspectorDatabaseAgent::create(&m_databaseResources, m_frontend);
+#endif
+
+#if ENABLE(DOM_STORAGE)
+ m_domStorageAgent = InspectorDOMStorageAgent::create(&m_domStorageResources, m_frontend);
+#endif
+
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+ m_applicationCacheAgent = new InspectorApplicationCacheAgent(this, m_frontend);
+#endif
+
+#if ENABLE(FILE_SYSTEM)
+ m_fileSystemAgent = InspectorFileSystemAgent::create(this, m_frontend);
+#endif
+}
+
void InspectorAgent::releaseFrontendLifetimeAgents()
{
m_resourceAgent.clear();
m_fileSystemAgent->stop();
m_fileSystemAgent.clear();
#endif
+ stopTimelineProfiler();
}
void InspectorAgent::populateScriptObjects()
if (!m_frontend)
return;
- if (!m_showAfterVisible.isEmpty()) {
- showPanel(m_showAfterVisible);
- m_showAfterVisible = "";
- }
-
#if ENABLE(JAVASCRIPT_DEBUGGER)
if (m_profilerAgent->enabled())
m_frontend->profilerWasEnabled();
if (m_nodeToFocus)
focusNode();
+ if (!m_requiredPanel.isEmpty()) {
+ m_frontend->showPanel(m_requiredPanel);
+ m_requiredPanel = "";
+ }
+
+ restoreDebugger(true);
+ restoreProfiler(ProfilerRestoreNoAction);
+
// Dispatch pending frontend commands
for (Vector<pair<long, String> >::iterator it = m_pendingEvaluateTestCommands.begin(); it != m_pendingEvaluateTestCommands.end(); ++it)
m_frontend->evaluateForTestInFrontend((*it).first, (*it).second);
m_pendingEvaluateTestCommands.clear();
-
- restoreDebugger(true);
- restoreProfiler(ProfilerRestoreNoAction);
}
void InspectorAgent::pushDataCollectedOffline()
#if ENABLE(DATABASE)
DatabaseResourcesMap::iterator databasesEnd = m_databaseResources.end();
for (DatabaseResourcesMap::iterator it = m_databaseResources.begin(); it != databasesEnd; ++it)
- it->second->bind(m_frontend.get());
+ it->second->bind(m_frontend);
#endif
#if ENABLE(DOM_STORAGE)
DOMStorageResourcesMap::iterator domStorageEnd = m_domStorageResources.end();
for (DOMStorageResourcesMap::iterator it = m_domStorageResources.begin(); it != domStorageEnd; ++it)
- it->second->bind(m_frontend.get());
+ it->second->bind(m_frontend);
#endif
#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(WORKERS)
WorkersMap::iterator workersEnd = m_workers.end();
{
ASSERT(m_frontend);
#if ENABLE(JAVASCRIPT_DEBUGGER)
- m_profilerAgent->setFrontend(m_frontend.get());
+ m_profilerAgent->setFrontend(m_frontend);
if (m_state->getBoolean(InspectorAgentState::profilerEnabled))
enableProfiler();
if (action == ProfilerRestoreResetAgent)
if (m_timelineAgent)
return;
- m_timelineAgent = new InspectorTimelineAgent(m_frontend.get());
+ m_timelineAgent = new InspectorTimelineAgent(m_frontend);
if (m_frontend)
m_frontend->timelineProfilerWasStarted();
virtual void performTask(ScriptExecutionContext* scriptContext)
{
if (scriptContext->isDocument()) {
- if (InspectorAgent* inspector = static_cast<Document*>(scriptContext)->page()->inspectorController())
- inspector->postWorkerNotificationToFrontend(*m_worker, m_action);
+ if (InspectorAgent* inspectorAgent = static_cast<Document*>(scriptContext)->page()->inspectorController()->m_inspectorAgent.get())
+ inspectorAgent->postWorkerNotificationToFrontend(*m_worker, m_action);
}
}
// Resources are only bound while visible.
if (m_frontend)
- resource->bind(m_frontend.get());
+ resource->bind(m_frontend);
}
#endif
// Resources are only bound while visible.
if (m_frontend)
- resource->bind(m_frontend.get());
+ resource->bind(m_frontend);
}
#endif
if (!m_frontend) {
m_state->setBoolean(InspectorAgentState::debuggerEnabled, true);
- showPanel(ScriptsPanel);
+ showPanel(InspectorController::ScriptsPanel);
} else
enableDebugger(true);
}
m_state->setBoolean(InspectorAgentState::debuggerEnabled, true);
ASSERT(m_inspectedPage);
- m_debuggerAgent = InspectorDebuggerAgent::create(this, m_frontend.get(), eraseStickyBreakpoints);
+ m_debuggerAgent = InspectorDebuggerAgent::create(this, m_frontend, eraseStickyBreakpoints);
m_browserDebuggerAgent = InspectorBrowserDebuggerAgent::create(this, eraseStickyBreakpoints);
m_frontend->debuggerWasEnabled();
m_inspectedPage->mainFrame()->loader()->reload(ignoreCache);
}
+bool InspectorAgent::enabled() const
+{
+ return m_inspectorController->enabled();
+}
+
+void InspectorAgent::showPanel(const String& panel)
+{
+ if (!m_frontend) {
+ m_requiredPanel = panel;
+ return;
+ }
+ m_frontend->showPanel(panel);
+}
+
} // namespace WebCore
#endif // ENABLE(INSPECTOR)
class InjectedScript;
class InjectedScriptHost;
class InspectorArray;
-class InspectorBackendDispatcher;
class InspectorBrowserDebuggerAgent;
class InspectorClient;
class InspectorConsoleAgent;
WTF_MAKE_NONCOPYABLE(InspectorAgent);
WTF_MAKE_FAST_ALLOCATED;
public:
- static const char* const ConsolePanel;
- static const char* const ElementsPanel;
- static const char* const ProfilesPanel;
- static const char* const ScriptsPanel;
-
InspectorAgent(InspectorController*, Page*, InspectorClient*);
virtual ~InspectorAgent();
- InspectorBackendDispatcher* inspectorBackendDispatcher() { return m_inspectorBackendDispatcher.get(); }
InspectorClient* inspectorClient() { return m_client; }
InjectedScriptHost* injectedScriptHost() { return m_injectedScriptHost.get(); }
KURL inspectedURL() const;
KURL inspectedURLWithoutFragment() const;
void reloadPage(bool ignoreCache);
+ void showPanel(const String& panel);
void restoreInspectorStateFromCookie(const String& inspectorCookie);
- void inspect(Node*);
void highlight(Node*);
void hideHighlight();
+ void inspect(Node*);
void highlightDOMNode(long nodeId);
void hideDOMNodeHighlight() { hideHighlight(); }
void highlightFrame(unsigned long frameId);
void hideFrameHighlight() { hideHighlight(); }
- void show();
- void showPanel(const String&);
- void close();
-
- void connectFrontend();
- void reuseFrontend();
+ void setFrontend(InspectorFrontend*);
+ InspectorFrontend* frontend() const { return m_frontend; }
void disconnectFrontend();
- InspectorFrontend* frontend() const { return m_frontend.get(); }
InspectorResourceAgent* resourceAgent();
InspectorApplicationCacheAgent* applicationCacheAgent() { return m_applicationCacheAgent.get(); }
#endif
-
+ bool handleMousePress();
bool searchingForNodeInPage() const;
void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);
- bool handleMousePress();
-
- void setInspectorFrontendClient(PassOwnPtr<InspectorFrontendClient>);
- bool hasInspectorFrontendClient() const { return m_inspectorFrontendClient; }
void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld*);
void didCommitLoad(DocumentLoader*);
- void setExtraHeaders(PassRefPtr<InspectorObject>);
-
void startTimelineProfiler();
void stopTimelineProfiler();
void setSearchingForNode(bool enabled);
void releaseFrontendLifetimeAgents();
+ void createFrontendLifetimeAgents();
#if ENABLE(JAVASCRIPT_DEBUGGER)
void toggleRecordButton(bool);
InspectorController* m_inspectorController;
Page* m_inspectedPage;
InspectorClient* m_client;
- OwnPtr<InspectorFrontendClient> m_inspectorFrontendClient;
- bool m_openingFrontend;
- OwnPtr<InspectorFrontend> m_frontend;
+ InspectorFrontend* m_frontend;
OwnPtr<InspectorCSSAgent> m_cssAgent;
RefPtr<InspectorDOMAgent> m_domAgent;
RefPtr<InspectorFileSystemAgent> m_fileSystemAgent;
#endif
+ RefPtr<Node> m_highlightedNode;
RefPtr<Node> m_nodeToFocus;
RefPtr<InspectorResourceAgent> m_resourceAgent;
OwnPtr<InspectorRuntimeAgent> m_runtimeAgent;
DOMStorageResourcesMap m_domStorageResources;
#endif
- String m_showAfterVisible;
- RefPtr<Node> m_highlightedNode;
- OwnPtr<InspectorBackendDispatcher> m_inspectorBackendDispatcher;
RefPtr<InjectedScriptHost> m_injectedScriptHost;
OwnPtr<InspectorConsoleAgent> m_consoleAgent;
Vector<pair<long, String> > m_pendingEvaluateTestCommands;
+ String m_requiredPanel;
Vector<String> m_scriptsToEvaluateOnLoad;
String m_inspectorExtensionAPI;
#if ENABLE(JAVASCRIPT_DEBUGGER)
#if ENABLE(INSPECTOR)
+#include "Frame.h"
+#include "GraphicsContext.h"
+#include "InjectedScriptHost.h"
+#include "InspectorAgent.h"
+#include "InspectorBackendDispatcher.h"
+#include "InspectorDebuggerAgent.h"
#include "InspectorClient.h"
+#include "InspectorFrontend.h"
+#include "InspectorFrontendClient.h"
+#include "InspectorInstrumentation.h"
#include "Page.h"
+#include "ScriptObject.h"
+#include "Settings.h"
namespace WebCore {
-// FIXME: temporary solution. It will become a separate class in the next patch and Controller related subset of functions will be moved from InspectorAgent to InspectorControler.
+const char* const InspectorController::ElementsPanel = "elements";
+const char* const InspectorController::ConsolePanel = "console";
+const char* const InspectorController::ScriptsPanel = "scripts";
+const char* const InspectorController::ProfilesPanel = "profiles";
+
InspectorController::InspectorController(Page* page, InspectorClient* inspectorClient)
- : InspectorAgent(this, page, inspectorClient)
+ : m_inspectorAgent(new InspectorAgent(this, page, inspectorClient))
+ , m_inspectorBackendDispatcher(new InspectorBackendDispatcher(m_inspectorAgent.get()))
+ , m_inspectedPage(page)
+ , m_inspectorClient(inspectorClient)
+ , m_openingFrontend(false)
+{
+}
+
+InspectorController::~InspectorController()
+{
+}
+
+void InspectorController::setInspectorFrontendClient(PassOwnPtr<InspectorFrontendClient> inspectorFrontendClient)
+{
+ m_inspectorFrontendClient = inspectorFrontendClient;
+}
+
+bool InspectorController::hasInspectorFrontendClient() const
+{
+ return m_inspectorFrontendClient;
+}
+
+void InspectorController::didClearWindowObjectInWorld(Frame* frame, DOMWrapperWorld* world)
+{
+ if (world != mainThreadNormalWorld())
+ return;
+
+ // If the page is supposed to serve as InspectorFrontend notify inspector frontend
+ // client that it's cleared so that the client can expose inspector bindings.
+ if (m_inspectorFrontendClient && frame == m_inspectedPage->mainFrame())
+ m_inspectorFrontendClient->windowObjectCleared();
+}
+
+void InspectorController::startTimelineProfiler()
+{
+ m_inspectorAgent->startTimelineProfiler();
+}
+
+void InspectorController::stopTimelineProfiler()
+{
+ m_inspectorAgent->stopTimelineProfiler();
+}
+
+void InspectorController::connectFrontend()
+{
+ m_openingFrontend = false;
+ m_inspectorFrontend = new InspectorFrontend(m_inspectorClient);
+ m_inspectorAgent->setFrontend(m_inspectorFrontend.get());
+
+ if (!InspectorInstrumentation::hasFrontends())
+ ScriptController::setCaptureCallStackForUncaughtExceptions(true);
+ InspectorInstrumentation::frontendCreated();
+}
+
+void InspectorController::disconnectFrontend()
+{
+ m_inspectorAgent->disconnectFrontend();
+}
+
+void InspectorController::disconnectFrontendImpl()
+{
+ if (!m_inspectorFrontend)
+ return;
+
+ m_inspectorFrontend.clear();
+
+ InspectorInstrumentation::frontendDeleted();
+ if (!InspectorInstrumentation::hasFrontends())
+ ScriptController::setCaptureCallStackForUncaughtExceptions(false);
+}
+
+void InspectorController::show()
+{
+ if (!enabled())
+ return;
+
+ if (m_openingFrontend)
+ return;
+
+ if (m_inspectorFrontend)
+ m_inspectorFrontend->bringToFront();
+ else {
+ m_openingFrontend = true;
+ m_inspectorClient->openInspectorFrontend(this);
+ }
+}
+
+void InspectorController::close()
+{
+ if (!m_inspectorFrontend)
+ return;
+ m_inspectorFrontend->disconnectFromBackend();
+ disconnectFrontend();
+}
+
+void InspectorController::restoreInspectorStateFromCookie(const String& inspectorStateCookie)
+{
+ m_inspectorAgent->restoreInspectorStateFromCookie(inspectorStateCookie);
+}
+
+void InspectorController::evaluateForTestInFrontend(long callId, const String& script)
+{
+ m_inspectorAgent->evaluateForTestInFrontend(callId, script);
+}
+
+void InspectorController::drawNodeHighlight(GraphicsContext& context) const
+{
+ m_inspectorAgent->drawNodeHighlight(context);
+}
+
+void InspectorController::inspect(Node* node)
+{
+ if (!enabled())
+ return;
+
+ show();
+
+ m_inspectorAgent->inspect(node);
+}
+
+bool InspectorController::enabled() const
+{
+ if (!m_inspectedPage)
+ return false;
+
+ return m_inspectedPage->settings()->developerExtrasEnabled();
+}
+
+void InspectorController::showPanel(const String& panel)
{
+ if (!enabled())
+ return;
+
+ show();
+
+ m_inspectorAgent->showPanel(panel);
}
+bool InspectorController::timelineProfilerEnabled()
+{
+ return m_inspectorAgent->timelineAgent();
+}
+
+#if ENABLE(JAVASCRIPT_DEBUGGER)
+void InspectorController::enableProfiler()
+{
+ m_inspectorAgent->enableProfiler();
+}
+
+void InspectorController::disableProfiler()
+{
+ m_inspectorAgent->disableProfiler();
+}
+
+bool InspectorController::profilerEnabled()
+{
+ return m_inspectorAgent->profilerEnabled();
+}
+
+bool InspectorController::debuggerEnabled()
+{
+ return m_inspectorAgent->debuggerEnabled();
+}
+
+void InspectorController::showAndEnableDebugger()
+{
+ m_inspectorAgent->showAndEnableDebugger();
+}
+
+void InspectorController::disableDebugger()
+{
+ m_inspectorAgent->disableDebugger();
+}
+
+void InspectorController::startUserInitiatedProfiling()
+{
+ m_inspectorAgent->startUserInitiatedProfiling();
+}
+
+void InspectorController::stopUserInitiatedProfiling()
+{
+ m_inspectorAgent->stopUserInitiatedProfiling();
+}
+
+bool InspectorController::isRecordingUserInitiatedProfile() const
+{
+ return m_inspectorAgent->isRecordingUserInitiatedProfile();
+}
+
+void InspectorController::setInspectorExtensionAPI(const String& source)
+{
+ m_inspectorAgent->setInspectorExtensionAPI(source);
+}
+
+void InspectorController::resume()
+{
+ if (InspectorDebuggerAgent* debuggerAgent = m_inspectorAgent->debuggerAgent())
+ debuggerAgent->resume();
+}
+
+void InspectorController::hideHighlight()
+{
+ m_inspectorAgent->hideHighlight();
+}
+
+void InspectorController::dispatchMessageFromFrontend(const String& message)
+{
+ m_inspectorBackendDispatcher->dispatch(message);
+}
+
+#endif
+
} // namespace WebCore
#endif // ENABLE(INSPECTOR)
#ifndef InspectorController_h
#define InspectorController_h
-#include "InspectorAgent.h"
+#include "PlatformString.h"
+#include <wtf/Forward.h>
+#include <wtf/Noncopyable.h>
+#include <wtf/Vector.h>
namespace WebCore {
+class DOMWrapperWorld;
+class Frame;
+class GraphicsContext;
+class InspectorAgent;
+class InspectorBackendDispatcher;
class InspectorClient;
+class InspectorFrontend;
+class InspectorFrontendClient;
class Page;
+class PostWorkerNotificationToFrontendTask;
+class Node;
-// FIXME: temporary solution. It will become a separate class in the next patch and controller related subset of functions will be moved from InspectorAgent to InspectorControler.
-class InspectorController : public InspectorAgent {
+class InspectorController {
+ WTF_MAKE_NONCOPYABLE(InspectorController);
+ WTF_MAKE_FAST_ALLOCATED;
public:
+ static const char* const ConsolePanel;
+ static const char* const ElementsPanel;
+ static const char* const ProfilesPanel;
+ static const char* const ScriptsPanel;
+
InspectorController(Page*, InspectorClient*);
+ ~InspectorController();
+
+ Page* inspectedPage() { return m_inspectedPage; }
+
+ bool enabled() const;
+
+ void show();
+ void showPanel(const String& panel);
+ void close();
+
+ void setInspectorFrontendClient(PassOwnPtr<InspectorFrontendClient>);
+ bool hasInspectorFrontendClient() const;
+ void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld*);
+ void setInspectorExtensionAPI(const String& source);
+ void dispatchMessageFromFrontend(const String& message);
+
+ bool hasFrontend() const { return m_inspectorFrontend; }
+ void connectFrontend();
+ void disconnectFrontend();
+ void restoreInspectorStateFromCookie(const String& inspectorCookie);
+
+ void inspect(Node*);
+ void drawNodeHighlight(GraphicsContext&) const;
+ void hideHighlight();
+
+ void evaluateForTestInFrontend(long callId, const String& script);
+
+ void startTimelineProfiler();
+ void stopTimelineProfiler();
+ bool timelineProfilerEnabled();
+
+#if ENABLE(JAVASCRIPT_DEBUGGER)
+ bool profilerEnabled();
+ void enableProfiler();
+ void startUserInitiatedProfiling();
+ bool isRecordingUserInitiatedProfile() const;
+ void stopUserInitiatedProfiling();
+ void disableProfiler();
+ void showAndEnableDebugger();
+ bool debuggerEnabled();
+ void disableDebugger();
+ void resume();
+#endif
+
+private:
+ friend class InspectorAgent;
+ friend class PostWorkerNotificationToFrontendTask;
+
+ void disconnectFrontendImpl(); // used by InspectorAgent
+ void frontendLoaded();
+
+ OwnPtr<InspectorAgent> m_inspectorAgent;
+ OwnPtr<InspectorBackendDispatcher> m_inspectorBackendDispatcher;
+ OwnPtr<InspectorFrontendClient> m_inspectorFrontendClient;
+ OwnPtr<InspectorFrontend> m_inspectorFrontend;
+ Page* m_inspectedPage;
+ InspectorClient* m_inspectorClient;
+ bool m_openingFrontend;
};
}
void InspectorFrontendClientLocal::sendMessageToBackend(const String& message)
{
- m_inspectorController->inspectorBackendDispatcher()->dispatch(message);
+ m_inspectorController->dispatchMessageFromFrontend(message);
}
} // namespace WebCore
void InspectorFrontendHost::setExtensionAPI(const String& script)
{
- InspectorAgent* inspector = m_frontendPage->inspectorController();
- inspector->setInspectorExtensionAPI(script);
+ ASSERT(m_frontendPage->inspectorController());
+ m_frontendPage->inspectorController()->setInspectorExtensionAPI(script);
}
String InspectorFrontendHost::localizedStringsURL()
String message;
arguments->getFirstArgumentAsString(message);
timelineAgent->didMarkTimeline(message);
- }
+ }
}
#if ENABLE(JAVASCRIPT_DEBUGGER)
}
}
-bool InspectorInstrumentation::profilerEnabledImpl(InspectorAgent* inspectorAgent)
-{
- if (!inspectorAgent->enabled())
- return false;
-
- InspectorProfilerAgent* profilerAgent = inspectorAgent->profilerAgent();
- if (!profilerAgent)
- return false;
-
- return profilerAgent->enabled();
-}
-
String InspectorInstrumentation::getCurrentUserInitiatedProfileNameImpl(InspectorAgent* inspectorAgent, bool incrementProfileNumber)
{
if (InspectorProfilerAgent* profilerAgent = inspectorAgent->profilerAgent())
return profilerAgent->getCurrentUserInitiatedProfileName(incrementProfileNumber);
return "";
}
+
+bool InspectorInstrumentation::profilerEnabledImpl(InspectorAgent* inspectorAgent)
+{
+ return inspectorAgent->profilerEnabled();
+}
#endif
#if ENABLE(DATABASE)
#if ENABLE(JAVASCRIPT_DEBUGGER)
static void addStartProfilingMessageToConsole(Page*, const String& title, unsigned lineNumber, const String& sourceURL);
static void addProfile(Page*, RefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>);
- static bool profilerEnabled(Page*);
static String getCurrentUserInitiatedProfileName(Page*, bool incrementProfileNumber);
+ static bool profilerEnabled(Page*);
#endif
#if ENABLE(DATABASE)
static void frontendCreated() { s_frontendCounter += 1; }
static void frontendDeleted() { s_frontendCounter -= 1; }
static bool hasFrontends() { return s_frontendCounter; }
+ static bool hasFrontend(Page*);
#else
static bool hasFrontends() { return false; }
+ static bool hasFrontend(Page*) { return false; }
#endif
private:
#if ENABLE(JAVASCRIPT_DEBUGGER)
static void addStartProfilingMessageToConsoleImpl(InspectorAgent*, const String& title, unsigned lineNumber, const String& sourceURL);
static void addProfileImpl(InspectorAgent*, RefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>);
- static bool profilerEnabledImpl(InspectorAgent*);
static String getCurrentUserInitiatedProfileNameImpl(InspectorAgent*, bool incrementProfileNumber);
+ static bool profilerEnabledImpl(InspectorAgent*);
#endif
#if ENABLE(DATABASE)
}
#endif
+inline bool InspectorInstrumentation::hasFrontend(Page* page)
+{
+#if ENABLE(INSPECTOR)
+ return inspectorAgentWithFrontendForPage(page);
+#else
+ return false;
+#endif
+}
+
+
#if ENABLE(INSPECTOR)
inline InspectorAgent* InspectorInstrumentation::inspectorAgentForContext(ScriptExecutionContext* context)
{
if (!m_frame->page())
return;
-#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR) && USE(JSC)
+#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)
if (Page* page = m_frame->page()) {
if (page->mainFrame() == m_frame)
- page->inspectorController()->resume();
+ m_frame->page()->inspectorController()->resume();
}
#endif
m_client->dispatchDidClearWindowObjectInWorld(world);
+#if ENABLE(INSPECTOR)
+ if (Page* page = m_frame->page())
+ page->inspectorController()->didClearWindowObjectInWorld(m_frame, world);
+#endif
+
InspectorInstrumentation::didClearWindowObjectInWorld(m_frame, world);
}
+2011-02-02 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: move InspectorController's methods from InspectorAgent to InspectorController.
+
+ https://bugs.webkit.org/show_bug.cgi?id=53169
+
+ Minor change enforced by major changes in WebCore/inspector/InspectorController.
+
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgentImpl::dispatchOnInspectorBackend):
+ * src/WebViewImpl.h:
+
2011-02-07 Alexey Marinichev <amarinichev@chromium.org>
Reviewed by Kenneth Russell.
void WebDevToolsAgentImpl::dispatchOnInspectorBackend(const WebString& message)
{
- inspectorController()->inspectorBackendDispatcher()->dispatch(message);
+ inspectorController()->dispatchMessageFromFrontend(message);
}
void WebDevToolsAgentImpl::inspectElementAt(const WebPoint& point)
namespace WebCore {
class ChromiumDataObject;
+class DocumentLoader;
class Frame;
class HistoryItem;
class HitTestResult;
+2011-02-02 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: move InspectorController's methods from InspectorAgent to InspectorController.
+
+ https://bugs.webkit.org/show_bug.cgi?id=53169
+
+ Minor change enforced by major changes in WebCore/inspector/InspectorController.
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ * webkit/webkitwebinspector.cpp:
+ (webkit_web_inspector_get_property):
+
2011-02-08 Carlos Garcia Campos <cgarcia@igalia.com>
Reviewed by Martin Robinson.
#include "Frame.h"
#include "InspectorController.h"
#include "NotImplemented.h"
+#include "Page.h"
#include "PlatformString.h"
#include "webkitversion.h"
#include "webkitwebinspector.h"
#include "HitTestResult.h"
#include "InspectorClientGtk.h"
#include "InspectorController.h"
+#include "InspectorInstrumentation.h"
#include "IntPoint.h"
#include "Page.h"
#include "RenderLayer.h"
#endif
break;
case PROP_TIMELINE_PROFILING_ENABLED:
- g_value_set_boolean(value, priv->page->inspectorController()->timelineAgent() != 0);
+ g_value_set_boolean(value, priv->page->inspectorController()->timelineProfilerEnabled());
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+2011-02-02 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: move InspectorController's methods from InspectorAgent to InspectorController.
+
+ https://bugs.webkit.org/show_bug.cgi?id=53169
+
+ Minor change enforced by major changes in WebCore/inspector/InspectorController.
+
+ * WebInspector/WebInspector.mm:
+ (-[WebInspector isTimelineProfilingEnabled]):
+
2011-02-07 Enrica Casucci <enrica@apple.com>
Reviewed Adam Roben and Darin Adler.
- (BOOL)isTimelineProfilingEnabled
{
if (Page* page = core(_webView))
- return page->inspectorController()->timelineAgent() ? YES : NO;
+ return page->inspectorController()->timelineProfilerEnabled() ? YES : NO;
return NO;
}
#include "InspectorClientQt.h"
#include "Frame.h"
-#include "InspectorBackendDispatcher.h"
#include "InspectorController.h"
#include "InspectorFrontend.h"
#include "InspectorServerQt.h"
#include "config.h"
#include "InspectorServerQt.h"
-#include "InspectorBackendDispatcher.h"
#include "InspectorClientQt.h"
#include "InspectorController.h"
#include "MD5.h"
#if ENABLE(INSPECTOR)
if (m_inspectorClient) {
InspectorController* inspectorController = m_inspectorClient->m_inspectedWebPage->d->page->inspectorController();
- inspectorController->inspectorBackendDispatcher()->dispatch(QString::fromUtf8(payload));
+ inspectorController->dispatchMessageFromFrontend(QString::fromUtf8(payload));
}
#endif
+2011-02-02 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: move InspectorController's methods from InspectorAgent to InspectorController.
+
+ https://bugs.webkit.org/show_bug.cgi?id=53169
+
+ Minor change enforced by major changes in WebCore/inspector/InspectorController.
+
+ * WebInspector.cpp:
+ (WebInspector::isTimelineProfilingEnabled):
+
2011-02-07 Enrica Casucci <enrica@apple.com>
Reviewed Adam Roben and Darin Adler.
if (!page)
return S_OK;
- *isEnabled = page->inspectorController()->timelineAgent() != 0;
+ *isEnabled = page->inspectorController()->timelineProfilerEnabled();
return S_OK;
}