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.
5 #ifndef ASH_TEST_TEST_SHELL_DELEGATE_H_
6 #define ASH_TEST_TEST_SHELL_DELEGATE_H_
10 #include "ash/media_delegate.h"
11 #include "ash/shell_delegate.h"
12 #include "ash/test/test_session_state_delegate.h"
13 #include "base/compiler_specific.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/observer_list.h"
18 class KeyboardControllerProxy
;
24 class TestShellDelegate
: public ShellDelegate
{
27 ~TestShellDelegate() override
;
29 void set_multi_profiles_enabled(bool multi_profiles_enabled
) {
30 multi_profiles_enabled_
= multi_profiles_enabled
;
33 // Overridden from ShellDelegate:
34 bool IsFirstRunAfterBoot() const override
;
35 bool IsIncognitoAllowed() const override
;
36 bool IsMultiProfilesEnabled() const override
;
37 bool IsRunningInForcedAppMode() const override
;
38 bool IsMultiAccountEnabled() const override
;
39 bool IsForceMaximizeOnFirstRun() const override
;
40 void PreInit() override
;
41 void PreShutdown() override
;
43 keyboard::KeyboardControllerProxy
* CreateKeyboardControllerProxy() override
;
44 void VirtualKeyboardActivated(bool activated
) override
;
45 void AddVirtualKeyboardStateObserver(
46 VirtualKeyboardStateObserver
* observer
) override
;
47 void RemoveVirtualKeyboardStateObserver(
48 VirtualKeyboardStateObserver
* observer
) override
;
49 content::BrowserContext
* GetActiveBrowserContext() override
;
50 app_list::AppListViewDelegate
* GetAppListViewDelegate() override
;
51 ShelfDelegate
* CreateShelfDelegate(ShelfModel
* model
) override
;
52 SystemTrayDelegate
* CreateSystemTrayDelegate() override
;
53 UserWallpaperDelegate
* CreateUserWallpaperDelegate() override
;
54 TestSessionStateDelegate
* CreateSessionStateDelegate() override
;
55 AccessibilityDelegate
* CreateAccessibilityDelegate() override
;
56 NewWindowDelegate
* CreateNewWindowDelegate() override
;
57 MediaDelegate
* CreateMediaDelegate() override
;
58 ui::MenuModel
* CreateContextMenu(aura::Window
* root
,
59 ash::ShelfItemDelegate
* item_delegate
,
60 ash::ShelfItem
* item
) override
;
61 GPUSupport
* CreateGPUSupport() override
;
62 base::string16
GetProductName() const override
;
63 gfx::Image
GetDeprecatedAcceleratorImage() const override
;
65 int num_exit_requests() const { return num_exit_requests_
; }
67 void SetMediaCaptureState(MediaCaptureState state
);
68 void SetForceMaximizeOnFirstRun(bool maximize
) {
69 force_maximize_on_first_run_
= maximize
;
73 int num_exit_requests_
;
74 bool multi_profiles_enabled_
;
75 bool force_maximize_on_first_run_
;
77 scoped_ptr
<content::BrowserContext
> active_browser_context_
;
78 scoped_ptr
<app_list::AppListViewDelegate
> app_list_view_delegate_
;
80 base::ObserverList
<ash::VirtualKeyboardStateObserver
>
81 keyboard_state_observer_list_
;
83 TestSessionStateDelegate
* test_session_state_delegate_
; // Not owned.
85 DISALLOW_COPY_AND_ASSIGN(TestShellDelegate
);
91 #endif // ASH_TEST_TEST_SHELL_DELEGATE_H_