- add sources.
[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/shell_delegate.h"
11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h"
13
14 namespace keyboard {
15 class KeyboardControllerProxy;
16 }
17
18 namespace ash {
19 namespace test {
20
21 class TestSessionStateDelegate;
22
23 class TestShellDelegate : public ShellDelegate {
24  public:
25   TestShellDelegate();
26   virtual ~TestShellDelegate();
27
28   void set_multi_profiles_enabled(bool multi_profiles_enabled) {
29     multi_profiles_enabled_ = multi_profiles_enabled;
30   }
31
32   // Overridden from ShellDelegate:
33   virtual bool IsFirstRunAfterBoot() const OVERRIDE;
34   virtual bool IsIncognitoAllowed() const OVERRIDE;
35   virtual bool IsMultiProfilesEnabled() const OVERRIDE;
36   virtual bool IsRunningInForcedAppMode() const OVERRIDE;
37   virtual void PreInit() OVERRIDE;
38   virtual void Shutdown() OVERRIDE;
39   virtual void Exit() OVERRIDE;
40   virtual keyboard::KeyboardControllerProxy*
41       CreateKeyboardControllerProxy() OVERRIDE;
42   virtual content::BrowserContext* GetCurrentBrowserContext() OVERRIDE;
43   virtual app_list::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE;
44   virtual LauncherDelegate* CreateLauncherDelegate(
45       ash::LauncherModel* model) OVERRIDE;
46   virtual SystemTrayDelegate* CreateSystemTrayDelegate() OVERRIDE;
47   virtual UserWallpaperDelegate* CreateUserWallpaperDelegate() OVERRIDE;
48   virtual CapsLockDelegate* CreateCapsLockDelegate() OVERRIDE;
49   virtual SessionStateDelegate* CreateSessionStateDelegate() OVERRIDE;
50   virtual AccessibilityDelegate* CreateAccessibilityDelegate() OVERRIDE;
51   virtual NewWindowDelegate* CreateNewWindowDelegate() OVERRIDE;
52   virtual MediaDelegate* CreateMediaDelegate() OVERRIDE;
53   virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE;
54   virtual void RecordUserMetricsAction(UserMetricsAction action) OVERRIDE;
55   virtual ui::MenuModel* CreateContextMenu(aura::Window* root) OVERRIDE;
56   virtual RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE;
57   virtual base::string16 GetProductName() const OVERRIDE;
58
59   int num_exit_requests() const { return num_exit_requests_; }
60
61   TestSessionStateDelegate* test_session_state_delegate();
62
63  private:
64   int num_exit_requests_;
65   bool multi_profiles_enabled_;
66
67   scoped_ptr<content::BrowserContext> current_browser_context_;
68
69   TestSessionStateDelegate* test_session_state_delegate_;  // Not owned.
70
71   DISALLOW_COPY_AND_ASSIGN(TestShellDelegate);
72 };
73
74 }  // namespace test
75 }  // namespace ash
76
77 #endif  // ASH_TEST_TEST_SHELL_DELEGATE_H_