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/cocoa/browser_window_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 } else { | 218 } else { |
219 [NSApp cancelUserAttentionRequest:attention_request_id_]; | 219 [NSApp cancelUserAttentionRequest:attention_request_id_]; |
220 attention_request_id_ = 0; | 220 attention_request_id_ = 0; |
221 } | 221 } |
222 } | 222 } |
223 | 223 |
224 bool BrowserWindowCocoa::IsAlwaysOnTop() const { | 224 bool BrowserWindowCocoa::IsAlwaysOnTop() const { |
225 return false; | 225 return false; |
226 } | 226 } |
227 | 227 |
| 228 gfx::Rect BrowserWindowCocoa::ContentBoundsForWindowBounds( |
| 229 const gfx::Rect& window_bounds) const { |
| 230 return window_bounds; |
| 231 } |
| 232 |
| 233 gfx::Rect BrowserWindowCocoa::WindowBoundsForContentBounds( |
| 234 const gfx::Rect& content_bounds) const { |
| 235 return content_bounds; |
| 236 } |
| 237 |
228 bool BrowserWindowCocoa::IsActive() const { | 238 bool BrowserWindowCocoa::IsActive() const { |
229 return [window() isKeyWindow]; | 239 return [window() isKeyWindow]; |
230 } | 240 } |
231 | 241 |
232 gfx::NativeWindow BrowserWindowCocoa::GetNativeWindow() { | 242 gfx::NativeWindow BrowserWindowCocoa::GetNativeWindow() { |
233 return window(); | 243 return window(); |
234 } | 244 } |
235 | 245 |
236 BrowserWindowTesting* BrowserWindowCocoa::GetBrowserWindowTesting() { | 246 BrowserWindowTesting* BrowserWindowCocoa::GetBrowserWindowTesting() { |
237 return NULL; | 247 return NULL; |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 AvatarMenuBubbleController* menu = | 667 AvatarMenuBubbleController* menu = |
658 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ | 668 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ |
659 anchoredAt:point]; | 669 anchoredAt:point]; |
660 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; | 670 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; |
661 [menu showWindow:nil]; | 671 [menu showWindow:nil]; |
662 } | 672 } |
663 | 673 |
664 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { | 674 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { |
665 [[controller_ avatarButtonController] showAvatarBubble]; | 675 [[controller_ avatarButtonController] showAvatarBubble]; |
666 } | 676 } |
OLD | NEW |