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

Side by Side Diff: content/shell/browser/shell_devtools_frontend.cc

Issue 1153813003: Add user_gesture param to WebContentsDelegate::ActivateContents Base URL: https://chromium.googlesource.com/chromium/src.git@ug1_WebContentsImpl_Activate
Patch Set: Update callers Created 5 years, 7 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
« no previous file with comments | « content/shell/browser/shell.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/shell/browser/shell_devtools_frontend.h" 5 #include "content/shell/browser/shell_devtools_frontend.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 devtools_http_handler::DevToolsHttpHandler* http_handler = 110 devtools_http_handler::DevToolsHttpHandler* http_handler =
111 ShellContentBrowserClient::Get() 111 ShellContentBrowserClient::Get()
112 ->shell_browser_main_parts() 112 ->shell_browser_main_parts()
113 ->devtools_http_handler(); 113 ->devtools_http_handler();
114 shell->LoadURL(http_handler->GetFrontendURL("/devtools/devtools.html")); 114 shell->LoadURL(http_handler->GetFrontendURL("/devtools/devtools.html"));
115 115
116 return devtools_frontend; 116 return devtools_frontend;
117 } 117 }
118 118
119 void ShellDevToolsFrontend::Activate() { 119 void ShellDevToolsFrontend::Activate() {
120 frontend_shell_->ActivateContents(web_contents()); 120 frontend_shell_->ActivateContents(web_contents(), true /* user_gesture */);
121 } 121 }
122 122
123 void ShellDevToolsFrontend::Focus() { 123 void ShellDevToolsFrontend::Focus() {
124 web_contents()->Focus(); 124 web_contents()->Focus();
125 } 125 }
126 126
127 void ShellDevToolsFrontend::InspectElementAt(int x, int y) { 127 void ShellDevToolsFrontend::InspectElementAt(int x, int y) {
128 if (agent_host_) 128 if (agent_host_)
129 agent_host_->InspectElement(x, y); 129 agent_host_->InspectElement(x, y);
130 } 130 }
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 CallClientFunction("DevToolsAPI.embedderMessageAck", 330 CallClientFunction("DevToolsAPI.embedderMessageAck",
331 &id_value, arg, nullptr); 331 &id_value, arg, nullptr);
332 } 332 }
333 333
334 void ShellDevToolsFrontend::AgentHostClosed( 334 void ShellDevToolsFrontend::AgentHostClosed(
335 DevToolsAgentHost* agent_host, bool replaced) { 335 DevToolsAgentHost* agent_host, bool replaced) {
336 frontend_shell_->Close(); 336 frontend_shell_->Close();
337 } 337 }
338 338
339 } // namespace content 339 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698