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

Side by Side Diff: chrome/browser/ui/window_sizer/window_sizer.cc

Issue 10910164: Removes the grid from ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ShelfBrowserTest Created 8 years, 3 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 #include "chrome/browser/ui/window_sizer/window_sizer.h" 5 #include "chrome/browser/ui/window_sizer/window_sizer.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // If set, is used as the reference browser for GetLastActiveWindowState. 121 // If set, is used as the reference browser for GetLastActiveWindowState.
122 const Browser* browser_; 122 const Browser* browser_;
123 DISALLOW_COPY_AND_ASSIGN(DefaultStateProvider); 123 DISALLOW_COPY_AND_ASSIGN(DefaultStateProvider);
124 }; 124 };
125 125
126 /////////////////////////////////////////////////////////////////////////////// 126 ///////////////////////////////////////////////////////////////////////////////
127 // WindowSizer, public: 127 // WindowSizer, public:
128 128
129 // The number of pixels which are kept free top, left and right when a window 129 // The number of pixels which are kept free top, left and right when a window
130 // gets positioned to its default location. 130 // gets positioned to its default location.
131 // static
131 const int WindowSizer::kDesktopBorderSize = 16; 132 const int WindowSizer::kDesktopBorderSize = 16;
133
132 // Maximum width of a window even if there is more room on the desktop. 134 // Maximum width of a window even if there is more room on the desktop.
135 // static
133 const int WindowSizer::kMaximumWindowWidth = 1100; 136 const int WindowSizer::kMaximumWindowWidth = 1100;
134 137
135 WindowSizer::WindowSizer(StateProvider* state_provider, const Browser* browser) 138 WindowSizer::WindowSizer(StateProvider* state_provider, const Browser* browser)
136 : state_provider_(state_provider), 139 : state_provider_(state_provider),
137 monitor_info_provider_(new DefaultMonitorInfoProvider), 140 monitor_info_provider_(new DefaultMonitorInfoProvider),
138 browser_(browser) { 141 browser_(browser) {
139 } 142 }
140 143
141 WindowSizer::WindowSizer(StateProvider* state_provider, 144 WindowSizer::WindowSizer(StateProvider* state_provider,
142 MonitorInfoProvider* monitor_info_provider, 145 MonitorInfoProvider* monitor_info_provider,
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 bool WindowSizer::GetBoundsIgnoringPreviousState( 333 bool WindowSizer::GetBoundsIgnoringPreviousState(
331 const gfx::Rect& specified_bounds, 334 const gfx::Rect& specified_bounds,
332 gfx::Rect* bounds) const { 335 gfx::Rect* bounds) const {
333 #if defined(USE_ASH) 336 #if defined(USE_ASH)
334 // TODO(beng): insufficient but currently necessary. http://crbug.com/133312 337 // TODO(beng): insufficient but currently necessary. http://crbug.com/133312
335 if (chrome::ShouldOpenAshOnStartup()) 338 if (chrome::ShouldOpenAshOnStartup())
336 return GetBoundsIgnoringPreviousStateAsh(specified_bounds, bounds); 339 return GetBoundsIgnoringPreviousStateAsh(specified_bounds, bounds);
337 #endif 340 #endif
338 return false; 341 return false;
339 } 342 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/window_positioner_unittest.cc ('k') | chrome/browser/ui/window_sizer/window_sizer_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698