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

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

Issue 2607833002: DevTools: move front-end URL handling to DevToolsUIBindingds (Closed)
Patch Set: review comments addressed 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 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 url_string += "&v8only=true"; 919 url_string += "&v8only=true";
920 if (remote_frontend.size()) { 920 if (remote_frontend.size()) {
921 url_string += "&remoteFrontend=true"; 921 url_string += "&remoteFrontend=true";
922 } else { 922 } else {
923 url_string += "&remoteBase=" + DevToolsUI::GetRemoteBaseURL().spec(); 923 url_string += "&remoteBase=" + DevToolsUI::GetRemoteBaseURL().spec();
924 } 924 }
925 if (can_dock) 925 if (can_dock)
926 url_string += "&can_dock=true"; 926 url_string += "&can_dock=true";
927 if (panel.size()) 927 if (panel.size())
928 url_string += "&panel=" + panel; 928 url_string += "&panel=" + panel;
929 return DevToolsUI::SanitizeFrontendURL(GURL(url_string)); 929 return DevToolsUIBindings::SanitizeFrontendURL(GURL(url_string));
930 } 930 }
931 931
932 // static 932 // static
933 DevToolsWindow* DevToolsWindow::FindDevToolsWindow( 933 DevToolsWindow* DevToolsWindow::FindDevToolsWindow(
934 DevToolsAgentHost* agent_host) { 934 DevToolsAgentHost* agent_host) {
935 if (!agent_host || g_instances == NULL) 935 if (!agent_host || g_instances == NULL)
936 return NULL; 936 return NULL;
937 DevToolsWindows* instances = g_instances.Pointer(); 937 DevToolsWindows* instances = g_instances.Pointer();
938 for (DevToolsWindows::iterator it(instances->begin()); it != instances->end(); 938 for (DevToolsWindows::iterator it(instances->begin()); it != instances->end();
939 ++it) { 939 ++it) {
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) { 1391 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) {
1392 // Only route reload via front-end if the agent is attached. 1392 // Only route reload via front-end if the agent is attached.
1393 WebContents* wc = GetInspectedWebContents(); 1393 WebContents* wc = GetInspectedWebContents();
1394 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING) 1394 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING)
1395 return false; 1395 return false;
1396 base::FundamentalValue bypass_cache_value(bypass_cache); 1396 base::FundamentalValue bypass_cache_value(bypass_cache);
1397 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage", 1397 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage",
1398 &bypass_cache_value, nullptr, nullptr); 1398 &bypass_cache_value, nullptr, nullptr);
1399 return true; 1399 return true;
1400 } 1400 }
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