| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 // The associated profile. | 179 // The associated profile. |
| 180 Profile* profile; | 180 Profile* profile; |
| 181 | 181 |
| 182 // Specifies the browser is_trusted_source_ value. | 182 // Specifies the browser is_trusted_source_ value. |
| 183 bool trusted_source; | 183 bool trusted_source; |
| 184 | 184 |
| 185 // The bounds of the window to open. | 185 // The bounds of the window to open. |
| 186 gfx::Rect initial_bounds; | 186 gfx::Rect initial_bounds; |
| 187 | 187 |
| 188 // The workspace the window should open in, if the platform supports it. |
| 189 std::string initial_workspace; |
| 190 |
| 188 ui::WindowShowState initial_show_state; | 191 ui::WindowShowState initial_show_state; |
| 189 | 192 |
| 190 bool is_session_restore; | 193 bool is_session_restore; |
| 191 | 194 |
| 192 // Supply a custom BrowserWindow implementation, to be used instead of the | 195 // Supply a custom BrowserWindow implementation, to be used instead of the |
| 193 // default. Intended for testing. | 196 // default. Intended for testing. |
| 194 BrowserWindow* window; | 197 BrowserWindow* window; |
| 195 | 198 |
| 196 private: | 199 private: |
| 197 friend class Browser; | 200 friend class Browser; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 return is_session_restore_; | 235 return is_session_restore_; |
| 233 } | 236 } |
| 234 | 237 |
| 235 // Accessors //////////////////////////////////////////////////////////////// | 238 // Accessors //////////////////////////////////////////////////////////////// |
| 236 | 239 |
| 237 Type type() const { return type_; } | 240 Type type() const { return type_; } |
| 238 const std::string& app_name() const { return app_name_; } | 241 const std::string& app_name() const { return app_name_; } |
| 239 bool is_trusted_source() const { return is_trusted_source_; } | 242 bool is_trusted_source() const { return is_trusted_source_; } |
| 240 Profile* profile() const { return profile_; } | 243 Profile* profile() const { return profile_; } |
| 241 gfx::Rect override_bounds() const { return override_bounds_; } | 244 gfx::Rect override_bounds() const { return override_bounds_; } |
| 245 const std::string& initial_workspace() const { return initial_workspace_; } |
| 242 | 246 |
| 243 // |window()| will return NULL if called before |CreateBrowserWindow()| | 247 // |window()| will return NULL if called before |CreateBrowserWindow()| |
| 244 // is done. | 248 // is done. |
| 245 BrowserWindow* window() const { return window_; } | 249 BrowserWindow* window() const { return window_; } |
| 246 ToolbarModel* toolbar_model() { return toolbar_model_.get(); } | 250 ToolbarModel* toolbar_model() { return toolbar_model_.get(); } |
| 247 const ToolbarModel* toolbar_model() const { return toolbar_model_.get(); } | 251 const ToolbarModel* toolbar_model() const { return toolbar_model_.get(); } |
| 248 #if defined(UNIT_TEST) | 252 #if defined(UNIT_TEST) |
| 249 void swap_toolbar_models(std::unique_ptr<ToolbarModel>* toolbar_model) { | 253 void swap_toolbar_models(std::unique_ptr<ToolbarModel>* toolbar_model) { |
| 250 toolbar_model->swap(toolbar_model_); | 254 toolbar_model->swap(toolbar_model_); |
| 251 } | 255 } |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 ///////////////////////////////////////////////////////////////////////////// | 946 ///////////////////////////////////////////////////////////////////////////// |
| 943 | 947 |
| 944 // Override values for the bounds of the window and its maximized or minimized | 948 // Override values for the bounds of the window and its maximized or minimized |
| 945 // state. | 949 // state. |
| 946 // These are supplied by callers that don't want to use the default values. | 950 // These are supplied by callers that don't want to use the default values. |
| 947 // The default values are typically loaded from local state (last session), | 951 // The default values are typically loaded from local state (last session), |
| 948 // obtained from the last window of the same type, or obtained from the | 952 // obtained from the last window of the same type, or obtained from the |
| 949 // shell shortcut's startup info. | 953 // shell shortcut's startup info. |
| 950 gfx::Rect override_bounds_; | 954 gfx::Rect override_bounds_; |
| 951 ui::WindowShowState initial_show_state_; | 955 ui::WindowShowState initial_show_state_; |
| 956 const std::string initial_workspace_; |
| 952 | 957 |
| 953 // Tracks when this browser is being created by session restore. | 958 // Tracks when this browser is being created by session restore. |
| 954 bool is_session_restore_; | 959 bool is_session_restore_; |
| 955 | 960 |
| 956 std::unique_ptr<chrome::UnloadController> unload_controller_; | 961 std::unique_ptr<chrome::UnloadController> unload_controller_; |
| 957 std::unique_ptr<chrome::FastUnloadController> fast_unload_controller_; | 962 std::unique_ptr<chrome::FastUnloadController> fast_unload_controller_; |
| 958 | 963 |
| 959 std::unique_ptr<ChromeBubbleManager> bubble_manager_; | 964 std::unique_ptr<ChromeBubbleManager> bubble_manager_; |
| 960 | 965 |
| 961 // The Find Bar. This may be NULL if there is no Find Bar, and if it is | 966 // The Find Bar. This may be NULL if there is no Find Bar, and if it is |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 // The following factory is used for chrome update coalescing. | 1016 // The following factory is used for chrome update coalescing. |
| 1012 base::WeakPtrFactory<Browser> chrome_updater_factory_; | 1017 base::WeakPtrFactory<Browser> chrome_updater_factory_; |
| 1013 | 1018 |
| 1014 // The following factory is used to close the frame at a later time. | 1019 // The following factory is used to close the frame at a later time. |
| 1015 base::WeakPtrFactory<Browser> weak_factory_; | 1020 base::WeakPtrFactory<Browser> weak_factory_; |
| 1016 | 1021 |
| 1017 DISALLOW_COPY_AND_ASSIGN(Browser); | 1022 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 1018 }; | 1023 }; |
| 1019 | 1024 |
| 1020 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1025 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
| OLD | NEW |