Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef ASH_TEST_TEST_SHELL_DELEGATE_H_ |
| 6 | #define ASH_TEST_TEST_SHELL_DELEGATE_H_ |
| 7 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 8 | #include <string> |
| 9 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 10 | #include "ash/shell_delegate.h" |
| 11 | #include "base/compiler_specific.h" |
| 12 | #include "base/memory/scoped_ptr.h" |
| 13 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 14 | namespace keyboard { |
| 15 | class KeyboardControllerProxy; |
| 16 | } |
| 17 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 18 | namespace ash { |
| 19 | namespace test { |
| 20 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 21 | class TestSessionStateDelegate; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 22 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 23 | class TestShellDelegate : public ShellDelegate { |
| 24 | public: |
| 25 | TestShellDelegate(); |
| 26 | virtual ~TestShellDelegate(); |
| 27 | |
Torne (Richard Coles) | 90dce4d | 2013-05-29 14:40:03 +0100 | [diff] [blame] | 28 | void set_multi_profiles_enabled(bool multi_profiles_enabled) { |
| 29 | multi_profiles_enabled_ = multi_profiles_enabled; |
| 30 | } |
| 31 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 32 | // Overridden from ShellDelegate: |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 33 | virtual bool IsFirstRunAfterBoot() const OVERRIDE; |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 34 | virtual bool IsMultiProfilesEnabled() const OVERRIDE; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 35 | virtual bool IsRunningInForcedAppMode() const OVERRIDE; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 36 | virtual void PreInit() OVERRIDE; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 37 | virtual void Shutdown() OVERRIDE; |
| 38 | virtual void Exit() OVERRIDE; |
| 39 | virtual void NewTab() OVERRIDE; |
| 40 | virtual void NewWindow(bool incognito) OVERRIDE; |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 41 | virtual void ToggleFullscreen() OVERRIDE; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 42 | virtual void ToggleMaximized() OVERRIDE; |
| 43 | virtual void OpenFileManager(bool as_dialog) OVERRIDE; |
| 44 | virtual void OpenCrosh() OVERRIDE; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 45 | virtual void RestoreTab() OVERRIDE; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 46 | virtual void ShowKeyboardOverlay() OVERRIDE; |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 47 | virtual keyboard::KeyboardControllerProxy* |
| 48 | CreateKeyboardControllerProxy() OVERRIDE; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 49 | virtual void ShowTaskManager() OVERRIDE; |
| 50 | virtual content::BrowserContext* GetCurrentBrowserContext() OVERRIDE; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 51 | virtual void ToggleSpokenFeedback( |
| 52 | AccessibilityNotificationVisibility notify) OVERRIDE; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 53 | virtual bool IsSpokenFeedbackEnabled() const OVERRIDE; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 54 | virtual void ToggleHighContrast() OVERRIDE; |
| 55 | virtual bool IsHighContrastEnabled() const OVERRIDE; |
| 56 | virtual void SetMagnifierEnabled(bool enabled) OVERRIDE; |
| 57 | virtual void SetMagnifierType(MagnifierType type) OVERRIDE; |
| 58 | virtual bool IsMagnifierEnabled() const OVERRIDE; |
| 59 | virtual MagnifierType GetMagnifierType() const OVERRIDE; |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 60 | virtual void SetLargeCursorEnabled(bool enabled) OVERRIDE; |
| 61 | virtual bool IsLargeCursorEnabled() const OVERRIDE; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 62 | virtual bool ShouldAlwaysShowAccessibilityMenu() const OVERRIDE; |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 63 | virtual void SilenceSpokenFeedback() const OVERRIDE; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 64 | virtual app_list::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE; |
| 65 | virtual LauncherDelegate* CreateLauncherDelegate( |
| 66 | ash::LauncherModel* model) OVERRIDE; |
| 67 | virtual SystemTrayDelegate* CreateSystemTrayDelegate() OVERRIDE; |
| 68 | virtual UserWallpaperDelegate* CreateUserWallpaperDelegate() OVERRIDE; |
| 69 | virtual CapsLockDelegate* CreateCapsLockDelegate() OVERRIDE; |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 70 | virtual SessionStateDelegate* CreateSessionStateDelegate() OVERRIDE; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 71 | virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE; |
| 72 | virtual void OpenFeedbackPage() OVERRIDE; |
| 73 | virtual void RecordUserMetricsAction(UserMetricsAction action) OVERRIDE; |
| 74 | virtual void HandleMediaNextTrack() OVERRIDE; |
| 75 | virtual void HandleMediaPlayPause() OVERRIDE; |
| 76 | virtual void HandleMediaPrevTrack() OVERRIDE; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 77 | virtual void SaveScreenMagnifierScale(double scale) OVERRIDE; |
| 78 | virtual double GetSavedScreenMagnifierScale() OVERRIDE; |
| 79 | virtual ui::MenuModel* CreateContextMenu(aura::RootWindow* root) OVERRIDE; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 80 | virtual RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE; |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 81 | virtual base::string16 GetProductName() const OVERRIDE; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 82 | |
| 83 | int num_exit_requests() const { return num_exit_requests_; } |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 84 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 85 | TestSessionStateDelegate* test_session_state_delegate(); |
| 86 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 87 | private: |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 88 | bool spoken_feedback_enabled_; |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 89 | bool high_contrast_enabled_; |
| 90 | bool screen_magnifier_enabled_; |
| 91 | MagnifierType screen_magnifier_type_; |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 92 | bool large_cursor_enabled_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 93 | int num_exit_requests_; |
Torne (Richard Coles) | 90dce4d | 2013-05-29 14:40:03 +0100 | [diff] [blame] | 94 | bool multi_profiles_enabled_; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 95 | |
| 96 | scoped_ptr<content::BrowserContext> current_browser_context_; |
| 97 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 98 | TestSessionStateDelegate* test_session_state_delegate_; // Not owned. |
| 99 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 100 | DISALLOW_COPY_AND_ASSIGN(TestShellDelegate); |
| 101 | }; |
| 102 | |
| 103 | } // namespace test |
| 104 | } // namespace ash |
| 105 | |
| 106 | #endif // ASH_TEST_TEST_SHELL_DELEGATE_H_ |