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

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_api.cc

Issue 1149263003: Add user_gesture param to BaseWindow::Activate Base URL: https://chromium.googlesource.com/chromium/src.git@ug2_WebContentsDelegate_ActivateContents
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/extensions/api/tabs/tabs_api.h" 5 #include "chrome/browser/extensions/api/tabs/tabs_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 // general solution is needed. See http://crbug.com/251813 . 764 // general solution is needed. See http://crbug.com/251813 .
765 controller->window()->SetBounds(bounds); 765 controller->window()->SetBounds(bounds);
766 } 766 }
767 767
768 if (params->update_info.focused) { 768 if (params->update_info.focused) {
769 if (*params->update_info.focused) { 769 if (*params->update_info.focused) {
770 if (show_state == ui::SHOW_STATE_MINIMIZED) { 770 if (show_state == ui::SHOW_STATE_MINIMIZED) {
771 error_ = keys::kInvalidWindowStateError; 771 error_ = keys::kInvalidWindowStateError;
772 return false; 772 return false;
773 } 773 }
774 controller->window()->Activate(); 774 controller->window()->Activate(user_gesture());
775 } else { 775 } else {
776 if (show_state == ui::SHOW_STATE_MAXIMIZED || 776 if (show_state == ui::SHOW_STATE_MAXIMIZED ||
777 show_state == ui::SHOW_STATE_FULLSCREEN) { 777 show_state == ui::SHOW_STATE_FULLSCREEN) {
778 error_ = keys::kInvalidWindowStateError; 778 error_ = keys::kInvalidWindowStateError;
779 return false; 779 return false;
780 } 780 }
781 controller->window()->Deactivate(); 781 controller->window()->Deactivate();
782 } 782 }
783 } 783 }
784 784
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2005 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); 2005 ZoomModeToZoomSettings(zoom_mode, &zoom_settings);
2006 zoom_settings.default_zoom_factor.reset(new double( 2006 zoom_settings.default_zoom_factor.reset(new double(
2007 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); 2007 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel())));
2008 2008
2009 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); 2009 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings);
2010 SendResponse(true); 2010 SendResponse(true);
2011 return true; 2011 return true;
2012 } 2012 }
2013 2013
2014 } // namespace extensions 2014 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698