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_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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 186 |
187 // Updates the pinned pref state. The pinned state consists of a list pref. | 187 // Updates the pinned pref state. The pinned state consists of a list pref. |
188 // Each item of the list is a dictionary. The key |kAppIDPath| gives the | 188 // Each item of the list is a dictionary. The key |kAppIDPath| gives the |
189 // id of the app. | 189 // id of the app. |
190 virtual void PersistPinnedState() OVERRIDE; | 190 virtual void PersistPinnedState() OVERRIDE; |
191 | 191 |
192 virtual ash::LauncherModel* model() OVERRIDE; | 192 virtual ash::LauncherModel* model() OVERRIDE; |
193 | 193 |
194 virtual Profile* profile() OVERRIDE; | 194 virtual Profile* profile() OVERRIDE; |
195 | 195 |
196 virtual void SetAutoHideBehavior(ash::ShelfAutoHideBehavior behavior, | 196 // Gets the shelf auto-hide behavior on |root_window|. |
197 aura::RootWindow* root_window) OVERRIDE; | 197 virtual ash::ShelfAutoHideBehavior GetShelfAutoHideBehavior( |
| 198 aura::RootWindow* root_window) const OVERRIDE; |
| 199 |
| 200 // Returns |true| if the user is allowed to modify the shelf auto-hide |
| 201 // behavior on |root_window|. |
| 202 virtual bool CanUserModifyShelfAutoHideBehavior( |
| 203 aura::RootWindow* root_window) const OVERRIDE; |
| 204 |
| 205 // Toggles the shelf auto-hide behavior on |root_window|. Does nothing if the |
| 206 // user is not allowed to modify the auto-hide behavior. |
| 207 virtual void ToggleShelfAutoHideBehavior( |
| 208 aura::RootWindow* root_window) OVERRIDE; |
198 | 209 |
199 // The tab no longer represents its previously identified application. | 210 // The tab no longer represents its previously identified application. |
200 virtual void RemoveTabFromRunningApp(TabContents* tab, | 211 virtual void RemoveTabFromRunningApp(TabContents* tab, |
201 const std::string& app_id) OVERRIDE; | 212 const std::string& app_id) OVERRIDE; |
202 | 213 |
203 // Notify the controller that the state of an non platform app's tabs | 214 // Notify the controller that the state of an non platform app's tabs |
204 // have changed, | 215 // have changed, |
205 virtual void UpdateAppState(content::WebContents* contents, | 216 virtual void UpdateAppState(content::WebContents* contents, |
206 AppState app_state) OVERRIDE; | 217 AppState app_state) OVERRIDE; |
207 | 218 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 void LauncherItemClosed(ash::LauncherID id); | 293 void LauncherItemClosed(ash::LauncherID id); |
283 | 294 |
284 // Internal helpers for pinning and unpinning that handle both | 295 // Internal helpers for pinning and unpinning that handle both |
285 // client-triggered and internal pinning operations. | 296 // client-triggered and internal pinning operations. |
286 void DoPinAppWithID(const std::string& app_id); | 297 void DoPinAppWithID(const std::string& app_id); |
287 void DoUnpinAppsWithID(const std::string& app_id); | 298 void DoUnpinAppsWithID(const std::string& app_id); |
288 | 299 |
289 // Re-syncs launcher model with prefs::kPinnedLauncherApps. | 300 // Re-syncs launcher model with prefs::kPinnedLauncherApps. |
290 void UpdateAppLaunchersFromPref(); | 301 void UpdateAppLaunchersFromPref(); |
291 | 302 |
| 303 // Persists the shelf auto-hide behavior to prefs. |
| 304 void SetShelfAutoHideBehaviorPrefs(ash::ShelfAutoHideBehavior behavior, |
| 305 aura::RootWindow* root_window); |
| 306 |
292 // Sets the shelf auto-hide behavior from prefs. | 307 // Sets the shelf auto-hide behavior from prefs. |
293 void SetShelfAutoHideBehaviorFromPrefs(); | 308 void SetShelfAutoHideBehaviorFromPrefs(); |
294 | 309 |
295 // Sets the shelf alignment from prefs. | 310 // Sets the shelf alignment from prefs. |
296 void SetShelfAlignmentFromPrefs(); | 311 void SetShelfAlignmentFromPrefs(); |
297 | 312 |
298 // Returns the most recently active tab contents for an app. | 313 // Returns the most recently active tab contents for an app. |
299 TabContents* GetLastActiveTabContents(const std::string& app_id); | 314 TabContents* GetLastActiveTabContents(const std::string& app_id); |
300 | 315 |
301 // Creates an app launcher to insert at |index|. Note that |index| may be | 316 // 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... |
334 content::NotificationRegistrar notification_registrar_; | 349 content::NotificationRegistrar notification_registrar_; |
335 | 350 |
336 PrefChangeRegistrar pref_change_registrar_; | 351 PrefChangeRegistrar pref_change_registrar_; |
337 | 352 |
338 AppSyncUIState* app_sync_ui_state_; | 353 AppSyncUIState* app_sync_ui_state_; |
339 | 354 |
340 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerPerBrowser); | 355 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerPerBrowser); |
341 }; | 356 }; |
342 | 357 |
343 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_BROWSER
_H_ | 358 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_PER_BROWSER
_H_ |
OLD | NEW |