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

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

Issue 10836218: Remove BrowserList::GetLastActive calls from window_sizer.cc et al. (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
« no previous file with comments | « chrome/browser/ui/browser_finder.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 gfx::Rect desiredContentRect = 270 gfx::Rect desiredContentRect =
271 chrome::GetSavedWindowBounds(browser_.get()); 271 chrome::GetSavedWindowBounds(browser_.get());
272 gfx::Rect windowRect = desiredContentRect; 272 gfx::Rect windowRect = desiredContentRect;
273 windowRect = [self enforceMinWindowSize:windowRect]; 273 windowRect = [self enforceMinWindowSize:windowRect];
274 274
275 // When we are given x/y coordinates of 0 on a created popup window, assume 275 // When we are given x/y coordinates of 0 on a created popup window, assume
276 // none were given by the window.open() command. 276 // none were given by the window.open() command.
277 if ((browser_->is_type_popup() || browser_->is_type_panel()) && 277 if ((browser_->is_type_popup() || browser_->is_type_panel()) &&
278 windowRect.x() == 0 && windowRect.y() == 0) { 278 windowRect.x() == 0 && windowRect.y() == 0) {
279 gfx::Size size = windowRect.size(); 279 gfx::Size size = windowRect.size();
280 windowRect.set_origin(WindowSizer::GetDefaultPopupOrigin(size)); 280 windowRect.set_origin(
281 WindowSizer::GetDefaultPopupOrigin(size,
282 browser_->host_desktop_type()));
281 } 283 }
282 284
283 // Size and position the window. Note that it is not yet onscreen. Popup 285 // Size and position the window. Note that it is not yet onscreen. Popup
284 // windows may get resized later on in this function, once the actual size 286 // windows may get resized later on in this function, once the actual size
285 // of the toolbar/tabstrip is known. 287 // of the toolbar/tabstrip is known.
286 windowShim_->SetBounds(windowRect); 288 windowShim_->SetBounds(windowRect);
287 289
288 // Puts the incognito badge on the window frame, if necessary. 290 // Puts the incognito badge on the window frame, if necessary.
289 [self installAvatar]; 291 [self installAvatar];
290 292
(...skipping 1910 matching lines...) Expand 10 before | Expand all | Expand 10 after
2201 2203
2202 - (BOOL)supportsBookmarkBar { 2204 - (BOOL)supportsBookmarkBar {
2203 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2205 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2204 } 2206 }
2205 2207
2206 - (BOOL)isTabbedWindow { 2208 - (BOOL)isTabbedWindow {
2207 return browser_->is_type_tabbed(); 2209 return browser_->is_type_tabbed();
2208 } 2210 }
2209 2211
2210 @end // @implementation BrowserWindowController(WindowType) 2212 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_finder.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698