| 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 ASH_TEST_TEST_SHELL_DELEGATE_H_ | 5 #ifndef ASH_TEST_TEST_SHELL_DELEGATE_H_ |
| 6 #define ASH_TEST_TEST_SHELL_DELEGATE_H_ | 6 #define ASH_TEST_TEST_SHELL_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "ash/shell_delegate.h" | 11 #include "ash/shell_delegate.h" |
| 12 #include "ash/test/test_session_state_delegate.h" | 12 #include "ash/test/test_session_state_delegate.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 | 14 |
| 15 class TestingPrefServiceSimple; | 15 class PrefService; |
| 16 | 16 |
| 17 namespace keyboard { | 17 namespace keyboard { |
| 18 class KeyboardUI; | 18 class KeyboardUI; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace ash { | 21 namespace ash { |
| 22 namespace test { | 22 namespace test { |
| 23 | 23 |
| 24 class ShelfInitializer; | 24 class ShelfInitializer; |
| 25 | 25 |
| 26 class TestShellDelegate : public ShellDelegate { | 26 class TestShellDelegate : public ShellDelegate { |
| 27 public: | 27 public: |
| 28 TestShellDelegate(); | 28 TestShellDelegate(); |
| 29 ~TestShellDelegate() override; | 29 ~TestShellDelegate() override; |
| 30 | 30 |
| 31 void set_multi_profiles_enabled(bool multi_profiles_enabled) { | 31 void set_multi_profiles_enabled(bool multi_profiles_enabled) { |
| 32 multi_profiles_enabled_ = multi_profiles_enabled; | 32 multi_profiles_enabled_ = multi_profiles_enabled; |
| 33 } | 33 } |
| 34 | 34 |
| 35 void set_active_user_pref_service(PrefService* pref_service) { |
| 36 active_user_pref_service_ = pref_service; |
| 37 } |
| 38 |
| 35 // Overridden from ShellDelegate: | 39 // Overridden from ShellDelegate: |
| 36 ::service_manager::Connector* GetShellConnector() const override; | 40 ::service_manager::Connector* GetShellConnector() const override; |
| 37 bool IsIncognitoAllowed() const override; | 41 bool IsIncognitoAllowed() const override; |
| 38 bool IsMultiProfilesEnabled() const override; | 42 bool IsMultiProfilesEnabled() const override; |
| 39 bool IsRunningInForcedAppMode() const override; | 43 bool IsRunningInForcedAppMode() const override; |
| 40 bool CanShowWindowForUser(WmWindow* window) const override; | 44 bool CanShowWindowForUser(WmWindow* window) const override; |
| 41 bool IsForceMaximizeOnFirstRun() const override; | 45 bool IsForceMaximizeOnFirstRun() const override; |
| 42 void PreInit() override; | 46 void PreInit() override; |
| 43 void PreShutdown() override; | 47 void PreShutdown() override; |
| 44 void Exit() override; | 48 void Exit() override; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 67 void SetForceMaximizeOnFirstRun(bool maximize) { | 71 void SetForceMaximizeOnFirstRun(bool maximize) { |
| 68 force_maximize_on_first_run_ = maximize; | 72 force_maximize_on_first_run_ = maximize; |
| 69 } | 73 } |
| 70 | 74 |
| 71 private: | 75 private: |
| 72 int num_exit_requests_; | 76 int num_exit_requests_; |
| 73 bool multi_profiles_enabled_; | 77 bool multi_profiles_enabled_; |
| 74 bool force_maximize_on_first_run_; | 78 bool force_maximize_on_first_run_; |
| 75 bool touchscreen_enabled_in_local_pref_; | 79 bool touchscreen_enabled_in_local_pref_; |
| 76 std::unique_ptr<ShelfInitializer> shelf_initializer_; | 80 std::unique_ptr<ShelfInitializer> shelf_initializer_; |
| 77 std::unique_ptr<TestingPrefServiceSimple> pref_service_; | 81 PrefService* active_user_pref_service_; // Not owned. |
| 78 | 82 |
| 79 DISALLOW_COPY_AND_ASSIGN(TestShellDelegate); | 83 DISALLOW_COPY_AND_ASSIGN(TestShellDelegate); |
| 80 }; | 84 }; |
| 81 | 85 |
| 82 } // namespace test | 86 } // namespace test |
| 83 } // namespace ash | 87 } // namespace ash |
| 84 | 88 |
| 85 #endif // ASH_TEST_TEST_SHELL_DELEGATE_H_ | 89 #endif // ASH_TEST_TEST_SHELL_DELEGATE_H_ |
| OLD | NEW |