| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/gfx/rect.h" | 5 #include "base/gfx/rect.h" |
| 6 #include "chrome/browser/browser_window_cocoa.h" | 6 #include "chrome/browser/browser_window_cocoa.h" |
| 7 #include "chrome/browser/browser_window_controller.h" | 7 #include "chrome/browser/browser_window_controller.h" |
| 8 | 8 |
| 9 BrowserWindowCocoa::BrowserWindowCocoa(BrowserWindowController* controller, | 9 BrowserWindowCocoa::BrowserWindowCocoa(BrowserWindowController* controller, |
| 10 NSWindow* window) | 10 NSWindow* window) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 gfx::Rect BrowserWindowCocoa::GetNormalBounds() const { | 70 gfx::Rect BrowserWindowCocoa::GetNormalBounds() const { |
| 71 // TODO(pinkerton): not sure if we can get the non-zoomed bounds, or if it | 71 // TODO(pinkerton): not sure if we can get the non-zoomed bounds, or if it |
| 72 // really matters. We may want to let Cocoa handle all this for us. | 72 // really matters. We may want to let Cocoa handle all this for us. |
| 73 NSRect frame = [window_ frame]; | 73 NSRect frame = [window_ frame]; |
| 74 NSScreen* screen = [window_ screen]; | 74 NSScreen* screen = [window_ screen]; |
| 75 gfx::Rect bounds(frame.origin.x, 0, frame.size.width, frame.size.height); | 75 gfx::Rect bounds(frame.origin.x, 0, frame.size.width, frame.size.height); |
| 76 bounds.set_y([screen frame].size.height + frame.size.height + frame.origin.y); | 76 bounds.set_y([screen frame].size.height + frame.size.height + frame.origin.y); |
| 77 return bounds; | 77 return bounds; |
| 78 } | 78 } |
| 79 | 79 |
| 80 bool BrowserWindowCocoa::IsMaximized() { | 80 bool BrowserWindowCocoa::IsMaximized() const { |
| 81 return [window_ isZoomed]; | 81 return [window_ isZoomed]; |
| 82 } | 82 } |
| 83 | 83 |
| 84 gfx::Rect BrowserWindowCocoa::GetRootWindowResizerRect() const { |
| 85 return gfx::Rect(); |
| 86 } |
| 87 |
| 84 LocationBar* BrowserWindowCocoa::GetLocationBar() const { | 88 LocationBar* BrowserWindowCocoa::GetLocationBar() const { |
| 85 return NULL; | 89 return NULL; |
| 86 } | 90 } |
| 87 | 91 |
| 88 void BrowserWindowCocoa::UpdateStopGoState(bool is_loading) { | 92 void BrowserWindowCocoa::UpdateStopGoState(bool is_loading) { |
| 89 } | 93 } |
| 90 | 94 |
| 91 void BrowserWindowCocoa::UpdateToolbar(TabContents* contents, | 95 void BrowserWindowCocoa::UpdateToolbar(TabContents* contents, |
| 92 bool should_restore_state) { | 96 bool should_restore_state) { |
| 93 } | 97 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 void BrowserWindowCocoa::ShowHTMLDialog(HtmlDialogContentsDelegate* delegate, | 144 void BrowserWindowCocoa::ShowHTMLDialog(HtmlDialogContentsDelegate* delegate, |
| 141 void* parent_window) { | 145 void* parent_window) { |
| 142 } | 146 } |
| 143 | 147 |
| 144 void BrowserWindowCocoa::DestroyBrowser() { | 148 void BrowserWindowCocoa::DestroyBrowser() { |
| 145 [controller_ destroyBrowser]; | 149 [controller_ destroyBrowser]; |
| 146 | 150 |
| 147 // at this point the controller is dead (autoreleased), so | 151 // at this point the controller is dead (autoreleased), so |
| 148 // make sure we don't try to reference it any more. | 152 // make sure we don't try to reference it any more. |
| 149 } | 153 } |
| OLD | NEW |