| OLD | NEW |
| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 // Creates the Browser Window. Prefer to use the static helpers above where | 182 // Creates the Browser Window. Prefer to use the static helpers above where |
| 183 // possible. This does not show the window. You need to call window()->Show() | 183 // possible. This does not show the window. You need to call window()->Show() |
| 184 // to show it. | 184 // to show it. |
| 185 void InitBrowserWindow(); | 185 void InitBrowserWindow(); |
| 186 | 186 |
| 187 // Accessors //////////////////////////////////////////////////////////////// | 187 // Accessors //////////////////////////////////////////////////////////////// |
| 188 | 188 |
| 189 Type type() const { return type_; } | 189 Type type() const { return type_; } |
| 190 const std::string& app_name() const { return app_name_; } | 190 const std::string& app_name() const { return app_name_; } |
| 191 Profile* profile() const { return profile_; } | 191 Profile* profile() const { return profile_; } |
| 192 const std::vector<std::wstring>& user_data_dir_profiles() const; | |
| 193 gfx::Rect override_bounds() const { return override_bounds_; } | 192 gfx::Rect override_bounds() const { return override_bounds_; } |
| 194 | 193 |
| 195 // Returns the InstantController or NULL if there is no InstantController for | 194 // Returns the InstantController or NULL if there is no InstantController for |
| 196 // this Browser. | 195 // this Browser. |
| 197 InstantController* instant() const { return instant_.get(); } | 196 InstantController* instant() const { return instant_.get(); } |
| 198 | 197 |
| 199 #if defined(UNIT_TEST) | 198 #if defined(UNIT_TEST) |
| 200 // Sets the BrowserWindow. This is intended for testing and generally not | 199 // Sets the BrowserWindow. This is intended for testing and generally not |
| 201 // useful outside of testing. Use CreateBrowserWindow outside of testing, or | 200 // useful outside of testing. Use CreateBrowserWindow outside of testing, or |
| 202 // the static convenience methods that create a BrowserWindow for you. | 201 // the static convenience methods that create a BrowserWindow for you. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 223 // Get the FindBarController for this browser, creating it if it does not | 222 // Get the FindBarController for this browser, creating it if it does not |
| 224 // yet exist. | 223 // yet exist. |
| 225 FindBarController* GetFindBarController(); | 224 FindBarController* GetFindBarController(); |
| 226 | 225 |
| 227 // Returns true if a FindBarController exists for this browser. | 226 // Returns true if a FindBarController exists for this browser. |
| 228 bool HasFindBarController() const; | 227 bool HasFindBarController() const; |
| 229 | 228 |
| 230 // Returns the state of the bookmark bar. | 229 // Returns the state of the bookmark bar. |
| 231 BookmarkBar::State bookmark_bar_state() const { return bookmark_bar_state_; } | 230 BookmarkBar::State bookmark_bar_state() const { return bookmark_bar_state_; } |
| 232 | 231 |
| 233 // Setters ///////////////////////////////////////////////////////////////// | |
| 234 | |
| 235 void set_user_data_dir_profiles(const std::vector<std::wstring>& profiles); | |
| 236 | |
| 237 // Browser Creation Helpers ///////////////////////////////////////////////// | 232 // Browser Creation Helpers ///////////////////////////////////////////////// |
| 238 | 233 |
| 239 // Opens a new window with the default blank tab. | 234 // Opens a new window with the default blank tab. |
| 240 static void OpenEmptyWindow(Profile* profile); | 235 static void OpenEmptyWindow(Profile* profile); |
| 241 | 236 |
| 242 // Opens a new window with the tabs from |profile|'s TabRestoreService. | 237 // Opens a new window with the tabs from |profile|'s TabRestoreService. |
| 243 static void OpenWindowWithRestoredTabs(Profile* profile); | 238 static void OpenWindowWithRestoredTabs(Profile* profile); |
| 244 | 239 |
| 245 // Opens the specified URL in a new browser window in an incognito session. | 240 // Opens the specified URL in a new browser window in an incognito session. |
| 246 // If there is already an existing active incognito session for the specified | 241 // If there is already an existing active incognito session for the specified |
| (...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1286 | 1281 |
| 1287 scoped_ptr<InstantController> instant_; | 1282 scoped_ptr<InstantController> instant_; |
| 1288 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; | 1283 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; |
| 1289 | 1284 |
| 1290 BookmarkBar::State bookmark_bar_state_; | 1285 BookmarkBar::State bookmark_bar_state_; |
| 1291 | 1286 |
| 1292 DISALLOW_COPY_AND_ASSIGN(Browser); | 1287 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 1293 }; | 1288 }; |
| 1294 | 1289 |
| 1295 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1290 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
| OLD | NEW |