Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Unified Diff: chrome/browser/ui/browser_command_controller.h

Issue 11906008: Make Mac menu code obey incognito availability. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adjust comment Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_command_controller.h
diff --git a/chrome/browser/ui/browser_command_controller.h b/chrome/browser/ui/browser_command_controller.h
index 31bfe7bf47ad17a1d714a3d971bb85043ff6ae1c..da7c45086b333d061b821ef35910ce6e1315b874 100644
--- a/chrome/browser/ui/browser_command_controller.h
+++ b/chrome/browser/ui/browser_command_controller.h
@@ -66,6 +66,18 @@ class BrowserCommandController : public CommandUpdaterDelegate,
void PrintingStateChanged();
void LoadingStateChanged(bool is_loading, bool force);
+ // Shared state updating: these functions are static and public to share with
+ // outside code.
+
+ // Updates the open-file state.
+ static void UpdateOpenFileState(CommandUpdater* command_updater);
+
+ // Update commands whose state depends on incognito mode availability and that
+ // only depend on the profile.
+ static void UpdateSharedCommandsForIncognitoAvailability(
+ CommandUpdater* command_updater,
+ Profile* profile);
+
private:
enum FullScreenMode {
// Not in fullscreen mode.
@@ -163,9 +175,6 @@ class BrowserCommandController : public CommandUpdaterDelegate,
// Updates the save-page-as command state.
void UpdateSaveAsState();
- // Updates the open-file state (Mac Only).
- void UpdateOpenFileState();
-
// Ask the Reload/Stop button to change its icon, and update the Stop command
// state. |is_loading| is true if the current WebContents is loading.
// |force| is true if the button should change its icon immediately.
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698