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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 } | 242 } |
243 | 243 |
244 void BrowserWindowCocoa::UpdateLoadingAnimations(bool should_animate) { | 244 void BrowserWindowCocoa::UpdateLoadingAnimations(bool should_animate) { |
245 // Do nothing on Mac. | 245 // Do nothing on Mac. |
246 } | 246 } |
247 | 247 |
248 void BrowserWindowCocoa::SetStarredState(bool is_starred) { | 248 void BrowserWindowCocoa::SetStarredState(bool is_starred) { |
249 [controller_ setStarredState:is_starred ? YES : NO]; | 249 [controller_ setStarredState:is_starred ? YES : NO]; |
250 } | 250 } |
251 | 251 |
252 void BrowserWindowCocoa::ZoomChangedForActiveTab(bool can_show_bubble) { | 252 void BrowserWindowCocoa::SetZoomIconState(ZoomController::ZoomIconState state) { |
253 [controller_ zoomChangedForActiveTab:can_show_bubble ? YES : NO]; | 253 // TODO(khorimoto): Find someone to implement this. |
| 254 } |
| 255 |
| 256 void BrowserWindowCocoa::SetZoomIconTooltipPercent(int zoom_percent) { |
| 257 // TODO(khorimoto): Find someone to implement this. |
| 258 } |
| 259 |
| 260 void BrowserWindowCocoa::ShowZoomBubble(int zoom_percent) { |
| 261 // TODO(khorimoto): Find someone to implement this. |
254 } | 262 } |
255 | 263 |
256 gfx::Rect BrowserWindowCocoa::GetRestoredBounds() const { | 264 gfx::Rect BrowserWindowCocoa::GetRestoredBounds() const { |
257 // Flip coordinates based on the primary screen. | 265 // Flip coordinates based on the primary screen. |
258 NSScreen* screen = [[NSScreen screens] objectAtIndex:0]; | 266 NSScreen* screen = [[NSScreen screens] objectAtIndex:0]; |
259 NSRect frame = [controller_ regularWindowFrame]; | 267 NSRect frame = [controller_ regularWindowFrame]; |
260 gfx::Rect bounds(frame.origin.x, 0, NSWidth(frame), NSHeight(frame)); | 268 gfx::Rect bounds(frame.origin.x, 0, NSWidth(frame), NSHeight(frame)); |
261 bounds.set_y(NSHeight([screen frame]) - NSMaxY(frame)); | 269 bounds.set_y(NSHeight([screen frame]) - NSMaxY(frame)); |
262 return bounds; | 270 return bounds; |
263 } | 271 } |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 AvatarMenuBubbleController* menu = | 645 AvatarMenuBubbleController* menu = |
638 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ | 646 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ |
639 anchoredAt:point]; | 647 anchoredAt:point]; |
640 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; | 648 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; |
641 [menu showWindow:nil]; | 649 [menu showWindow:nil]; |
642 } | 650 } |
643 | 651 |
644 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { | 652 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { |
645 [[controller_ avatarButtonController] showAvatarBubble]; | 653 [[controller_ avatarButtonController] showAvatarBubble]; |
646 } | 654 } |
OLD | NEW |