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

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

Issue 8585035: Use scoped_ptr for memory management rather than calling delete through WindowSizer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | « no previous file | chrome/browser/ui/window_sizer.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_WINDOW_SIZER_H_ 5 #ifndef CHROME_BROWSER_UI_WINDOW_SIZER_H_
6 #define CHROME_BROWSER_UI_WINDOW_SIZER_H_ 6 #define CHROME_BROWSER_UI_WINDOW_SIZER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h"
12 #include "ui/gfx/rect.h" 13 #include "ui/gfx/rect.h"
13 14
14 class Browser; 15 class Browser;
15 16
16 /////////////////////////////////////////////////////////////////////////////// 17 ///////////////////////////////////////////////////////////////////////////////
17 // WindowSizer 18 // WindowSizer
18 // 19 //
19 // A class that determines the best new size and position for a window to be 20 // A class that determines the best new size and position for a window to be
20 // shown at based several factors, including the position and size of the last 21 // shown at based several factors, including the position and size of the last
21 // window of the same type, the last saved bounds of the window from the 22 // window of the same type, the last saved bounds of the window from the
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // If |saved_work_area| is non-empty, it is used to determine whether the 151 // If |saved_work_area| is non-empty, it is used to determine whether the
151 // monitor cofiguration has changed. If it has, bounds are repositioned and 152 // monitor cofiguration has changed. If it has, bounds are repositioned and
152 // resized if necessary to make them completely contained in the current work 153 // resized if necessary to make them completely contained in the current work
153 // area. 154 // area.
154 void AdjustBoundsToBeVisibleOnMonitorContaining( 155 void AdjustBoundsToBeVisibleOnMonitorContaining(
155 const gfx::Rect& other_bounds, 156 const gfx::Rect& other_bounds,
156 const gfx::Rect& saved_work_area, 157 const gfx::Rect& saved_work_area,
157 gfx::Rect* bounds) const; 158 gfx::Rect* bounds) const;
158 159
159 // Providers for persistent storage and monitor metrics. 160 // Providers for persistent storage and monitor metrics.
160 StateProvider* state_provider_; 161 scoped_ptr<StateProvider> state_provider_;
161 MonitorInfoProvider* monitor_info_provider_; 162 scoped_ptr<MonitorInfoProvider> monitor_info_provider_;
162 163
163 DISALLOW_COPY_AND_ASSIGN(WindowSizer); 164 DISALLOW_COPY_AND_ASSIGN(WindowSizer);
164 }; 165 };
165 166
166 #endif // CHROME_BROWSER_UI_WINDOW_SIZER_H_ 167 #endif // CHROME_BROWSER_UI_WINDOW_SIZER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/window_sizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698