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 void PreInit() override
;
40 void PreShutdown() override
;
42 keyboard::KeyboardControllerProxy
* CreateKeyboardControllerProxy() override
;
43 void VirtualKeyboardActivated(bool activated
) override
;
44 void AddVirtualKeyboardStateObserver(
45 VirtualKeyboardStateObserver
* observer
) override
;
46 void RemoveVirtualKeyboardStateObserver(
47 VirtualKeyboardStateObserver
* observer
) override
;
48 content::BrowserContext
* GetActiveBrowserContext() override
;
49 app_list::AppListViewDelegate
* GetAppListViewDelegate() override
;
50 ShelfDelegate
* CreateShelfDelegate(ShelfModel
* model
) override
;
51 SystemTrayDelegate
* CreateSystemTrayDelegate() override
;
52 UserWallpaperDelegate
* CreateUserWallpaperDelegate() override
;
53 TestSessionStateDelegate
* CreateSessionStateDelegate() override
;
54 AccessibilityDelegate
* CreateAccessibilityDelegate() override
;
55 NewWindowDelegate
* CreateNewWindowDelegate() override
;
56 MediaDelegate
* CreateMediaDelegate() override
;
57 ui::MenuModel
* CreateContextMenu(aura::Window
* root
,
58 ash::ShelfItemDelegate
* item_delegate
,
59 ash::ShelfItem
* item
) override
;
60 GPUSupport
* CreateGPUSupport() override
;
61 base::string16
GetProductName() const override
;
63 int num_exit_requests() const { return num_exit_requests_
; }
65 void SetMediaCaptureState(MediaCaptureState state
);
68 int num_exit_requests_
;
69 bool multi_profiles_enabled_
;
71 scoped_ptr
<content::BrowserContext
> active_browser_context_
;
72 scoped_ptr
<app_list::AppListViewDelegate
> app_list_view_delegate_
;
74 ObserverList
<ash::VirtualKeyboardStateObserver
> keyboard_state_observer_list_
;
76 TestSessionStateDelegate
* test_session_state_delegate_
; // Not owned.
78 DISALLOW_COPY_AND_ASSIGN(TestShellDelegate
);
84 #endif // ASH_TEST_TEST_SHELL_DELEGATE_H_