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

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: . 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 #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 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 - (void)updateToolbarWithContents:(WebContents*)tab 1178 - (void)updateToolbarWithContents:(WebContents*)tab
1179 shouldRestoreState:(BOOL)shouldRestore { 1179 shouldRestoreState:(BOOL)shouldRestore {
1180 [toolbarController_ updateToolbarWithContents:tab 1180 [toolbarController_ updateToolbarWithContents:tab
1181 shouldRestoreState:shouldRestore]; 1181 shouldRestoreState:shouldRestore];
1182 } 1182 }
1183 1183
1184 - (void)setStarredState:(BOOL)isStarred { 1184 - (void)setStarredState:(BOOL)isStarred {
1185 [toolbarController_ setStarredState:isStarred]; 1185 [toolbarController_ setStarredState:isStarred];
1186 } 1186 }
1187 1187
1188 - (void)zoomChangedForActiveTab:(BOOL)canShowBubble {
1189 [toolbarController_ zoomChangedForActiveTab:canShowBubble];
1190 }
1191
1188 // Return the rect, in WebKit coordinates (flipped), of the window's grow box 1192 // Return the rect, in WebKit coordinates (flipped), of the window's grow box
1189 // in the coordinate system of the content area of the currently selected tab. 1193 // in the coordinate system of the content area of the currently selected tab.
1190 // |windowGrowBox| needs to be in the window's coordinate system. 1194 // |windowGrowBox| needs to be in the window's coordinate system.
1191 - (NSRect)selectedTabGrowBoxRect { 1195 - (NSRect)selectedTabGrowBoxRect {
1192 NSWindow* window = [self window]; 1196 NSWindow* window = [self window];
1193 if (![window respondsToSelector:@selector(_growBoxRect)]) 1197 if (![window respondsToSelector:@selector(_growBoxRect)])
1194 return NSZeroRect; 1198 return NSZeroRect;
1195 1199
1196 // Before we return a rect, we need to convert it from window coordinates 1200 // Before we return a rect, we need to convert it from window coordinates
1197 // to tab content area coordinates and flip the coordinate system. 1201 // to tab content area coordinates and flip the coordinate system.
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
2201 2205
2202 - (BOOL)supportsBookmarkBar { 2206 - (BOOL)supportsBookmarkBar {
2203 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2207 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2204 } 2208 }
2205 2209
2206 - (BOOL)isTabbedWindow { 2210 - (BOOL)isTabbedWindow {
2207 return browser_->is_type_tabbed(); 2211 return browser_->is_type_tabbed();
2208 } 2212 }
2209 2213
2210 @end // @implementation BrowserWindowController(WindowType) 2214 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698