| 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/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/panels/panel.h" | 9 #include "chrome/browser/ui/panels/panel.h" |
| 10 #import "chrome/browser/ui/panels/panel_window_controller_cocoa.h" | 10 #import "chrome/browser/ui/panels/panel_window_controller_cocoa.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 gfx::Rect PanelBrowserWindowCocoa::GetPanelBounds() const { | 77 gfx::Rect PanelBrowserWindowCocoa::GetPanelBounds() const { |
| 78 return bounds_; | 78 return bounds_; |
| 79 } | 79 } |
| 80 | 80 |
| 81 void PanelBrowserWindowCocoa::SetPanelBounds(const gfx::Rect& bounds) { | 81 void PanelBrowserWindowCocoa::SetPanelBounds(const gfx::Rect& bounds) { |
| 82 bounds_ = bounds; | 82 bounds_ = bounds; |
| 83 NSRect frame = ConvertCoordinatesToCocoa(bounds); | 83 NSRect frame = ConvertCoordinatesToCocoa(bounds); |
| 84 [[controller_ window] setFrame:frame display:YES animate:YES]; | 84 [[controller_ window] setFrame:frame display:YES animate:YES]; |
| 85 } | 85 } |
| 86 | 86 |
| 87 void PanelBrowserWindowCocoa::MinimizePanel() { | 87 void PanelBrowserWindowCocoa::OnPanelExpansionStateChanged( |
| 88 Panel::ExpansionState expansion_state) { |
| 88 NOTIMPLEMENTED(); | 89 NOTIMPLEMENTED(); |
| 89 } | 90 } |
| 90 | 91 |
| 91 void PanelBrowserWindowCocoa::RestorePanel() { | 92 bool PanelBrowserWindowCocoa::ShouldBringUpPanelTitleBar(int mouse_x, |
| 93 int mouse_y) const { |
| 92 NOTIMPLEMENTED(); | 94 NOTIMPLEMENTED(); |
| 95 return false; |
| 93 } | 96 } |
| 94 | 97 |
| 95 void PanelBrowserWindowCocoa::ClosePanel() { | 98 void PanelBrowserWindowCocoa::ClosePanel() { |
| 96 if (isClosed()) | 99 if (isClosed()) |
| 97 return; | 100 return; |
| 98 | 101 |
| 99 NSWindow* window = [controller_ window]; | 102 NSWindow* window = [controller_ window]; |
| 100 NSRect frame = [window frame]; | 103 NSRect frame = [window frame]; |
| 101 frame.size.height = kMinimumWindowSize; | 104 frame.size.height = kMinimumWindowSize; |
| 102 [window setFrame:frame display:YES animate:YES]; | 105 [window setFrame:frame display:YES animate:YES]; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 138 |
| 136 void PanelBrowserWindowCocoa::FlashPanelFrame() { | 139 void PanelBrowserWindowCocoa::FlashPanelFrame() { |
| 137 NOTIMPLEMENTED(); | 140 NOTIMPLEMENTED(); |
| 138 } | 141 } |
| 139 | 142 |
| 140 void PanelBrowserWindowCocoa::DestroyPanelBrowser() { | 143 void PanelBrowserWindowCocoa::DestroyPanelBrowser() { |
| 141 [controller_ close]; | 144 [controller_ close]; |
| 142 controller_ = NULL; | 145 controller_ = NULL; |
| 143 } | 146 } |
| 144 | 147 |
| OLD | NEW |