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

Side by Side Diff: chrome/browser/ui/panels/panel_browser_window_cocoa.mm

Issue 9463022: Minimized panels should not open on Windows when activated by the OS (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: removed unnecessary include Created 8 years, 9 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_browser_window_cocoa.h" 5 #include "chrome/browser/ui/panels/panel_browser_window_cocoa.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/tabs/tab_strip_model.h" 8 #include "chrome/browser/tabs/tab_strip_model.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_list.h" 10 #include "chrome/browser/ui/browser_list.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 bool PanelBrowserWindowCocoa::IsPanelActive() const { 149 bool PanelBrowserWindowCocoa::IsPanelActive() const {
150 // TODO(dcheng): It seems like a lot of these methods can be called before 150 // TODO(dcheng): It seems like a lot of these methods can be called before
151 // our NSWindow is created. Do we really need to check in every one of these 151 // our NSWindow is created. Do we really need to check in every one of these
152 // methods if the NSWindow is created, or is there a better way to 152 // methods if the NSWindow is created, or is there a better way to
153 // gracefully handle this? 153 // gracefully handle this?
154 if (!is_shown_) 154 if (!is_shown_)
155 return false; 155 return false;
156 return [[controller_ window] isMainWindow]; 156 return [[controller_ window] isMainWindow];
157 } 157 }
158 158
159 void PanelBrowserWindowCocoa::PreventActivationByOS(bool prevent_activation) {
160 [controller_ preventBecomingKeyWindow:prevent_activation];
161 return;
162 }
163
159 gfx::NativeWindow PanelBrowserWindowCocoa::GetNativePanelHandle() { 164 gfx::NativeWindow PanelBrowserWindowCocoa::GetNativePanelHandle() {
160 return [controller_ window]; 165 return [controller_ window];
161 } 166 }
162 167
163 void PanelBrowserWindowCocoa::UpdatePanelTitleBar() { 168 void PanelBrowserWindowCocoa::UpdatePanelTitleBar() {
164 if (!is_shown_) 169 if (!is_shown_)
165 return; 170 return;
166 [controller_ updateTitleBar]; 171 [controller_ updateTitleBar];
167 } 172 }
168 173
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 return false; 379 return false;
375 } 380 }
376 381
377 bool NativePanelTestingCocoa::IsWindowSizeKnown() const { 382 bool NativePanelTestingCocoa::IsWindowSizeKnown() const {
378 return true; 383 return true;
379 } 384 }
380 385
381 bool NativePanelTestingCocoa::IsAnimatingBounds() const { 386 bool NativePanelTestingCocoa::IsAnimatingBounds() const {
382 return [native_panel_window_->controller_ isAnimatingBounds]; 387 return [native_panel_window_->controller_ isAnimatingBounds];
383 } 388 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_cocoa.h ('k') | chrome/browser/ui/panels/panel_browser_window_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698