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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h

Issue 11418114: Add policy for ash launcher auto-hide behavior (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed- Rebased. Created 8 years 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 | Annotate | Revision Log
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_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 // Updates the pinned pref state. The pinned state consists of a list pref. 185 // Updates the pinned pref state. The pinned state consists of a list pref.
186 // Each item of the list is a dictionary. The key |kAppIDPath| gives the 186 // Each item of the list is a dictionary. The key |kAppIDPath| gives the
187 // id of the app. 187 // id of the app.
188 virtual void PersistPinnedState() OVERRIDE; 188 virtual void PersistPinnedState() OVERRIDE;
189 189
190 virtual ash::LauncherModel* model() OVERRIDE; 190 virtual ash::LauncherModel* model() OVERRIDE;
191 191
192 virtual Profile* profile() OVERRIDE; 192 virtual Profile* profile() OVERRIDE;
193 193
194 virtual void SetAutoHideBehavior(ash::ShelfAutoHideBehavior behavior, 194 // Gets the shelf auto-hide behavior on |root_window|.
195 aura::RootWindow* root_window) OVERRIDE; 195 virtual ash::ShelfAutoHideBehavior GetShelfAutoHideBehavior(
196 aura::RootWindow* root_window) const OVERRIDE;
197
198 // Returns |true| if the user is allowed to modify the shelf auto-hide
199 // behavior on |root_window|.
200 virtual bool CanUserModifyShelfAutoHideBehavior(
201 aura::RootWindow* root_window) const OVERRIDE;
202
203 // Toggles the shelf auto-hide behavior on |root_window|. Does nothing if the
204 // user is not allowed to modify the auto-hide behavior.
205 virtual void ToggleShelfAutoHideBehavior(
206 aura::RootWindow* root_window) OVERRIDE;
196 207
197 // The tab no longer represents its previously identified application. 208 // The tab no longer represents its previously identified application.
198 virtual void RemoveTabFromRunningApp(TabContents* tab, 209 virtual void RemoveTabFromRunningApp(TabContents* tab,
199 const std::string& app_id) OVERRIDE; 210 const std::string& app_id) OVERRIDE;
200 211
201 // Notify the controller that the state of an non platform app's tabs 212 // Notify the controller that the state of an non platform app's tabs
202 // have changed, 213 // have changed,
203 virtual void UpdateAppState(content::WebContents* contents, 214 virtual void UpdateAppState(content::WebContents* contents,
204 AppState app_state) OVERRIDE; 215 AppState app_state) OVERRIDE;
205 216
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 void LauncherItemClosed(ash::LauncherID id); 291 void LauncherItemClosed(ash::LauncherID id);
281 292
282 // Internal helpers for pinning and unpinning that handle both 293 // Internal helpers for pinning and unpinning that handle both
283 // client-triggered and internal pinning operations. 294 // client-triggered and internal pinning operations.
284 void DoPinAppWithID(const std::string& app_id); 295 void DoPinAppWithID(const std::string& app_id);
285 void DoUnpinAppsWithID(const std::string& app_id); 296 void DoUnpinAppsWithID(const std::string& app_id);
286 297
287 // Re-syncs launcher model with prefs::kPinnedLauncherApps. 298 // Re-syncs launcher model with prefs::kPinnedLauncherApps.
288 void UpdateAppLaunchersFromPref(); 299 void UpdateAppLaunchersFromPref();
289 300
301 // Persists the shelf auto-hide behavior to prefs.
302 void SetShelfAutoHideBehaviorPrefs(ash::ShelfAutoHideBehavior behavior,
303 aura::RootWindow* root_window);
304
290 // Sets the shelf auto-hide behavior from prefs. 305 // Sets the shelf auto-hide behavior from prefs.
291 void SetShelfAutoHideBehaviorFromPrefs(); 306 void SetShelfAutoHideBehaviorFromPrefs();
292 307
293 // Sets the shelf alignment from prefs. 308 // Sets the shelf alignment from prefs.
294 void SetShelfAlignmentFromPrefs(); 309 void SetShelfAlignmentFromPrefs();
295 310
296 // Returns the most recently active tab contents for an app. 311 // Returns the most recently active tab contents for an app.
297 TabContents* GetLastActiveTabContents(const std::string& app_id); 312 TabContents* GetLastActiveTabContents(const std::string& app_id);
298 313
299 // Creates an app launcher to insert at |index|. Note that |index| may be 314 // Creates an app launcher to insert at |index|. Note that |index| may be
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 content::NotificationRegistrar notification_registrar_; 347 content::NotificationRegistrar notification_registrar_;
333 348
334 PrefChangeRegistrar pref_change_registrar_; 349 PrefChangeRegistrar pref_change_registrar_;
335 350
336 AppSyncUIState* app_sync_ui_state_; 351 AppSyncUIState* app_sync_ui_state_;
337 352
338 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerPerApp); 353 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerPerApp);
339 }; 354 };
340 355
341 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_ 356 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698