OLD | NEW |
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 // Updates the pinned pref state. The pinned state consists of a list pref. | 183 // Updates the pinned pref state. The pinned state consists of a list pref. |
184 // Each item of the list is a dictionary. The key |kAppIDPath| gives the | 184 // Each item of the list is a dictionary. The key |kAppIDPath| gives the |
185 // id of the app. | 185 // id of the app. |
186 virtual void PersistPinnedState() OVERRIDE; | 186 virtual void PersistPinnedState() OVERRIDE; |
187 | 187 |
188 virtual ash::LauncherModel* model() OVERRIDE; | 188 virtual ash::LauncherModel* model() OVERRIDE; |
189 | 189 |
190 virtual Profile* profile() OVERRIDE; | 190 virtual Profile* profile() OVERRIDE; |
191 | 191 |
192 virtual void SetAutoHideBehavior(ash::ShelfAutoHideBehavior behavior, | 192 // Gets the shelf auto-hide behavior on |root_window|. |
193 aura::RootWindow* root_window) OVERRIDE; | 193 virtual ash::ShelfAutoHideBehavior GetShelfAutoHideBehavior( |
| 194 aura::RootWindow* root_window) const OVERRIDE; |
| 195 |
| 196 // Returns |true| if the user is allowed to modify the shelf auto-hide |
| 197 // behavior on |root_window|. |
| 198 virtual bool CanUserModifyShelfAutoHideBehavior( |
| 199 aura::RootWindow* root_window) const OVERRIDE; |
| 200 |
| 201 // Toggles the shelf auto-hide behavior on |root_window|. Does nothing if the |
| 202 // user is not allowed to modify the auto-hide behavior. |
| 203 virtual void ToggleShelfAutoHideBehavior( |
| 204 aura::RootWindow* root_window) OVERRIDE; |
194 | 205 |
195 // The tab no longer represents its previously identified application. | 206 // The tab no longer represents its previously identified application. |
196 virtual void RemoveTabFromRunningApp(TabContents* tab, | 207 virtual void RemoveTabFromRunningApp(TabContents* tab, |
197 const std::string& app_id) OVERRIDE; | 208 const std::string& app_id) OVERRIDE; |
198 | 209 |
199 // Notify the controller that the state of an non platform app's tabs | 210 // Notify the controller that the state of an non platform app's tabs |
200 // have changed, | 211 // have changed, |
201 virtual void UpdateAppState(content::WebContents* contents, | 212 virtual void UpdateAppState(content::WebContents* contents, |
202 AppState app_state) OVERRIDE; | 213 AppState app_state) OVERRIDE; |
203 | 214 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 void LauncherItemClosed(ash::LauncherID id); | 285 void LauncherItemClosed(ash::LauncherID id); |
275 | 286 |
276 // Internal helpers for pinning and unpinning that handle both | 287 // Internal helpers for pinning and unpinning that handle both |
277 // client-triggered and internal pinning operations. | 288 // client-triggered and internal pinning operations. |
278 void DoPinAppWithID(const std::string& app_id); | 289 void DoPinAppWithID(const std::string& app_id); |
279 void DoUnpinAppsWithID(const std::string& app_id); | 290 void DoUnpinAppsWithID(const std::string& app_id); |
280 | 291 |
281 // Re-syncs launcher model with prefs::kPinnedLauncherApps. | 292 // Re-syncs launcher model with prefs::kPinnedLauncherApps. |
282 void UpdateAppLaunchersFromPref(); | 293 void UpdateAppLaunchersFromPref(); |
283 | 294 |
| 295 // Persists the shelf auto-hide behavior to prefs. |
| 296 void SetShelfAutoHideBehaviorPrefs(ash::ShelfAutoHideBehavior behavior, |
| 297 aura::RootWindow* root_window); |
| 298 |
284 // Sets the shelf auto-hide behavior from prefs. | 299 // Sets the shelf auto-hide behavior from prefs. |
285 void SetShelfAutoHideBehaviorFromPrefs(); | 300 void SetShelfAutoHideBehaviorFromPrefs(); |
286 | 301 |
287 // Sets the shelf alignment from prefs. | 302 // Sets the shelf alignment from prefs. |
288 void SetShelfAlignmentFromPrefs(); | 303 void SetShelfAlignmentFromPrefs(); |
289 | 304 |
290 // Returns the most recently active tab contents for an app. | 305 // Returns the most recently active tab contents for an app. |
291 TabContents* GetLastActiveTabContents(const std::string& app_id); | 306 TabContents* GetLastActiveTabContents(const std::string& app_id); |
292 | 307 |
293 // Creates an app launcher to insert at |index|. Note that |index| may be | 308 // 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 Loading... |
326 content::NotificationRegistrar notification_registrar_; | 341 content::NotificationRegistrar notification_registrar_; |
327 | 342 |
328 PrefChangeRegistrar pref_change_registrar_; | 343 PrefChangeRegistrar pref_change_registrar_; |
329 | 344 |
330 AppSyncUIState* app_sync_ui_state_; | 345 AppSyncUIState* app_sync_ui_state_; |
331 | 346 |
332 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerPerApp); | 347 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerPerApp); |
333 }; | 348 }; |
334 | 349 |
335 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_ | 350 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_APP_H_ |
OLD | NEW |