Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ash / test / test_shell_delegate.h
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
8 #include <string>
9
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
15 namespace keyboard {
16 class KeyboardControllerProxy;
17 }
18
19 namespace ash {
20 namespace test {
21
22 class TestSessionStateDelegate;
23
24 class TestShellDelegate : public ShellDelegate {
25  public:
26   TestShellDelegate();
27   virtual ~TestShellDelegate();
28
29   void set_multi_profiles_enabled(bool multi_profiles_enabled) {
30     multi_profiles_enabled_ = multi_profiles_enabled;
31   }
32
33   // Overridden from ShellDelegate:
34   virtual bool IsFirstRunAfterBoot() const OVERRIDE;
35   virtual bool IsIncognitoAllowed() const OVERRIDE;
36   virtual bool IsMultiProfilesEnabled() const OVERRIDE;
37   virtual bool IsRunningInForcedAppMode() const OVERRIDE;
38   virtual bool IsMultiAccountEnabled() const OVERRIDE;
39   virtual void PreInit() OVERRIDE;
40   virtual void PreShutdown() OVERRIDE;
41   virtual void Exit() OVERRIDE;
42   virtual keyboard::KeyboardControllerProxy*
43       CreateKeyboardControllerProxy() OVERRIDE;
44   virtual void VirtualKeyboardActivated(bool activated) OVERRIDE;
45   virtual void AddVirtualKeyboardStateObserver(
46       VirtualKeyboardStateObserver* observer) OVERRIDE;
47   virtual void RemoveVirtualKeyboardStateObserver(
48       VirtualKeyboardStateObserver* observer) OVERRIDE;
49   virtual content::BrowserContext* GetActiveBrowserContext() OVERRIDE;
50   virtual app_list::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE;
51   virtual ShelfDelegate* CreateShelfDelegate(ShelfModel* model) OVERRIDE;
52   virtual SystemTrayDelegate* CreateSystemTrayDelegate() OVERRIDE;
53   virtual UserWallpaperDelegate* CreateUserWallpaperDelegate() OVERRIDE;
54   virtual SessionStateDelegate* CreateSessionStateDelegate() OVERRIDE;
55   virtual AccessibilityDelegate* CreateAccessibilityDelegate() OVERRIDE;
56   virtual NewWindowDelegate* CreateNewWindowDelegate() OVERRIDE;
57   virtual MediaDelegate* CreateMediaDelegate() OVERRIDE;
58   virtual ui::MenuModel* CreateContextMenu(
59       aura::Window* root,
60       ash::ShelfItemDelegate* item_delegate,
61       ash::ShelfItem* item) OVERRIDE;
62   virtual GPUSupport* CreateGPUSupport() OVERRIDE;
63   virtual base::string16 GetProductName() const OVERRIDE;
64
65   int num_exit_requests() const { return num_exit_requests_; }
66
67   TestSessionStateDelegate* test_session_state_delegate() {
68     return test_session_state_delegate_;
69   }
70
71   void SetMediaCaptureState(MediaCaptureState state);
72
73  private:
74   int num_exit_requests_;
75   bool multi_profiles_enabled_;
76
77   scoped_ptr<content::BrowserContext> active_browser_context_;
78
79   TestSessionStateDelegate* test_session_state_delegate_;  // Not owned.
80
81   DISALLOW_COPY_AND_ASSIGN(TestShellDelegate);
82 };
83
84 }  // namespace test
85 }  // namespace ash
86
87 #endif  // ASH_TEST_TEST_SHELL_DELEGATE_H_