• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
set_multi_profiles_enabled(bool multi_profiles_enabled)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* GetActiveBrowserContext() OVERRIDE;
43   virtual app_list::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE;
44   virtual ShelfDelegate* CreateShelfDelegate(ShelfModel* model) OVERRIDE;
45   virtual SystemTrayDelegate* CreateSystemTrayDelegate() OVERRIDE;
46   virtual UserWallpaperDelegate* CreateUserWallpaperDelegate() OVERRIDE;
47   virtual CapsLockDelegate* CreateCapsLockDelegate() OVERRIDE;
48   virtual SessionStateDelegate* CreateSessionStateDelegate() OVERRIDE;
49   virtual AccessibilityDelegate* CreateAccessibilityDelegate() OVERRIDE;
50   virtual NewWindowDelegate* CreateNewWindowDelegate() OVERRIDE;
51   virtual MediaDelegate* CreateMediaDelegate() OVERRIDE;
52   virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE;
53   virtual ui::MenuModel* CreateContextMenu(aura::Window* root) OVERRIDE;
54   virtual RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE;
55   virtual base::string16 GetProductName() const OVERRIDE;
56 
num_exit_requests()57   int num_exit_requests() const { return num_exit_requests_; }
58 
59   TestSessionStateDelegate* test_session_state_delegate();
60 
61  private:
62   int num_exit_requests_;
63   bool multi_profiles_enabled_;
64 
65   scoped_ptr<content::BrowserContext> active_browser_context_;
66 
67   TestSessionStateDelegate* test_session_state_delegate_;  // Not owned.
68 
69   DISALLOW_COPY_AND_ASSIGN(TestShellDelegate);
70 };
71 
72 }  // namespace test
73 }  // namespace ash
74 
75 #endif  // ASH_TEST_TEST_SHELL_DELEGATE_H_
76