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

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

Issue 10736028: Refactor browser window zoom handling and enable zoom icon on all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac Created 8 years, 5 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 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 - (void)updateToolbarWithContents:(WebContents*)tab 1176 - (void)updateToolbarWithContents:(WebContents*)tab
1177 shouldRestoreState:(BOOL)shouldRestore { 1177 shouldRestoreState:(BOOL)shouldRestore {
1178 [toolbarController_ updateToolbarWithContents:tab 1178 [toolbarController_ updateToolbarWithContents:tab
1179 shouldRestoreState:shouldRestore]; 1179 shouldRestoreState:shouldRestore];
1180 } 1180 }
1181 1181
1182 - (void)setStarredState:(BOOL)isStarred { 1182 - (void)setStarredState:(BOOL)isStarred {
1183 [toolbarController_ setStarredState:isStarred]; 1183 [toolbarController_ setStarredState:isStarred];
1184 } 1184 }
1185 1185
1186 - (void)zoomChangedForActiveTab:(BOOL)canShowBubble {
1187 [toolbarController_ zoomChangedForActiveTab:canShowBubble];
1188 }
1189
1186 // Return the rect, in WebKit coordinates (flipped), of the window's grow box 1190 // Return the rect, in WebKit coordinates (flipped), of the window's grow box
1187 // in the coordinate system of the content area of the currently selected tab. 1191 // in the coordinate system of the content area of the currently selected tab.
1188 // |windowGrowBox| needs to be in the window's coordinate system. 1192 // |windowGrowBox| needs to be in the window's coordinate system.
1189 - (NSRect)selectedTabGrowBoxRect { 1193 - (NSRect)selectedTabGrowBoxRect {
1190 NSWindow* window = [self window]; 1194 NSWindow* window = [self window];
1191 if (![window respondsToSelector:@selector(_growBoxRect)]) 1195 if (![window respondsToSelector:@selector(_growBoxRect)])
1192 return NSZeroRect; 1196 return NSZeroRect;
1193 1197
1194 // Before we return a rect, we need to convert it from window coordinates 1198 // Before we return a rect, we need to convert it from window coordinates
1195 // to tab content area coordinates and flip the coordinate system. 1199 // to tab content area coordinates and flip the coordinate system.
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
2218 2222
2219 - (BOOL)supportsBookmarkBar { 2223 - (BOOL)supportsBookmarkBar {
2220 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2224 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2221 } 2225 }
2222 2226
2223 - (BOOL)isTabbedWindow { 2227 - (BOOL)isTabbedWindow {
2224 return browser_->is_type_tabbed(); 2228 return browser_->is_type_tabbed();
2225 } 2229 }
2226 2230
2227 @end // @implementation BrowserWindowController(WindowType) 2231 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698