| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 } | 257 } |
| 258 | 258 |
| 259 void PanelBrowserWindowCocoa::EnsurePanelFullyVisible() { | 259 void PanelBrowserWindowCocoa::EnsurePanelFullyVisible() { |
| 260 [controller_ ensureFullyVisible]; | 260 [controller_ ensureFullyVisible]; |
| 261 } | 261 } |
| 262 | 262 |
| 263 void PanelBrowserWindowCocoa::SetPanelAppIconVisibility(bool visible) { | 263 void PanelBrowserWindowCocoa::SetPanelAppIconVisibility(bool visible) { |
| 264 // TODO(dimich): to be implemented. | 264 // TODO(dimich): to be implemented. |
| 265 } | 265 } |
| 266 | 266 |
| 267 void PanelBrowserWindowCocoa::SetPanelAlwaysOnTop(bool on_top) { |
| 268 [controller_ setAlwaysOnTop:on_top]; |
| 269 } |
| 270 |
| 267 void PanelBrowserWindowCocoa::DidCloseNativeWindow() { | 271 void PanelBrowserWindowCocoa::DidCloseNativeWindow() { |
| 268 DCHECK(!isClosed()); | 272 DCHECK(!isClosed()); |
| 269 panel_->OnNativePanelClosed(); | 273 panel_->OnNativePanelClosed(); |
| 270 controller_ = NULL; | 274 controller_ = NULL; |
| 271 } | 275 } |
| 272 | 276 |
| 273 gfx::Size PanelBrowserWindowCocoa::WindowSizeFromContentSize( | 277 gfx::Size PanelBrowserWindowCocoa::WindowSizeFromContentSize( |
| 274 const gfx::Size& content_size) const { | 278 const gfx::Size& content_size) const { |
| 275 NSWindow* window = [controller_ window]; | 279 NSWindow* window = [controller_ window]; |
| 276 NSRect content = NSMakeRect(0, 0, | 280 NSRect content = NSMakeRect(0, 0, |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 return false; | 380 return false; |
| 377 } | 381 } |
| 378 | 382 |
| 379 bool NativePanelTestingCocoa::IsWindowSizeKnown() const { | 383 bool NativePanelTestingCocoa::IsWindowSizeKnown() const { |
| 380 return true; | 384 return true; |
| 381 } | 385 } |
| 382 | 386 |
| 383 bool NativePanelTestingCocoa::IsAnimatingBounds() const { | 387 bool NativePanelTestingCocoa::IsAnimatingBounds() const { |
| 384 return [native_panel_window_->controller_ isAnimatingBounds]; | 388 return [native_panel_window_->controller_ isAnimatingBounds]; |
| 385 } | 389 } |
| OLD | NEW |