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

Side by Side Diff: chrome/browser/devtools/devtools_window.cc

Issue 2653783003: Fix front-end host creation upon navigation (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/devtools/devtools_window.h" 5 #include "chrome/browser/devtools/devtools_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 url_string += "&isSharedWorker=true"; 900 url_string += "&isSharedWorker=true";
901 if (v8_only_frontend) 901 if (v8_only_frontend)
902 url_string += "&v8only=true"; 902 url_string += "&v8only=true";
903 if (remote_frontend.size()) { 903 if (remote_frontend.size()) {
904 url_string += "&remoteFrontend=true"; 904 url_string += "&remoteFrontend=true";
905 } else { 905 } else {
906 url_string += "&remoteBase=" + DevToolsUI::GetRemoteBaseURL().spec(); 906 url_string += "&remoteBase=" + DevToolsUI::GetRemoteBaseURL().spec();
907 } 907 }
908 if (can_dock) 908 if (can_dock)
909 url_string += "&can_dock=true"; 909 url_string += "&can_dock=true";
910 return DevToolsUI::SanitizeFrontendURL(GURL(url_string)); 910 return DevToolsUIBindings::SanitizeFrontendURL(GURL(url_string));
911 } 911 }
912 912
913 // static 913 // static
914 DevToolsWindow* DevToolsWindow::FindDevToolsWindow( 914 DevToolsWindow* DevToolsWindow::FindDevToolsWindow(
915 DevToolsAgentHost* agent_host) { 915 DevToolsAgentHost* agent_host) {
916 if (!agent_host || g_instances == NULL) 916 if (!agent_host || g_instances == NULL)
917 return NULL; 917 return NULL;
918 DevToolsWindows* instances = g_instances.Pointer(); 918 DevToolsWindows* instances = g_instances.Pointer();
919 for (DevToolsWindows::iterator it(instances->begin()); it != instances->end(); 919 for (DevToolsWindows::iterator it(instances->begin()); it != instances->end();
920 ++it) { 920 ++it) {
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) { 1382 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) {
1383 // Only route reload via front-end if the agent is attached. 1383 // Only route reload via front-end if the agent is attached.
1384 WebContents* wc = GetInspectedWebContents(); 1384 WebContents* wc = GetInspectedWebContents();
1385 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING) 1385 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING)
1386 return false; 1386 return false;
1387 base::FundamentalValue bypass_cache_value(bypass_cache); 1387 base::FundamentalValue bypass_cache_value(bypass_cache);
1388 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage", 1388 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage",
1389 &bypass_cache_value, nullptr, nullptr); 1389 &bypass_cache_value, nullptr, nullptr);
1390 return true; 1390 return true;
1391 } 1391 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_ui_bindings_unittest.cc ('k') | chrome/browser/devtools/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698