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 "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/observer_list.h"
17 class KeyboardControllerProxy
;
23 class TestSessionStateDelegate
;
25 class TestShellDelegate
: public ShellDelegate
{
28 ~TestShellDelegate() override
;
30 void set_multi_profiles_enabled(bool multi_profiles_enabled
) {
31 multi_profiles_enabled_
= multi_profiles_enabled
;
34 // Overridden from ShellDelegate:
35 bool IsFirstRunAfterBoot() const override
;
36 bool IsIncognitoAllowed() const override
;
37 bool IsMultiProfilesEnabled() const override
;
38 bool IsRunningInForcedAppMode() const override
;
39 bool IsMultiAccountEnabled() 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 SessionStateDelegate
* 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
;
64 int num_exit_requests() const { return num_exit_requests_
; }
66 TestSessionStateDelegate
* test_session_state_delegate() {
67 return test_session_state_delegate_
;
70 void SetMediaCaptureState(MediaCaptureState state
);
73 int num_exit_requests_
;
74 bool multi_profiles_enabled_
;
76 scoped_ptr
<content::BrowserContext
> active_browser_context_
;
77 scoped_ptr
<app_list::AppListViewDelegate
> app_list_view_delegate_
;
79 ObserverList
<ash::VirtualKeyboardStateObserver
> keyboard_state_observer_list_
;
81 TestSessionStateDelegate
* test_session_state_delegate_
; // Not owned.
83 DISALLOW_COPY_AND_ASSIGN(TestShellDelegate
);
89 #endif // ASH_TEST_TEST_SHELL_DELEGATE_H_