| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 } | 239 } |
| 240 | 240 |
| 241 Browser* PanelBrowserWindowCocoa::GetPanelBrowser() const { | 241 Browser* PanelBrowserWindowCocoa::GetPanelBrowser() const { |
| 242 return browser(); | 242 return browser(); |
| 243 } | 243 } |
| 244 | 244 |
| 245 void PanelBrowserWindowCocoa::DestroyPanelBrowser() { | 245 void PanelBrowserWindowCocoa::DestroyPanelBrowser() { |
| 246 [controller_ close]; | 246 [controller_ close]; |
| 247 } | 247 } |
| 248 | 248 |
| 249 gfx::Size PanelBrowserWindowCocoa::GetIconifiedPanelSize() const { |
| 250 // TODO(dimich): to be implemented. |
| 251 return gfx::Size(); |
| 252 } |
| 253 |
| 254 void PanelBrowserWindowCocoa::EnsurePanelFullyVisible() { |
| 255 // TODO(dimich): to be implemented. |
| 256 } |
| 257 |
| 258 void PanelBrowserWindowCocoa::UpdatePanelIconInDesktopBar( |
| 259 PanelIconState state) { |
| 260 // TODO(dimich): to be implemented. |
| 261 } |
| 262 |
| 249 void PanelBrowserWindowCocoa::DidCloseNativeWindow() { | 263 void PanelBrowserWindowCocoa::DidCloseNativeWindow() { |
| 250 DCHECK(!isClosed()); | 264 DCHECK(!isClosed()); |
| 251 panel_->OnNativePanelClosed(); | 265 panel_->OnNativePanelClosed(); |
| 252 controller_ = NULL; | 266 controller_ = NULL; |
| 253 } | 267 } |
| 254 | 268 |
| 255 gfx::Size PanelBrowserWindowCocoa::WindowSizeFromContentSize( | 269 gfx::Size PanelBrowserWindowCocoa::WindowSizeFromContentSize( |
| 256 const gfx::Size& content_size) const { | 270 const gfx::Size& content_size) const { |
| 257 NSWindow* window = [controller_ window]; | 271 NSWindow* window = [controller_ window]; |
| 258 NSRect content = NSMakeRect(0, 0, | 272 NSRect content = NSMakeRect(0, 0, |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 return false; | 363 return false; |
| 350 } | 364 } |
| 351 | 365 |
| 352 bool NativePanelTestingCocoa::IsWindowSizeKnown() const { | 366 bool NativePanelTestingCocoa::IsWindowSizeKnown() const { |
| 353 return true; | 367 return true; |
| 354 } | 368 } |
| 355 | 369 |
| 356 bool NativePanelTestingCocoa::IsAnimatingBounds() const { | 370 bool NativePanelTestingCocoa::IsAnimatingBounds() const { |
| 357 return [native_panel_window_->controller_ isAnimatingBounds]; | 371 return [native_panel_window_->controller_ isAnimatingBounds]; |
| 358 } | 372 } |
| OLD | NEW |