Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Unified Diff: WebKit/chromium/src/WebDevToolsAgentImpl.cpp

Issue 3389017: Merge 67623 - 2010-09-16 Yury Semikhatsky <yurys@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « WebKit/chromium/src/WebDevToolsAgentImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebKit/chromium/src/WebDevToolsAgentImpl.cpp
===================================================================
--- WebKit/chromium/src/WebDevToolsAgentImpl.cpp (revision 67697)
+++ WebKit/chromium/src/WebDevToolsAgentImpl.cpp (working copy)
@@ -223,9 +223,7 @@
void WebDevToolsAgentImpl::frontendLoaded()
{
- inspectorController()->connectFrontend();
- // We know that by this time injected script has already been pushed to the backend.
- m_client->runtimePropertyChanged(kFrontendConnectedFeatureName, inspectorController()->injectedScriptHost()->injectedScriptSource());
+ connectFrontend(false);
}
void WebDevToolsAgentImpl::didNavigate()
@@ -268,7 +266,7 @@
ic->disableResourceTracking(false /* not sticky */);
} else if (name == kFrontendConnectedFeatureName && !inspectorController()->hasFrontend()) {
inspectorController()->injectedScriptHost()->setInjectedScriptSource(value);
- frontendLoaded();
+ connectFrontend(true);
}
}
@@ -278,7 +276,7 @@
InspectorController* ic = inspectorController();
if (enabled) {
if (!ic->hasFrontend())
- frontendLoaded();
+ connectFrontend(true);
m_resourceTrackingWasEnabled = ic->resourceTrackingEnabled();
ic->startTimelineProfiler();
if (!m_resourceTrackingWasEnabled) {
@@ -298,6 +296,16 @@
enabled ? String("true") : String("false"));
}
+void WebDevToolsAgentImpl::connectFrontend(bool afterNavigation)
+{
+ if (afterNavigation)
+ inspectorController()->reuseFrontend();
+ else
+ inspectorController()->connectFrontend();
+ // We know that by this time injected script has already been pushed to the backend.
+ m_client->runtimePropertyChanged(kFrontendConnectedFeatureName, inspectorController()->injectedScriptHost()->injectedScriptSource());
+}
+
WebCore::InspectorController* WebDevToolsAgentImpl::inspectorController()
{
if (Page* page = m_webViewImpl->page())
« no previous file with comments | « WebKit/chromium/src/WebDevToolsAgentImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698