Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #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 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 235 // Set indicator that this browser is being created via session restore. | 235 // Set indicator that this browser is being created via session restore. |
| 236 // This is used on the Mac (only) to determine animation style when the | 236 // This is used on the Mac (only) to determine animation style when the |
| 237 // browser window is shown. | 237 // browser window is shown. |
| 238 void set_is_session_restore(bool is_session_restore) { | 238 void set_is_session_restore(bool is_session_restore) { |
| 239 is_session_restore_ = is_session_restore; | 239 is_session_restore_ = is_session_restore; |
| 240 } | 240 } |
| 241 bool is_session_restore() const { | 241 bool is_session_restore() const { |
| 242 return is_session_restore_; | 242 return is_session_restore_; |
| 243 } | 243 } |
| 244 | 244 |
| 245 void set_is_used_for_session_restore(bool is_used_for_session_restore) { | |
| 246 is_used_for_session_restore_ = is_used_for_session_restore; | |
|
sky
2017/07/21 14:48:09
How does this differ from is_session_restore_ abov
ducbui
2017/07/21 15:19:58
The is_session_restore_ above is used on Mac only
| |
| 247 } | |
| 248 | |
| 249 bool is_used_for_session_restore() const { | |
| 250 return is_used_for_session_restore_; | |
| 251 } | |
| 252 | |
| 245 // Accessors //////////////////////////////////////////////////////////////// | 253 // Accessors //////////////////////////////////////////////////////////////// |
| 246 | 254 |
| 247 Type type() const { return type_; } | 255 Type type() const { return type_; } |
| 248 const std::string& app_name() const { return app_name_; } | 256 const std::string& app_name() const { return app_name_; } |
| 249 bool is_trusted_source() const { return is_trusted_source_; } | 257 bool is_trusted_source() const { return is_trusted_source_; } |
| 250 Profile* profile() const { return profile_; } | 258 Profile* profile() const { return profile_; } |
| 251 gfx::Rect override_bounds() const { return override_bounds_; } | 259 gfx::Rect override_bounds() const { return override_bounds_; } |
| 252 const std::string& initial_workspace() const { return initial_workspace_; } | 260 const std::string& initial_workspace() const { return initial_workspace_; } |
| 253 | 261 |
| 254 // |window()| will return NULL if called before |CreateBrowserWindow()| | 262 // |window()| will return NULL if called before |CreateBrowserWindow()| |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 954 // The default values are typically loaded from local state (last session), | 962 // The default values are typically loaded from local state (last session), |
| 955 // obtained from the last window of the same type, or obtained from the | 963 // obtained from the last window of the same type, or obtained from the |
| 956 // shell shortcut's startup info. | 964 // shell shortcut's startup info. |
| 957 gfx::Rect override_bounds_; | 965 gfx::Rect override_bounds_; |
| 958 ui::WindowShowState initial_show_state_; | 966 ui::WindowShowState initial_show_state_; |
| 959 const std::string initial_workspace_; | 967 const std::string initial_workspace_; |
| 960 | 968 |
| 961 // Tracks when this browser is being created by session restore. | 969 // Tracks when this browser is being created by session restore. |
| 962 bool is_session_restore_; | 970 bool is_session_restore_; |
| 963 | 971 |
| 972 // True if a newly created or exisiting browser is used for session restore. | |
| 973 bool is_used_for_session_restore_; | |
| 974 | |
| 964 std::unique_ptr<chrome::UnloadController> unload_controller_; | 975 std::unique_ptr<chrome::UnloadController> unload_controller_; |
| 965 std::unique_ptr<chrome::FastUnloadController> fast_unload_controller_; | 976 std::unique_ptr<chrome::FastUnloadController> fast_unload_controller_; |
| 966 | 977 |
| 967 std::unique_ptr<ChromeBubbleManager> bubble_manager_; | 978 std::unique_ptr<ChromeBubbleManager> bubble_manager_; |
| 968 | 979 |
| 969 // The Find Bar. This may be NULL if there is no Find Bar, and if it is | 980 // The Find Bar. This may be NULL if there is no Find Bar, and if it is |
| 970 // non-NULL, it may or may not be visible. | 981 // non-NULL, it may or may not be visible. |
| 971 std::unique_ptr<FindBarController> find_bar_controller_; | 982 std::unique_ptr<FindBarController> find_bar_controller_; |
| 972 | 983 |
| 973 // Dialog box used for opening and saving files. | 984 // Dialog box used for opening and saving files. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1018 // The following factory is used for chrome update coalescing. | 1029 // The following factory is used for chrome update coalescing. |
| 1019 base::WeakPtrFactory<Browser> chrome_updater_factory_; | 1030 base::WeakPtrFactory<Browser> chrome_updater_factory_; |
| 1020 | 1031 |
| 1021 // The following factory is used to close the frame at a later time. | 1032 // The following factory is used to close the frame at a later time. |
| 1022 base::WeakPtrFactory<Browser> weak_factory_; | 1033 base::WeakPtrFactory<Browser> weak_factory_; |
| 1023 | 1034 |
| 1024 DISALLOW_COPY_AND_ASSIGN(Browser); | 1035 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 1025 }; | 1036 }; |
| 1026 | 1037 |
| 1027 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1038 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
| OLD | NEW |