diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-10 18:49:10 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-10 18:49:10 +0000 |
commit | 84214989a9be01a95c0f6f58cb22fbf2ab621952 (patch) | |
tree | 2c3bf1c8782c7f6dc9a3c73b98b59e0bfa490085 /chrome/browser/browser.h | |
parent | 89565f4825199719a6414ed7616832eab7dde006 (diff) | |
download | chromium_src-84214989a9be01a95c0f6f58cb22fbf2ab621952.zip chromium_src-84214989a9be01a95c0f6f58cb22fbf2ab621952.tar.gz chromium_src-84214989a9be01a95c0f6f58cb22fbf2ab621952.tar.bz2 |
Cleanup part 5.
Reorder identifiers, functions, initalization statements, etc. to all match. This preserves the original groups Ben created but makes a couple of changes:
* Within each group, the order is now "by GUI order" instead of random. This can be subjective, but when I tried doing alphabetical order, it resulted in related functionality being separated pretty arbitrarily.
* I moved the "window management" functions next to (but above) the "page-related" functions (this seemed a little more logical, but maybe not)
I also renamed UpdateNavigationCommands() to try and reflect that it updates a lot more than navigation commands, and moved some unconditionally-initialized commands (profile stuff) in there over to InitCommandState() where they belong.
Review URL: http://codereview.chromium.org/13681
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6721 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.h')
-rw-r--r-- | chrome/browser/browser.h | 75 |
1 files changed, 39 insertions, 36 deletions
diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h index 97ccd16..9876014 100644 --- a/chrome/browser/browser.h +++ b/chrome/browser/browser.h @@ -215,22 +215,25 @@ class Browser : public TabStripModelDelegate, // Assorted browser commands //////////////////////////////////////////////// + // NOTE: Within each of the following sections, the IDs are ordered roughly by + // how they appear in the GUI/menus (left to right, top to bottom, etc.). + // Navigation commands void GoBack(); void GoForward(); void Reload(); - void Stop(); void Home(); - void Go(); void OpenCurrentURL(); + void Go(); + void Stop(); // Window management commands - void NewTab(); - void CloseTab(); void NewWindow(); - void NewProfileWindowByIndex(int index); void NewIncognitoWindow(); + void NewProfileWindowByIndex(int index); void CloseWindow(); + void NewTab(); + void CloseTab(); void SelectNextTab(); void SelectPreviousTab(); void SelectNumberedTab(int index); @@ -240,56 +243,56 @@ class Browser : public TabStripModelDelegate, void ConvertPopupToTabbedBrowser(); void Exit(); + // Page-related commands + void BookmarkCurrentPage(); + void ViewSource(); + void ClosePopups(); + void Print(); + void SavePage(); + void ToggleEncodingAutoDetect(); + void OverrideEncoding(int encoding_id); + // Clipboard commands void Cut(); void Copy(); void CopyCurrentPageURL(); void Paste(); - // Opens the FindInPage window for the currently open tab. + // Find-in-page void Find(); void FindNext(); void FindPrevious(); // Zoom void ZoomIn(); - void ZoomOut(); void ZoomReset(); + void ZoomOut(); - // Sets focus to various bits of UI. + // Focus various bits of UI + void FocusToolbar(); void FocusLocationBar(); void FocusSearch(); - void FocusToolbar(); - // Page-related commands. - void BookmarkCurrentPage(); - void ViewSource(); - void ClosePopups(); - void Print(); - void SavePage(); - void ToggleEncodingAutoDetect(); - void OverrideEncoding(int encoding_id); - - // Show various bits of UI. - void OpenKeywordEditor(); - void OpenClearBrowsingDataDialog(); - void OpenImportSettingsDialog(); - void OpenBugReportDialog(); + // Show various bits of UI + void OpenFile(); + void OpenCreateShortcutsDialog(); void OpenDebuggerWindow(); void OpenJavaScriptConsole(); - void OpenCreateShortcutsDialog(); - void OpenPasswordManager(); - void OpenAboutChromeDialog(); - void OpenFile(); void OpenTaskManager(); - void OpenOptionsDialog(); - void OpenHelpTab(); - void ShowHistoryTab(); - void ShowDownloadsTab(); - void OpenBookmarkManager(); - void ToggleBookmarkBar(); void OpenSelectProfileDialog(); void OpenNewProfileDialog(); + void OpenBugReportDialog(); + void ToggleBookmarkBar(); + void ShowHistoryTab(); + void OpenBookmarkManager(); + void ShowDownloadsTab(); + void OpenClearBrowsingDataDialog(); + void OpenImportSettingsDialog(); + void OpenOptionsDialog(); + void OpenKeywordEditor(); + void OpenPasswordManager(); + void OpenAboutChromeDialog(); + void OpenHelpTab(); ///////////////////////////////////////////////////////////////////////////// @@ -395,9 +398,9 @@ class Browser : public TabStripModelDelegate, // Initialize state for all browser commands. void InitCommandState(); - // Update commands that drive the NavigationController to reflect changes in - // the NavigationController's state (Back, Forward, etc). - void UpdateNavigationCommands(); + // Update commands which may be enabled or disabled depending on the tab's + // state. + void UpdateCommandsForTabState(); // Change the "starred" button display to starred/unstarred. // TODO(evanm): migrate this to the commands framework. |