| 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_APP_LIST_ARC_ARC_APP_TEST_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_TEST_H_ |
| 6 #define CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_TEST_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_TEST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "components/arc/common/app.mojom.h" | 13 #include "components/arc/common/app.mojom.h" |
| 14 | 14 |
| 15 namespace arc { | 15 namespace arc { |
| 16 namespace mojom { | 16 namespace mojom { |
| 17 class AppInfo; | 17 class AppInfo; |
| 18 class ArcPackageInfo; | 18 class ArcPackageInfo; |
| 19 } | 19 } |
| 20 class ArcAuthService; | 20 class ArcSessionManager; |
| 21 class FakeArcBridgeService; | 21 class FakeArcBridgeService; |
| 22 class FakeAppInstance; | 22 class FakeAppInstance; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace chromeos { | 25 namespace chromeos { |
| 26 class FakeChromeUserManager; | 26 class FakeChromeUserManager; |
| 27 class ScopedUserManagerEnabler; | 27 class ScopedUserManagerEnabler; |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace user_manager { | 30 namespace user_manager { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 } | 72 } |
| 73 | 73 |
| 74 chromeos::FakeChromeUserManager* GetUserManager(); | 74 chromeos::FakeChromeUserManager* GetUserManager(); |
| 75 | 75 |
| 76 arc::FakeArcBridgeService* bridge_service() { return bridge_service_.get(); } | 76 arc::FakeArcBridgeService* bridge_service() { return bridge_service_.get(); } |
| 77 | 77 |
| 78 arc::FakeAppInstance* app_instance() { return app_instance_.get(); } | 78 arc::FakeAppInstance* app_instance() { return app_instance_.get(); } |
| 79 | 79 |
| 80 ArcAppListPrefs* arc_app_list_prefs() { return arc_app_list_pref_; } | 80 ArcAppListPrefs* arc_app_list_prefs() { return arc_app_list_pref_; } |
| 81 | 81 |
| 82 arc::ArcAuthService* arc_auth_service() { return auth_service_.get(); } | 82 arc::ArcSessionManager* arc_session_manager() { |
| 83 return arc_session_manager_.get(); |
| 84 } |
| 83 | 85 |
| 84 private: | 86 private: |
| 85 const user_manager::User* CreateUserAndLogin(); | 87 const user_manager::User* CreateUserAndLogin(); |
| 86 bool FindPackage(const arc::mojom::ArcPackageInfo& package); | 88 bool FindPackage(const arc::mojom::ArcPackageInfo& package); |
| 87 | 89 |
| 88 // Unowned pointer. | 90 // Unowned pointer. |
| 89 Profile* profile_ = nullptr; | 91 Profile* profile_ = nullptr; |
| 90 | 92 |
| 91 ArcAppListPrefs* arc_app_list_pref_ = nullptr; | 93 ArcAppListPrefs* arc_app_list_pref_ = nullptr; |
| 92 | 94 |
| 93 std::unique_ptr<arc::FakeArcBridgeService> bridge_service_; | 95 std::unique_ptr<arc::FakeArcBridgeService> bridge_service_; |
| 94 std::unique_ptr<arc::FakeAppInstance> app_instance_; | 96 std::unique_ptr<arc::FakeAppInstance> app_instance_; |
| 95 std::unique_ptr<arc::ArcAuthService> auth_service_; | 97 std::unique_ptr<arc::ArcSessionManager> arc_session_manager_; |
| 96 std::unique_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_; | 98 std::unique_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_; |
| 97 std::vector<arc::mojom::AppInfo> fake_apps_; | 99 std::vector<arc::mojom::AppInfo> fake_apps_; |
| 98 std::vector<arc::mojom::AppInfo> fake_default_apps_; | 100 std::vector<arc::mojom::AppInfo> fake_default_apps_; |
| 99 std::vector<arc::mojom::ArcPackageInfo> fake_packages_; | 101 std::vector<arc::mojom::ArcPackageInfo> fake_packages_; |
| 100 std::vector<arc::mojom::ShortcutInfo> fake_shortcuts_; | 102 std::vector<arc::mojom::ShortcutInfo> fake_shortcuts_; |
| 101 | 103 |
| 102 bool dbus_thread_manager_initialized_ = false; | 104 bool dbus_thread_manager_initialized_ = false; |
| 103 | 105 |
| 104 DISALLOW_COPY_AND_ASSIGN(ArcAppTest); | 106 DISALLOW_COPY_AND_ASSIGN(ArcAppTest); |
| 105 }; | 107 }; |
| 106 | 108 |
| 107 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_TEST_H_ | 109 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_TEST_H_ |
| OLD | NEW |