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

Side by Side Diff: chrome/browser/ui/panels/panel_host.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 (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/ui/panels/panel_host.h" 5 #include "chrome/browser/ui/panels/panel_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // window. 150 // window.
151 navigate_params.disposition = 151 navigate_params.disposition =
152 disposition == NEW_BACKGROUND_TAB ? disposition : NEW_FOREGROUND_TAB; 152 disposition == NEW_BACKGROUND_TAB ? disposition : NEW_FOREGROUND_TAB;
153 153
154 navigate_params.window_bounds = initial_rect; 154 navigate_params.window_bounds = initial_rect;
155 navigate_params.user_gesture = user_gesture; 155 navigate_params.user_gesture = user_gesture;
156 navigate_params.extension_app_id = panel_->extension_id(); 156 navigate_params.extension_app_id = panel_->extension_id();
157 chrome::Navigate(&navigate_params); 157 chrome::Navigate(&navigate_params);
158 } 158 }
159 159
160 void PanelHost::ActivateContents(content::WebContents* contents) { 160 void PanelHost::ActivateContents(content::WebContents* contents,
161 bool user_gesture) {
161 panel_->Activate(); 162 panel_->Activate();
162 } 163 }
163 164
164 void PanelHost::DeactivateContents(content::WebContents* contents) { 165 void PanelHost::DeactivateContents(content::WebContents* contents) {
165 panel_->Deactivate(); 166 panel_->Deactivate();
166 } 167 }
167 168
168 void PanelHost::LoadingStateChanged(content::WebContents* source, 169 void PanelHost::LoadingStateChanged(content::WebContents* source,
169 bool to_different_document) { 170 bool to_different_document) {
170 bool is_loading = source->IsLoading() && to_different_document; 171 bool is_loading = source->IsLoading() && to_different_document;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 } 262 }
262 263
263 void PanelHost::StopLoading() { 264 void PanelHost::StopLoading() {
264 content::RecordAction(UserMetricsAction("Stop")); 265 content::RecordAction(UserMetricsAction("Stop"));
265 web_contents_->Stop(); 266 web_contents_->Stop();
266 } 267 }
267 268
268 void PanelHost::Zoom(content::PageZoom zoom) { 269 void PanelHost::Zoom(content::PageZoom zoom) {
269 ui_zoom::PageZoom::Zoom(web_contents_.get(), zoom); 270 ui_zoom::PageZoom::Zoom(web_contents_.get(), zoom);
270 } 271 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_host.h ('k') | chrome/browser/ui/views/chrome_javascript_native_dialog_factory_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698