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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.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. 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_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 220
221 // Updates the pinned pref state. The pinned state consists of a list pref. 221 // Updates the pinned pref state. The pinned state consists of a list pref.
222 // Each item of the list is a dictionary. The key |kAppIDPath| gives the 222 // Each item of the list is a dictionary. The key |kAppIDPath| gives the
223 // id of the app. 223 // id of the app.
224 void PersistPinnedState(); 224 void PersistPinnedState();
225 225
226 ash::LauncherModel* model() { return model_; } 226 ash::LauncherModel* model() { return model_; }
227 227
228 Profile* profile() { return profile_; } 228 Profile* profile() { return profile_; }
229 229
230 void SetAutoHideBehavior(ash::ShelfAutoHideBehavior behavior, 230 // Gets the shelf auto-hide behavior on |root_window|.
231 aura::RootWindow* root_window); 231 ash::ShelfAutoHideBehavior GetShelfAutoHideBehavior(
232 aura::RootWindow* root_window) const;
233
234 // Returns |true| if the user is allowed to modify the shelf auto-hide
235 // behavior on |root_window|.
236 bool CanUserModifyShelfAutoHideBehavior(
237 aura::RootWindow* root_window) const;
238
239 // Toggles the shelf auto-hide behavior on |root_window|. Does nothing if the
240 // user is not allowed to modify the auto-hide behavior.
241 void ToggleShelfAutoHideBehavior(aura::RootWindow* root_window);
232 242
233 // The tab no longer represents its previously identified application. 243 // The tab no longer represents its previously identified application.
234 void RemoveTabFromRunningApp(TabContents* tab, const std::string& app_id); 244 void RemoveTabFromRunningApp(TabContents* tab, const std::string& app_id);
235 245
236 // Notify the controller that the state of an non platform app's tabs 246 // Notify the controller that the state of an non platform app's tabs
237 // have changed, 247 // have changed,
238 void UpdateAppState(content::WebContents* contents, AppState app_state); 248 void UpdateAppState(content::WebContents* contents, AppState app_state);
239 249
240 // Limits application refocusing to urls that match |url| for |id|. 250 // Limits application refocusing to urls that match |url| for |id|.
241 void SetRefocusURLPattern(ash::LauncherID id, const GURL& url); 251 void SetRefocusURLPattern(ash::LauncherID id, const GURL& url);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 void LauncherItemClosed(ash::LauncherID id); 314 void LauncherItemClosed(ash::LauncherID id);
305 315
306 // Internal helpers for pinning and unpinning that handle both 316 // Internal helpers for pinning and unpinning that handle both
307 // client-triggered and internal pinning operations. 317 // client-triggered and internal pinning operations.
308 void DoPinAppWithID(const std::string& app_id); 318 void DoPinAppWithID(const std::string& app_id);
309 void DoUnpinAppsWithID(const std::string& app_id); 319 void DoUnpinAppsWithID(const std::string& app_id);
310 320
311 // Re-syncs launcher model with prefs::kPinnedLauncherApps. 321 // Re-syncs launcher model with prefs::kPinnedLauncherApps.
312 void UpdateAppLaunchersFromPref(); 322 void UpdateAppLaunchersFromPref();
313 323
324 void SetShelfAutoHideBehaviorPrefs(ash::ShelfAutoHideBehavior behavior,
325 aura::RootWindow* root_window);
326
314 // Sets the shelf auto-hide behavior from prefs. 327 // Sets the shelf auto-hide behavior from prefs.
315 void SetShelfAutoHideBehaviorFromPrefs(); 328 void SetShelfAutoHideBehaviorFromPrefs();
316 329
317 // Sets the shelf alignment from prefs. 330 // Sets the shelf alignment from prefs.
318 void SetShelfAlignmentFromPrefs(); 331 void SetShelfAlignmentFromPrefs();
319 332
320 // Returns the most recently active tab contents for an app. 333 // Returns the most recently active tab contents for an app.
321 TabContents* GetLastActiveTabContents(const std::string& app_id); 334 TabContents* GetLastActiveTabContents(const std::string& app_id);
322 335
323 // Creates an app launcher to insert at |index|. Note that |index| may be 336 // Creates an app launcher to insert at |index|. Note that |index| may be
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 content::NotificationRegistrar notification_registrar_; 376 content::NotificationRegistrar notification_registrar_;
364 377
365 PrefChangeRegistrar pref_change_registrar_; 378 PrefChangeRegistrar pref_change_registrar_;
366 379
367 AppSyncUIState* app_sync_ui_state_; 380 AppSyncUIState* app_sync_ui_state_;
368 381
369 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); 382 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController);
370 }; 383 };
371 384
372 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ 385 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698