| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_BROWSER_H_ | 5 #ifndef CHROME_BROWSER_BROWSER_H_ |
| 6 #define CHROME_BROWSER_BROWSER_H_ | 6 #define CHROME_BROWSER_BROWSER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 // visible in this browser, it becomes selected. Otherwise a new tab is | 242 // visible in this browser, it becomes selected. Otherwise a new tab is |
| 243 // created. | 243 // created. |
| 244 void ShowSingleDOMUITab(const GURL& url); | 244 void ShowSingleDOMUITab(const GURL& url); |
| 245 | 245 |
| 246 // Assorted browser commands //////////////////////////////////////////////// | 246 // Assorted browser commands //////////////////////////////////////////////// |
| 247 | 247 |
| 248 // NOTE: Within each of the following sections, the IDs are ordered roughly by | 248 // NOTE: Within each of the following sections, the IDs are ordered roughly by |
| 249 // how they appear in the GUI/menus (left to right, top to bottom, etc.). | 249 // how they appear in the GUI/menus (left to right, top to bottom, etc.). |
| 250 | 250 |
| 251 // Navigation commands | 251 // Navigation commands |
| 252 void GoBack(); | 252 void GoBack(WindowOpenDisposition disposition); |
| 253 void GoForward(); | 253 void GoForward(WindowOpenDisposition disposition); |
| 254 void Reload(); | 254 void Reload(); |
| 255 void Home(); | 255 void Home(WindowOpenDisposition disposition); |
| 256 void OpenCurrentURL(); | 256 void OpenCurrentURL(); |
| 257 void Go(); | 257 void Go(WindowOpenDisposition disposition); |
| 258 void Stop(); | 258 void Stop(); |
| 259 // Window management commands | 259 // Window management commands |
| 260 void NewWindow(); | 260 void NewWindow(); |
| 261 void NewIncognitoWindow(); | 261 void NewIncognitoWindow(); |
| 262 void NewProfileWindowByIndex(int index); | 262 void NewProfileWindowByIndex(int index); |
| 263 void CloseWindow(); | 263 void CloseWindow(); |
| 264 void NewTab(); | 264 void NewTab(); |
| 265 void CloseTab(); | 265 void CloseTab(); |
| 266 void SelectNextTab(); | 266 void SelectNextTab(); |
| 267 void SelectPreviousTab(); | 267 void SelectPreviousTab(); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 static void RegisterUserPrefs(PrefService* prefs); | 354 static void RegisterUserPrefs(PrefService* prefs); |
| 355 | 355 |
| 356 // Returns the Browser which contains the tab with the given | 356 // Returns the Browser which contains the tab with the given |
| 357 // NavigationController, also filling in |index| (if valid) with the tab's | 357 // NavigationController, also filling in |index| (if valid) with the tab's |
| 358 // index in the tab strip. | 358 // index in the tab strip. |
| 359 // Returns NULL if not found. | 359 // Returns NULL if not found. |
| 360 // This call is O(N) in the number of tabs. | 360 // This call is O(N) in the number of tabs. |
| 361 static Browser* GetBrowserForController( | 361 static Browser* GetBrowserForController( |
| 362 const NavigationController* controller, int* index); | 362 const NavigationController* controller, int* index); |
| 363 | 363 |
| 364 // Calls ExecuteCommandWithDisposition with the given disposition. |
| 365 void ExecuteCommandWithDisposition(int id, WindowOpenDisposition); |
| 366 |
| 364 // Interface implementations //////////////////////////////////////////////// | 367 // Interface implementations //////////////////////////////////////////////// |
| 365 | 368 |
| 366 // Overridden from CommandUpdater::CommandUpdaterDelegate: | 369 // Overridden from CommandUpdater::CommandUpdaterDelegate: |
| 367 virtual void ExecuteCommand(int id); | 370 virtual void ExecuteCommand(int id); |
| 368 | 371 |
| 369 // Overridden from TabStripModelDelegate: | 372 // Overridden from TabStripModelDelegate: |
| 370 virtual GURL GetBlankTabURL() const; | 373 virtual GURL GetBlankTabURL() const; |
| 371 virtual void CreateNewStripWithContents(TabContents* detached_contents, | 374 virtual void CreateNewStripWithContents(TabContents* detached_contents, |
| 372 const gfx::Rect& window_bounds, | 375 const gfx::Rect& window_bounds, |
| 373 const DockInfo& dock_info); | 376 const DockInfo& dock_info); |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 // The browser idle task helps cleanup unused memory resources when idle. | 679 // The browser idle task helps cleanup unused memory resources when idle. |
| 677 scoped_ptr<BrowserIdleTimer> idle_task_; | 680 scoped_ptr<BrowserIdleTimer> idle_task_; |
| 678 | 681 |
| 679 // Keep track of the encoding auto detect pref. | 682 // Keep track of the encoding auto detect pref. |
| 680 BooleanPrefMember encoding_auto_detect_; | 683 BooleanPrefMember encoding_auto_detect_; |
| 681 | 684 |
| 682 DISALLOW_COPY_AND_ASSIGN(Browser); | 685 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 683 }; | 686 }; |
| 684 | 687 |
| 685 #endif // CHROME_BROWSER_BROWSER_H_ | 688 #endif // CHROME_BROWSER_BROWSER_H_ |
| OLD | NEW |