OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |