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

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

Powered by Google App Engine
This is Rietveld 408576698