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

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

Issue 1659203002: Remove HostDesktopType from FindLastActive[WithProfile] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullptr Created 4 years, 10 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 BrowserWindowCocoa::~BrowserWindowCocoa() { 147 BrowserWindowCocoa::~BrowserWindowCocoa() {
148 browser_->search_model()->RemoveObserver(this); 148 browser_->search_model()->RemoveObserver(this);
149 } 149 }
150 150
151 void BrowserWindowCocoa::Show() { 151 void BrowserWindowCocoa::Show() {
152 // The Browser associated with this browser window must become the active 152 // The Browser associated with this browser window must become the active
153 // browser at the time |Show()| is called. This is the natural behaviour under 153 // browser at the time |Show()| is called. This is the natural behaviour under
154 // Windows, but |-makeKeyAndOrderFront:| won't send |-windowDidBecomeMain:| 154 // Windows, but |-makeKeyAndOrderFront:| won't send |-windowDidBecomeMain:|
155 // until we return to the runloop. Therefore any calls to 155 // until we return to the runloop. Therefore any calls to
156 // |chrome::FindLastActiveWithHostDesktopType| will return the previous 156 // |chrome::FindLastActive| will return the previous browser instead if we
157 // browser instead if we don't explicitly set it here. 157 // don't explicitly set it here.
158 BrowserList::SetLastActive(browser_); 158 BrowserList::SetLastActive(browser_);
159 159
160 bool is_session_restore = browser_->is_session_restore(); 160 bool is_session_restore = browser_->is_session_restore();
161 NSWindowAnimationBehavior saved_animation_behavior = 161 NSWindowAnimationBehavior saved_animation_behavior =
162 NSWindowAnimationBehaviorDefault; 162 NSWindowAnimationBehaviorDefault;
163 bool did_save_animation_behavior = false; 163 bool did_save_animation_behavior = false;
164 // Turn off swishing when restoring windows or showing an app. 164 // Turn off swishing when restoring windows or showing an app.
165 if ((is_session_restore || browser_->is_app()) && 165 if ((is_session_restore || browser_->is_app()) &&
166 [window() respondsToSelector:@selector(animationBehavior)] && 166 [window() respondsToSelector:@selector(animationBehavior)] &&
167 [window() respondsToSelector:@selector(setAnimationBehavior:)]) { 167 [window() respondsToSelector:@selector(setAnimationBehavior:)]) {
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 void BrowserWindowCocoa::UnhideDownloadShelf() { 898 void BrowserWindowCocoa::UnhideDownloadShelf() {
899 GetDownloadShelf()->Unhide(); 899 GetDownloadShelf()->Unhide();
900 } 900 }
901 901
902 void BrowserWindowCocoa::HideDownloadShelf() { 902 void BrowserWindowCocoa::HideDownloadShelf() {
903 GetDownloadShelf()->Hide(); 903 GetDownloadShelf()->Hide();
904 StatusBubble* statusBubble = GetStatusBubble(); 904 StatusBubble* statusBubble = GetStatusBubble();
905 if (statusBubble) 905 if (statusBubble)
906 statusBubble->Hide(); 906 statusBubble->Hide();
907 } 907 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_finder.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698