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

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: Created 8 years, 1 month 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 ash::ShelfAutoHideBehavior GetShelfAutoHideBehavior(
231 aura::RootWindow* root_window); 231 aura::RootWindow* root_window) const;
232 232
233 bool CanUserModifyShelfAutoHideBehavior(
234 aura::RootWindow* root_window) const;
235
236 void ToggleShelfAutoHideBehavior(aura::RootWindow* root_window);
oshima 2012/11/26 19:13:00 document these methods.
bartfab (slow) 2012/11/29 18:25:51 Done.
237
238 public:
oshima 2012/11/26 19:13:00 do you need this?
bartfab (slow) 2012/11/29 18:25:51 Sorry, this was a leftover from debugging.
233 // The tab no longer represents its previously identified application. 239 // The tab no longer represents its previously identified application.
234 void RemoveTabFromRunningApp(TabContents* tab, const std::string& app_id); 240 void RemoveTabFromRunningApp(TabContents* tab, const std::string& app_id);
235 241
236 // Notify the controller that the state of an non platform app's tabs 242 // Notify the controller that the state of an non platform app's tabs
237 // have changed, 243 // have changed,
238 void UpdateAppState(content::WebContents* contents, AppState app_state); 244 void UpdateAppState(content::WebContents* contents, AppState app_state);
239 245
240 // Limits application refocusing to urls that match |url| for |id|. 246 // Limits application refocusing to urls that match |url| for |id|.
241 void SetRefocusURLPattern(ash::LauncherID id, const GURL& url); 247 void SetRefocusURLPattern(ash::LauncherID id, const GURL& url);
242 248
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 void LauncherItemClosed(ash::LauncherID id); 310 void LauncherItemClosed(ash::LauncherID id);
305 311
306 // Internal helpers for pinning and unpinning that handle both 312 // Internal helpers for pinning and unpinning that handle both
307 // client-triggered and internal pinning operations. 313 // client-triggered and internal pinning operations.
308 void DoPinAppWithID(const std::string& app_id); 314 void DoPinAppWithID(const std::string& app_id);
309 void DoUnpinAppsWithID(const std::string& app_id); 315 void DoUnpinAppsWithID(const std::string& app_id);
310 316
311 // Re-syncs launcher model with prefs::kPinnedLauncherApps. 317 // Re-syncs launcher model with prefs::kPinnedLauncherApps.
312 void UpdateAppLaunchersFromPref(); 318 void UpdateAppLaunchersFromPref();
313 319
320 void SetShelfAutoHideBehaviorPrefs(ash::ShelfAutoHideBehavior behavior,
321 aura::RootWindow* root_window);
322
314 // Sets the shelf auto-hide behavior from prefs. 323 // Sets the shelf auto-hide behavior from prefs.
315 void SetShelfAutoHideBehaviorFromPrefs(); 324 void SetShelfAutoHideBehaviorFromPrefs();
316 325
317 // Sets the shelf alignment from prefs. 326 // Sets the shelf alignment from prefs.
318 void SetShelfAlignmentFromPrefs(); 327 void SetShelfAlignmentFromPrefs();
319 328
320 // Returns the most recently active tab contents for an app. 329 // Returns the most recently active tab contents for an app.
321 TabContents* GetLastActiveTabContents(const std::string& app_id); 330 TabContents* GetLastActiveTabContents(const std::string& app_id);
322 331
323 // Creates an app launcher to insert at |index|. Note that |index| may be 332 // 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_; 372 content::NotificationRegistrar notification_registrar_;
364 373
365 PrefChangeRegistrar pref_change_registrar_; 374 PrefChangeRegistrar pref_change_registrar_;
366 375
367 AppSyncUIState* app_sync_ui_state_; 376 AppSyncUIState* app_sync_ui_state_;
368 377
369 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); 378 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController);
370 }; 379 };
371 380
372 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ 381 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698