| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 void AddAppWindow(extensions::AppWindow* app_window, | 46 void AddAppWindow(extensions::AppWindow* app_window, |
| 47 ash::ShelfItemStatus status); | 47 ash::ShelfItemStatus status); |
| 48 | 48 |
| 49 void RemoveAppWindowForWindow(aura::Window* window); | 49 void RemoveAppWindowForWindow(aura::Window* window); |
| 50 | 50 |
| 51 void SetActiveWindow(aura::Window* window); | 51 void SetActiveWindow(aura::Window* window); |
| 52 | 52 |
| 53 const std::string& app_shelf_id() const { return app_shelf_id_; } | 53 const std::string& app_shelf_id() const { return app_shelf_id_; } |
| 54 | 54 |
| 55 // LauncherItemController overrides: | 55 // LauncherItemController overrides: |
| 56 virtual bool IsOpen() const OVERRIDE; | 56 virtual bool IsOpen() const override; |
| 57 virtual bool IsVisible() const OVERRIDE; | 57 virtual bool IsVisible() const override; |
| 58 virtual void Launch(ash::LaunchSource source, int event_flags) OVERRIDE; | 58 virtual void Launch(ash::LaunchSource source, int event_flags) override; |
| 59 virtual bool Activate(ash::LaunchSource source) OVERRIDE; | 59 virtual bool Activate(ash::LaunchSource source) override; |
| 60 virtual ChromeLauncherAppMenuItems GetApplicationList(int event_flags) | 60 virtual ChromeLauncherAppMenuItems GetApplicationList(int event_flags) |
| 61 OVERRIDE; | 61 override; |
| 62 virtual bool ItemSelected(const ui::Event& eent) OVERRIDE; | 62 virtual bool ItemSelected(const ui::Event& eent) override; |
| 63 virtual base::string16 GetTitle() OVERRIDE; | 63 virtual base::string16 GetTitle() override; |
| 64 virtual ui::MenuModel* CreateContextMenu(aura::Window* root_window) OVERRIDE; | 64 virtual ui::MenuModel* CreateContextMenu(aura::Window* root_window) override; |
| 65 virtual ash::ShelfMenuModel* CreateApplicationMenu(int event_flags) OVERRIDE; | 65 virtual ash::ShelfMenuModel* CreateApplicationMenu(int event_flags) override; |
| 66 virtual bool IsDraggable() OVERRIDE; | 66 virtual bool IsDraggable() override; |
| 67 virtual bool ShouldShowTooltip() OVERRIDE; | 67 virtual bool ShouldShowTooltip() override; |
| 68 virtual void Close() OVERRIDE; | 68 virtual void Close() override; |
| 69 | 69 |
| 70 // aura::WindowObserver overrides: | 70 // aura::WindowObserver overrides: |
| 71 virtual void OnWindowPropertyChanged(aura::Window* window, | 71 virtual void OnWindowPropertyChanged(aura::Window* window, |
| 72 const void* key, | 72 const void* key, |
| 73 intptr_t old) OVERRIDE; | 73 intptr_t old) override; |
| 74 | 74 |
| 75 // Get the number of running applications/incarnations of this. | 75 // Get the number of running applications/incarnations of this. |
| 76 size_t app_window_count() const { return app_windows_.size(); } | 76 size_t app_window_count() const { return app_windows_.size(); } |
| 77 | 77 |
| 78 // Activates the window at position |index|. | 78 // Activates the window at position |index|. |
| 79 void ActivateIndexedApp(size_t index); | 79 void ActivateIndexedApp(size_t index); |
| 80 | 80 |
| 81 // Install the app. Only valid for ephemeral apps, which can be promoted to | 81 // Install the app. Only valid for ephemeral apps, which can be promoted to |
| 82 // regular installed apps. | 82 // regular installed apps. |
| 83 void InstallApp(); | 83 void InstallApp(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 101 // AppLauncherItemController for each |app_shelf_id_|. | 101 // AppLauncherItemController for each |app_shelf_id_|. |
| 102 const std::string app_shelf_id_; | 102 const std::string app_shelf_id_; |
| 103 | 103 |
| 104 // Scoped list of observed windows (for removal on destruction) | 104 // Scoped list of observed windows (for removal on destruction) |
| 105 ScopedObserver<aura::Window, aura::WindowObserver> observed_windows_; | 105 ScopedObserver<aura::Window, aura::WindowObserver> observed_windows_; |
| 106 | 106 |
| 107 DISALLOW_COPY_AND_ASSIGN(AppWindowLauncherItemController); | 107 DISALLOW_COPY_AND_ASSIGN(AppWindowLauncherItemController); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ | 110 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ |
| OLD | NEW |