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

Side by Side Diff: chrome/browser/devtools/devtools_ui_bindings.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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_ui_bindings.h" 5 #include "chrome/browser/devtools/devtools_ui_bindings.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/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 void InspectedContentsClosing() override; 214 void InspectedContentsClosing() override;
215 void OnLoadCompleted() override {} 215 void OnLoadCompleted() override {}
216 InfoBarService* GetInfoBarService() override; 216 InfoBarService* GetInfoBarService() override;
217 void RenderProcessGone(bool crashed) override {} 217 void RenderProcessGone(bool crashed) override {}
218 218
219 content::WebContents* web_contents_; 219 content::WebContents* web_contents_;
220 DISALLOW_COPY_AND_ASSIGN(DefaultBindingsDelegate); 220 DISALLOW_COPY_AND_ASSIGN(DefaultBindingsDelegate);
221 }; 221 };
222 222
223 void DefaultBindingsDelegate::ActivateWindow() { 223 void DefaultBindingsDelegate::ActivateWindow() {
224 web_contents_->GetDelegate()->ActivateContents(web_contents_); 224 web_contents_->GetDelegate()->ActivateContents(web_contents_,
225 true /* user_gesture */);
225 web_contents_->Focus(); 226 web_contents_->Focus();
226 } 227 }
227 228
228 void DefaultBindingsDelegate::OpenInNewTab(const std::string& url) { 229 void DefaultBindingsDelegate::OpenInNewTab(const std::string& url) {
229 content::OpenURLParams params( 230 content::OpenURLParams params(
230 GURL(url), content::Referrer(), NEW_FOREGROUND_TAB, 231 GURL(url), content::Referrer(), NEW_FOREGROUND_TAB,
231 ui::PAGE_TRANSITION_LINK, false); 232 ui::PAGE_TRANSITION_LINK, false);
232 Browser* browser = FindBrowser(web_contents_); 233 Browser* browser = FindBrowser(web_contents_);
233 browser->OpenURL(params); 234 browser->OpenURL(params);
234 } 235 }
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 if (frontend_loaded_) 1050 if (frontend_loaded_)
1050 return; 1051 return;
1051 frontend_loaded_ = true; 1052 frontend_loaded_ = true;
1052 1053
1053 // Call delegate first - it seeds importants bit of information. 1054 // Call delegate first - it seeds importants bit of information.
1054 delegate_->OnLoadCompleted(); 1055 delegate_->OnLoadCompleted();
1055 1056
1056 UpdateTheme(); 1057 UpdateTheme();
1057 AddDevToolsExtensionsToClient(); 1058 AddDevToolsExtensionsToClient();
1058 } 1059 }
OLDNEW
« no previous file with comments | « android_webview/native/aw_web_contents_delegate.cc ('k') | chrome/browser/devtools/devtools_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698