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

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

Issue 10444040: Tracks changes to zoom icon and zoom percentage. Notifies browser window if the icon should be chan… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased Created 8 years, 6 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
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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } 245 }
246 246
247 void BrowserWindowCocoa::UpdateLoadingAnimations(bool should_animate) { 247 void BrowserWindowCocoa::UpdateLoadingAnimations(bool should_animate) {
248 // Do nothing on Mac. 248 // Do nothing on Mac.
249 } 249 }
250 250
251 void BrowserWindowCocoa::SetStarredState(bool is_starred) { 251 void BrowserWindowCocoa::SetStarredState(bool is_starred) {
252 [controller_ setStarredState:is_starred ? YES : NO]; 252 [controller_ setStarredState:is_starred ? YES : NO];
253 } 253 }
254 254
255 void BrowserWindowCocoa::SetZoomIconState(ZoomController::ZoomIconState state) {
256 // TODO(khorimoto): Find someone to implement this.
257 }
258
259 void BrowserWindowCocoa::SetZoomIconTooltipPercent(int zoom_percent) {
260 // TODO(khorimoto): Find someone to implement this.
261 }
262
263 void BrowserWindowCocoa::ShowZoomBubble(int zoom_percent) {
264 // TODO(khorimoto): Find someone to implement this.
265 }
266
255 gfx::Rect BrowserWindowCocoa::GetRestoredBounds() const { 267 gfx::Rect BrowserWindowCocoa::GetRestoredBounds() const {
256 // Flip coordinates based on the primary screen. 268 // Flip coordinates based on the primary screen.
257 NSScreen* screen = [[NSScreen screens] objectAtIndex:0]; 269 NSScreen* screen = [[NSScreen screens] objectAtIndex:0];
258 NSRect frame = [controller_ regularWindowFrame]; 270 NSRect frame = [controller_ regularWindowFrame];
259 gfx::Rect bounds(frame.origin.x, 0, frame.size.width, frame.size.height); 271 gfx::Rect bounds(frame.origin.x, 0, frame.size.width, frame.size.height);
260 bounds.set_y([screen frame].size.height - frame.origin.y - frame.size.height); 272 bounds.set_y([screen frame].size.height - frame.origin.y - frame.size.height);
261 return bounds; 273 return bounds;
262 } 274 }
263 275
264 gfx::Rect BrowserWindowCocoa::GetBounds() const { 276 gfx::Rect BrowserWindowCocoa::GetBounds() const {
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 AvatarMenuBubbleController* menu = 652 AvatarMenuBubbleController* menu =
641 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ 653 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_
642 anchoredAt:point]; 654 anchoredAt:point];
643 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; 655 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge];
644 [menu showWindow:nil]; 656 [menu showWindow:nil];
645 } 657 }
646 658
647 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { 659 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() {
648 [[controller_ avatarButtonController] showAvatarBubble]; 660 [[controller_ avatarButtonController] showAvatarBubble];
649 } 661 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.h ('k') | chrome/browser/ui/gtk/browser_window_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698