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