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

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

Issue 7809013: Remove Animation When "Resuming" Window in Lion (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clear flag at session_restore level. Created 9 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) 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_BROWSER_H_ 5 #ifndef CHROME_BROWSER_UI_BROWSER_H_
6 #define CHROME_BROWSER_UI_BROWSER_H_ 6 #define CHROME_BROWSER_UI_BROWSER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 void set_override_bounds(const gfx::Rect& bounds) { 161 void set_override_bounds(const gfx::Rect& bounds) {
162 override_bounds_ = bounds; 162 override_bounds_ = bounds;
163 } 163 }
164 void set_show_state(ui::WindowShowState show_state) { 164 void set_show_state(ui::WindowShowState show_state) {
165 show_state_ = show_state; 165 show_state_ = show_state;
166 } 166 }
167 // Return true if the initial window bounds have been overridden. 167 // Return true if the initial window bounds have been overridden.
168 bool bounds_overridden() const { 168 bool bounds_overridden() const {
169 return !override_bounds_.IsEmpty(); 169 return !override_bounds_.IsEmpty();
170 } 170 }
171 // Set indicator that this browser is being created via session restore.
172 // This is used on the Mac (only) to determine animation style when the
173 // browser window is shown.
174 void set_is_session_restore(bool is_session_restore) {
175 is_session_restore_ = is_session_restore;
176 }
177 bool is_session_restore() {
Mark Mentovai 2011/08/31 18:47:01 bool is_session_restore() const {
dhollowa 2011/08/31 18:57:17 Done.
178 return is_session_restore_;
179 }
171 180
172 // Creates the Browser Window. Prefer to use the static helpers above where 181 // Creates the Browser Window. Prefer to use the static helpers above where
173 // possible. This does not show the window. You need to call window()->Show() 182 // possible. This does not show the window. You need to call window()->Show()
174 // to show it. 183 // to show it.
175 void InitBrowserWindow(); 184 void InitBrowserWindow();
176 185
177 // Accessors //////////////////////////////////////////////////////////////// 186 // Accessors ////////////////////////////////////////////////////////////////
178 187
179 Type type() const { return type_; } 188 Type type() const { return type_; }
180 const std::string& app_name() const { return app_name_; } 189 const std::string& app_name() const { return app_name_; }
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1310 1319
1311 // Override values for the bounds of the window and its maximized or minimized 1320 // Override values for the bounds of the window and its maximized or minimized
1312 // state. 1321 // state.
1313 // These are supplied by callers that don't want to use the default values. 1322 // These are supplied by callers that don't want to use the default values.
1314 // The default values are typically loaded from local state (last session), 1323 // The default values are typically loaded from local state (last session),
1315 // obtained from the last window of the same type, or obtained from the 1324 // obtained from the last window of the same type, or obtained from the
1316 // shell shortcut's startup info. 1325 // shell shortcut's startup info.
1317 gfx::Rect override_bounds_; 1326 gfx::Rect override_bounds_;
1318 ui::WindowShowState show_state_; 1327 ui::WindowShowState show_state_;
1319 1328
1329 // Tracks when this browser is being created by session restore.
1330 bool is_session_restore_;
1331
1320 // The following factory is used to close the frame at a later time. 1332 // The following factory is used to close the frame at a later time.
1321 ScopedRunnableMethodFactory<Browser> method_factory_; 1333 ScopedRunnableMethodFactory<Browser> method_factory_;
1322 1334
1323 // The Find Bar. This may be NULL if there is no Find Bar, and if it is 1335 // The Find Bar. This may be NULL if there is no Find Bar, and if it is
1324 // non-NULL, it may or may not be visible. 1336 // non-NULL, it may or may not be visible.
1325 scoped_ptr<FindBarController> find_bar_controller_; 1337 scoped_ptr<FindBarController> find_bar_controller_;
1326 1338
1327 // Dialog box used for opening and saving files. 1339 // Dialog box used for opening and saving files.
1328 scoped_refptr<SelectFileDialog> select_file_dialog_; 1340 scoped_refptr<SelectFileDialog> select_file_dialog_;
1329 1341
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 // Tab to notify when the browser exits fullscreen mode. 1387 // Tab to notify when the browser exits fullscreen mode.
1376 TabContentsWrapper* fullscreened_tab_; 1388 TabContentsWrapper* fullscreened_tab_;
1377 1389
1378 // True if the current tab is in fullscreen mode. 1390 // True if the current tab is in fullscreen mode.
1379 bool tab_caused_fullscreen_; 1391 bool tab_caused_fullscreen_;
1380 1392
1381 DISALLOW_COPY_AND_ASSIGN(Browser); 1393 DISALLOW_COPY_AND_ASSIGN(Browser);
1382 }; 1394 };
1383 1395
1384 #endif // CHROME_BROWSER_UI_BROWSER_H_ 1396 #endif // CHROME_BROWSER_UI_BROWSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698