| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 } | 246 } |
| 247 | 247 |
| 248 void BrowserWindowCocoa::UpdateLoadingAnimations(bool should_animate) { | 248 void BrowserWindowCocoa::UpdateLoadingAnimations(bool should_animate) { |
| 249 // Do nothing on Mac. | 249 // Do nothing on Mac. |
| 250 } | 250 } |
| 251 | 251 |
| 252 void BrowserWindowCocoa::SetStarredState(bool is_starred) { | 252 void BrowserWindowCocoa::SetStarredState(bool is_starred) { |
| 253 [controller_ setStarredState:is_starred ? YES : NO]; | 253 [controller_ setStarredState:is_starred ? YES : NO]; |
| 254 } | 254 } |
| 255 | 255 |
| 256 void BrowserWindowCocoa::SetZoomIconState(ZoomTabHelper::ZoomIconState, |
| 257 int zoomPercent) { |
| 258 // TODO(khorimoto): Find someone to implement this. |
| 259 } |
| 260 |
| 261 void BrowserWindowCocoa::ShowZoomBubble(int zoomPercent) { |
| 262 // TODO(khorimoto): Find someone to implement this. |
| 263 } |
| 264 |
| 256 gfx::Rect BrowserWindowCocoa::GetRestoredBounds() const { | 265 gfx::Rect BrowserWindowCocoa::GetRestoredBounds() const { |
| 257 // Flip coordinates based on the primary screen. | 266 // Flip coordinates based on the primary screen. |
| 258 NSScreen* screen = [[NSScreen screens] objectAtIndex:0]; | 267 NSScreen* screen = [[NSScreen screens] objectAtIndex:0]; |
| 259 NSRect frame = [controller_ regularWindowFrame]; | 268 NSRect frame = [controller_ regularWindowFrame]; |
| 260 gfx::Rect bounds(frame.origin.x, 0, frame.size.width, frame.size.height); | 269 gfx::Rect bounds(frame.origin.x, 0, frame.size.width, frame.size.height); |
| 261 bounds.set_y([screen frame].size.height - frame.origin.y - frame.size.height); | 270 bounds.set_y([screen frame].size.height - frame.origin.y - frame.size.height); |
| 262 return bounds; | 271 return bounds; |
| 263 } | 272 } |
| 264 | 273 |
| 265 gfx::Rect BrowserWindowCocoa::GetBounds() const { | 274 gfx::Rect BrowserWindowCocoa::GetBounds() const { |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 AvatarMenuBubbleController* menu = | 671 AvatarMenuBubbleController* menu = |
| 663 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ | 672 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ |
| 664 anchoredAt:point]; | 673 anchoredAt:point]; |
| 665 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; | 674 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; |
| 666 [menu showWindow:nil]; | 675 [menu showWindow:nil]; |
| 667 } | 676 } |
| 668 | 677 |
| 669 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { | 678 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { |
| 670 [[controller_ avatarButtonController] showAvatarBubble]; | 679 [[controller_ avatarButtonController] showAvatarBubble]; |
| 671 } | 680 } |
| OLD | NEW |