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 "base/logging.h" | 6 #include "base/logging.h" |
7 #include "base/sys_string_conversions.h" | 7 #include "base/sys_string_conversions.h" |
8 #include "chrome/browser/bookmarks/bookmark_utils.h" | 8 #include "chrome/browser/bookmarks/bookmark_utils.h" |
9 #include "chrome/browser/cocoa/browser_window_cocoa.h" | 9 #include "chrome/browser/cocoa/browser_window_cocoa.h" |
10 #import "chrome/browser/cocoa/browser_window_controller.h" | 10 #import "chrome/browser/cocoa/browser_window_controller.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 gfx::Rect bounds(frame.origin.x, 0, frame.size.width, frame.size.height); | 116 gfx::Rect bounds(frame.origin.x, 0, frame.size.width, frame.size.height); |
117 bounds.set_y([screen frame].size.height - frame.origin.y - frame.size.height); | 117 bounds.set_y([screen frame].size.height - frame.origin.y - frame.size.height); |
118 return bounds; | 118 return bounds; |
119 } | 119 } |
120 | 120 |
121 bool BrowserWindowCocoa::IsMaximized() const { | 121 bool BrowserWindowCocoa::IsMaximized() const { |
122 return [window_ isZoomed]; | 122 return [window_ isZoomed]; |
123 } | 123 } |
124 | 124 |
125 void BrowserWindowCocoa::SetFullscreen(bool fullscreen) { | 125 void BrowserWindowCocoa::SetFullscreen(bool fullscreen) { |
126 NOTIMPLEMENTED(); | 126 [controller_ setFullscreen:fullscreen]; |
127 } | 127 } |
128 | 128 |
129 bool BrowserWindowCocoa::IsFullscreen() const { | 129 bool BrowserWindowCocoa::IsFullscreen() const { |
130 NOTIMPLEMENTED(); | 130 return !![controller_ isFullscreen]; |
131 return false; | |
132 } | 131 } |
133 | 132 |
134 gfx::Rect BrowserWindowCocoa::GetRootWindowResizerRect() const { | 133 gfx::Rect BrowserWindowCocoa::GetRootWindowResizerRect() const { |
135 NSRect tabRect = [controller_ selectedTabGrowBoxRect]; | 134 NSRect tabRect = [controller_ selectedTabGrowBoxRect]; |
136 return gfx::Rect(NSRectToCGRect(tabRect)); | 135 return gfx::Rect(NSRectToCGRect(tabRect)); |
137 } | 136 } |
138 | 137 |
139 void BrowserWindowCocoa::ConfirmAddSearchProvider( | 138 void BrowserWindowCocoa::ConfirmAddSearchProvider( |
140 const TemplateURL* template_url, | 139 const TemplateURL* template_url, |
141 Profile* profile) { | 140 Profile* profile) { |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 break; | 274 break; |
276 } | 275 } |
277 } | 276 } |
278 | 277 |
279 void BrowserWindowCocoa::DestroyBrowser() { | 278 void BrowserWindowCocoa::DestroyBrowser() { |
280 [controller_ destroyBrowser]; | 279 [controller_ destroyBrowser]; |
281 | 280 |
282 // at this point the controller is dead (autoreleased), so | 281 // at this point the controller is dead (autoreleased), so |
283 // make sure we don't try to reference it any more. | 282 // make sure we don't try to reference it any more. |
284 } | 283 } |
OLD | NEW |