| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "ash/shell_observer.h" | 12 #include "ash/shell_observer.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" | 14 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
| 15 #include "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h" | 15 #include "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h" |
| 16 #include "chrome/browser/ui/ash/launcher/arc_app_shelf_id.h" | 16 #include "chrome/browser/ui/ash/launcher/arc_app_shelf_id.h" |
| 17 #include "mojo/public/cpp/bindings/binding.h" | 17 #include "mojo/public/cpp/bindings/binding.h" |
| 18 #include "ui/aura/env_observer.h" | 18 #include "ui/aura/env_observer.h" |
| 19 #include "ui/aura/window_observer.h" | 19 #include "ui/aura/window_observer.h" |
| 20 | 20 |
| 21 namespace aura { | 21 namespace aura { |
| 22 class Window; | 22 class Window; |
| 23 } | 23 } |
| 24 | 24 |
| 25 class ArcAppWindowLauncherItemController; | 25 class ArcAppWindowLauncherItemController; |
| 26 class ChromeLauncherControllerImpl; | 26 class ChromeLauncherController; |
| 27 | 27 |
| 28 class Profile; | 28 class Profile; |
| 29 | 29 |
| 30 class ArcAppWindowLauncherController : public AppWindowLauncherController, | 30 class ArcAppWindowLauncherController : public AppWindowLauncherController, |
| 31 public aura::EnvObserver, | 31 public aura::EnvObserver, |
| 32 public aura::WindowObserver, | 32 public aura::WindowObserver, |
| 33 public ash::ShellObserver, | 33 public ash::ShellObserver, |
| 34 public ArcAppListPrefs::Observer { | 34 public ArcAppListPrefs::Observer { |
| 35 public: | 35 public: |
| 36 explicit ArcAppWindowLauncherController(ChromeLauncherControllerImpl* owner); | 36 explicit ArcAppWindowLauncherController(ChromeLauncherController* owner); |
| 37 ~ArcAppWindowLauncherController() override; | 37 ~ArcAppWindowLauncherController() override; |
| 38 | 38 |
| 39 // Returns shelf app id. Play Store app is mapped to ARC platform host app. | 39 // Returns shelf app id. Play Store app is mapped to ARC platform host app. |
| 40 static std::string GetShelfAppIdFromArcAppId(const std::string& arc_app_id); | 40 static std::string GetShelfAppIdFromArcAppId(const std::string& arc_app_id); |
| 41 | 41 |
| 42 // Returns ARC app id. ARC platform host app is mapped to Play Store app. | 42 // Returns ARC app id. ARC platform host app is mapped to Play Store app. |
| 43 static std::string GetArcAppIdFromShelfAppId(const std::string& shelf_app_id); | 43 static std::string GetArcAppIdFromShelfAppId(const std::string& shelf_app_id); |
| 44 | 44 |
| 45 // Returns ARC task id for the window. | 45 // Returns ARC task id for the window. |
| 46 static int GetWindowTaskId(aura::Window* window); | 46 static int GetWindowTaskId(aura::Window* window); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 TaskIdToAppWindowInfo task_id_to_app_window_info_; | 117 TaskIdToAppWindowInfo task_id_to_app_window_info_; |
| 118 ShelfGroupToAppControllerMap app_shelf_group_to_controller_map_; | 118 ShelfGroupToAppControllerMap app_shelf_group_to_controller_map_; |
| 119 std::vector<aura::Window*> observed_windows_; | 119 std::vector<aura::Window*> observed_windows_; |
| 120 Profile* observed_profile_ = nullptr; | 120 Profile* observed_profile_ = nullptr; |
| 121 bool observing_shell_ = false; | 121 bool observing_shell_ = false; |
| 122 | 122 |
| 123 DISALLOW_COPY_AND_ASSIGN(ArcAppWindowLauncherController); | 123 DISALLOW_COPY_AND_ASSIGN(ArcAppWindowLauncherController); |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_ | 126 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_WINDOW_LAUNCHER_CONTROLLER_H_ |
| OLD | NEW |