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

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

Issue 11418114: Add policy for ash launcher auto-hide behavior (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_BROWSER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_BROWSER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_BROWSER_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_BROWSER_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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 void LauncherItemClosed(ash::LauncherID id); 287 void LauncherItemClosed(ash::LauncherID id);
277 288
278 // Internal helpers for pinning and unpinning that handle both 289 // Internal helpers for pinning and unpinning that handle both
279 // client-triggered and internal pinning operations. 290 // client-triggered and internal pinning operations.
280 void DoPinAppWithID(const std::string& app_id); 291 void DoPinAppWithID(const std::string& app_id);
281 void DoUnpinAppsWithID(const std::string& app_id); 292 void DoUnpinAppsWithID(const std::string& app_id);
282 293
283 // Re-syncs launcher model with prefs::kPinnedLauncherApps. 294 // Re-syncs launcher model with prefs::kPinnedLauncherApps.
284 void UpdateAppLaunchersFromPref(); 295 void UpdateAppLaunchersFromPref();
285 296
297 // Persists the shelf auto-hide behavior to prefs.
298 void SetShelfAutoHideBehaviorPrefs(ash::ShelfAutoHideBehavior behavior,
299 aura::RootWindow* root_window);
300
286 // Sets the shelf auto-hide behavior from prefs. 301 // Sets the shelf auto-hide behavior from prefs.
287 void SetShelfAutoHideBehaviorFromPrefs(); 302 void SetShelfAutoHideBehaviorFromPrefs();
288 303
289 // Sets the shelf alignment from prefs. 304 // Sets the shelf alignment from prefs.
290 void SetShelfAlignmentFromPrefs(); 305 void SetShelfAlignmentFromPrefs();
291 306
292 // Returns the most recently active tab contents for an app. 307 // Returns the most recently active tab contents for an app.
293 TabContents* GetLastActiveTabContents(const std::string& app_id); 308 TabContents* GetLastActiveTabContents(const std::string& app_id);
294 309
295 // Creates an app launcher to insert at |index|. Note that |index| may be 310 // 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
328 content::NotificationRegistrar notification_registrar_; 343 content::NotificationRegistrar notification_registrar_;
329 344
330 PrefChangeRegistrar pref_change_registrar_; 345 PrefChangeRegistrar pref_change_registrar_;
331 346
332 AppSyncUIState* app_sync_ui_state_; 347 AppSyncUIState* app_sync_ui_state_;
333 348
334 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerPerBrowser); 349 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerPerBrowser);
335 }; 350 };
336 351
337 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_BROWSER _H_ 352 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_BROWSER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698