Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 10831372: Revert 152080 - Refactor browser window zoom handling and enable zoom icon on all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.h ('k') | chrome/browser/ui/cocoa/browser_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698