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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 1158523002: Add user_gesture param to BaseWindow::Show Base URL: https://chromium.googlesource.com/chromium/src.git@ug3_BaseWindow_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/cocoa/browser_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #import "base/mac/sdk_forward_declarations.h" 10 #import "base/mac/sdk_forward_declarations.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 &bounds, 136 &bounds,
137 &initial_show_state_); 137 &initial_show_state_);
138 138
139 browser_->search_model()->AddObserver(this); 139 browser_->search_model()->AddObserver(this);
140 } 140 }
141 141
142 BrowserWindowCocoa::~BrowserWindowCocoa() { 142 BrowserWindowCocoa::~BrowserWindowCocoa() {
143 browser_->search_model()->RemoveObserver(this); 143 browser_->search_model()->RemoveObserver(this);
144 } 144 }
145 145
146 void BrowserWindowCocoa::Show() { 146 void BrowserWindowCocoa::Show(bool user_gesture) {
147 // The Browser associated with this browser window must become the active 147 // The Browser associated with this browser window must become the active
148 // browser at the time |Show()| is called. This is the natural behaviour under 148 // browser at the time |Show()| is called. This is the natural behaviour under
149 // Windows, but |-makeKeyAndOrderFront:| won't send |-windowDidBecomeMain:| 149 // Windows, but |-makeKeyAndOrderFront:| won't send |-windowDidBecomeMain:|
150 // until we return to the runloop. Therefore any calls to 150 // until we return to the runloop. Therefore any calls to
151 // |chrome::FindLastActiveWithHostDesktopType| will return the previous 151 // |chrome::FindLastActiveWithHostDesktopType| will return the previous
152 // browser instead if we don't explicitly set it here. 152 // browser instead if we don't explicitly set it here.
153 BrowserList::SetLastActive(browser_); 153 BrowserList::SetLastActive(browser_);
154 154
155 bool is_session_restore = browser_->is_session_restore(); 155 bool is_session_restore = browser_->is_session_restore();
156 NSWindowAnimationBehavior saved_animation_behavior = 156 NSWindowAnimationBehavior saved_animation_behavior =
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 void BrowserWindowCocoa::UnhideDownloadShelf() { 833 void BrowserWindowCocoa::UnhideDownloadShelf() {
834 GetDownloadShelf()->Unhide(); 834 GetDownloadShelf()->Unhide();
835 } 835 }
836 836
837 void BrowserWindowCocoa::HideDownloadShelf() { 837 void BrowserWindowCocoa::HideDownloadShelf() {
838 GetDownloadShelf()->Hide(); 838 GetDownloadShelf()->Hide();
839 StatusBubble* statusBubble = GetStatusBubble(); 839 StatusBubble* statusBubble = GetStatusBubble();
840 if (statusBubble) 840 if (statusBubble)
841 statusBubble->Hide(); 841 statusBubble->Hide();
842 } 842 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.h ('k') | chrome/browser/ui/extensions/application_launch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698