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

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

Issue 9593001: Revert 124790 - Minimized panels should not open on Windows when activated by the OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
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
164 gfx::NativeWindow PanelBrowserWindowCocoa::GetNativePanelHandle() { 159 gfx::NativeWindow PanelBrowserWindowCocoa::GetNativePanelHandle() {
165 return [controller_ window]; 160 return [controller_ window];
166 } 161 }
167 162
168 void PanelBrowserWindowCocoa::UpdatePanelTitleBar() { 163 void PanelBrowserWindowCocoa::UpdatePanelTitleBar() {
169 if (!is_shown_) 164 if (!is_shown_)
170 return; 165 return;
171 [controller_ updateTitleBar]; 166 [controller_ updateTitleBar];
172 } 167 }
173 168
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 return false; 374 return false;
380 } 375 }
381 376
382 bool NativePanelTestingCocoa::IsWindowSizeKnown() const { 377 bool NativePanelTestingCocoa::IsWindowSizeKnown() const {
383 return true; 378 return true;
384 } 379 }
385 380
386 bool NativePanelTestingCocoa::IsAnimatingBounds() const { 381 bool NativePanelTestingCocoa::IsAnimatingBounds() const {
387 return [native_panel_window_->controller_ isAnimatingBounds]; 382 return [native_panel_window_->controller_ isAnimatingBounds];
388 } 383 }
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