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

Side by Side Diff: chrome/browser/ui/browser_command_controller.h

Issue 310913002: Issue 32919: Update the Zoom NSMenuItems (Zoom-In/Zoom-out/Actual-Size) when the zoom state changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Nit Created 6 years, 4 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_COMMAND_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/prefs/pref_change_registrar.h" 10 #include "base/prefs/pref_change_registrar.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 // Gets the last blocked command after calling SetBlockCommandExecution(true). 50 // Gets the last blocked command after calling SetBlockCommandExecution(true).
51 // Returns the command id or -1 if there is no command blocked. The 51 // Returns the command id or -1 if there is no command blocked. The
52 // disposition type of the command will be stored in |*disposition| if it's 52 // disposition type of the command will be stored in |*disposition| if it's
53 // not NULL. 53 // not NULL.
54 int GetLastBlockedCommand(WindowOpenDisposition* disposition); 54 int GetLastBlockedCommand(WindowOpenDisposition* disposition);
55 55
56 // Notifies the controller that state has changed in one of the following 56 // Notifies the controller that state has changed in one of the following
57 // areas and it should update command states. 57 // areas and it should update command states.
58 void TabStateChanged(); 58 void TabStateChanged();
59 void ZoomStateChanged();
59 void ContentRestrictionsChanged(); 60 void ContentRestrictionsChanged();
60 void FullscreenStateChanged(); 61 void FullscreenStateChanged();
61 void PrintingStateChanged(); 62 void PrintingStateChanged();
62 void LoadingStateChanged(bool is_loading, bool force); 63 void LoadingStateChanged(bool is_loading, bool force);
63 64
64 // Shared state updating: these functions are static and public to share with 65 // Shared state updating: these functions are static and public to share with
65 // outside code. 66 // outside code.
66 67
67 // Updates the open-file state. 68 // Updates the open-file state.
68 static void UpdateOpenFileState(CommandUpdater* command_updater); 69 static void UpdateOpenFileState(CommandUpdater* command_updater);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 107
107 // Initialize state for all browser commands. 108 // Initialize state for all browser commands.
108 void InitCommandState(); 109 void InitCommandState();
109 110
110 // Update commands whose state depends on incognito mode availability. 111 // Update commands whose state depends on incognito mode availability.
111 void UpdateCommandsForIncognitoAvailability(); 112 void UpdateCommandsForIncognitoAvailability();
112 113
113 // Update commands whose state depends on the tab's state. 114 // Update commands whose state depends on the tab's state.
114 void UpdateCommandsForTabState(); 115 void UpdateCommandsForTabState();
115 116
117 // Update Zoom commands based on zoom state.
118 void UpdateCommandsForZoomState();
119
116 // Updates commands when the content's restrictions change. 120 // Updates commands when the content's restrictions change.
117 void UpdateCommandsForContentRestrictionState(); 121 void UpdateCommandsForContentRestrictionState();
118 122
119 // Updates commands for enabling developer tools. 123 // Updates commands for enabling developer tools.
120 void UpdateCommandsForDevTools(); 124 void UpdateCommandsForDevTools();
121 125
122 // Updates commands for bookmark editing. 126 // Updates commands for bookmark editing.
123 void UpdateCommandsForBookmarkEditing(); 127 void UpdateCommandsForBookmarkEditing();
124 128
125 // Updates commands that affect the bookmark bar. 129 // Updates commands that affect the bookmark bar.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 PrefChangeRegistrar profile_pref_registrar_; 184 PrefChangeRegistrar profile_pref_registrar_;
181 PrefChangeRegistrar local_pref_registrar_; 185 PrefChangeRegistrar local_pref_registrar_;
182 BooleanPrefMember pref_signin_allowed_; 186 BooleanPrefMember pref_signin_allowed_;
183 187
184 DISALLOW_COPY_AND_ASSIGN(BrowserCommandController); 188 DISALLOW_COPY_AND_ASSIGN(BrowserCommandController);
185 }; 189 };
186 190
187 } // namespace chrome 191 } // namespace chrome
188 192
189 #endif // CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_ 193 #endif // CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698