OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_ASH_CHROME_SHELL_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_ASH_CHROME_SHELL_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_ASH_CHROME_SHELL_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_ASH_CHROME_SHELL_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ash/launcher/launcher_types.h" | 9 #include "ash/launcher/launcher_types.h" |
10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "content/public/browser/notification_observer.h" | 14 #include "content/public/browser/notification_observer.h" |
15 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
16 | 16 |
17 #if defined(OS_CHROMEOS) | |
Mattias Nissler (ping if slow)
2012/07/06 15:15:52
no need for guards
qfel
2012/07/06 17:00:39
Done
| |
18 #include "chrome/browser/prefs/pref_change_registrar.h" | |
19 #endif | |
20 | |
17 class WindowPositioner; | 21 class WindowPositioner; |
18 | 22 |
19 namespace views { | 23 namespace views { |
20 class View; | 24 class View; |
21 } | 25 } |
22 | 26 |
23 class ChromeShellDelegate : public ash::ShellDelegate, | 27 class ChromeShellDelegate : public ash::ShellDelegate, |
24 public content::NotificationObserver { | 28 public content::NotificationObserver { |
25 public: | 29 public: |
26 ChromeShellDelegate(); | 30 ChromeShellDelegate(); |
27 virtual ~ChromeShellDelegate(); | 31 virtual ~ChromeShellDelegate(); |
28 | 32 |
29 static ChromeShellDelegate* instance() { return instance_; } | 33 static ChromeShellDelegate* instance() { return instance_; } |
30 | 34 |
31 WindowPositioner* window_positioner() { return window_positioner_.get(); } | 35 WindowPositioner* window_positioner() { return window_positioner_.get(); } |
32 | 36 |
37 #if defined(OS_CHROMEOS) | |
38 void UpdateScreenshotDelegate(); | |
39 #endif | |
40 | |
33 // ash::ShellDelegate overrides; | 41 // ash::ShellDelegate overrides; |
34 virtual bool IsUserLoggedIn() OVERRIDE; | 42 virtual bool IsUserLoggedIn() OVERRIDE; |
35 virtual void LockScreen() OVERRIDE; | 43 virtual void LockScreen() OVERRIDE; |
36 virtual void UnlockScreen() OVERRIDE; | 44 virtual void UnlockScreen() OVERRIDE; |
37 virtual bool IsScreenLocked() const OVERRIDE; | 45 virtual bool IsScreenLocked() const OVERRIDE; |
38 virtual void Shutdown() OVERRIDE; | 46 virtual void Shutdown() OVERRIDE; |
39 virtual void Exit() OVERRIDE; | 47 virtual void Exit() OVERRIDE; |
40 virtual void NewTab() OVERRIDE; | 48 virtual void NewTab() OVERRIDE; |
41 virtual void NewWindow(bool is_incognito) OVERRIDE; | 49 virtual void NewWindow(bool is_incognito) OVERRIDE; |
42 virtual void OpenFileManager(bool as_dialog) OVERRIDE; | 50 virtual void OpenFileManager(bool as_dialog) OVERRIDE; |
(...skipping 17 matching lines...) Expand all Loading... | |
60 virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE; | 68 virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE; |
61 | 69 |
62 // content::NotificationObserver override: | 70 // content::NotificationObserver override: |
63 virtual void Observe(int type, | 71 virtual void Observe(int type, |
64 const content::NotificationSource& source, | 72 const content::NotificationSource& source, |
65 const content::NotificationDetails& details) OVERRIDE; | 73 const content::NotificationDetails& details) OVERRIDE; |
66 | 74 |
67 private: | 75 private: |
68 static ChromeShellDelegate* instance_; | 76 static ChromeShellDelegate* instance_; |
69 | 77 |
78 #if defined(OS_CHROMEOS) | |
70 content::NotificationRegistrar registrar_; | 79 content::NotificationRegistrar registrar_; |
80 PrefChangeRegistrar pref_registrar_; | |
81 #endif | |
71 | 82 |
72 scoped_ptr<WindowPositioner> window_positioner_; | 83 scoped_ptr<WindowPositioner> window_positioner_; |
73 | 84 |
74 base::WeakPtrFactory<ChromeShellDelegate> weak_factory_; | 85 base::WeakPtrFactory<ChromeShellDelegate> weak_factory_; |
75 | 86 |
76 DISALLOW_COPY_AND_ASSIGN(ChromeShellDelegate); | 87 DISALLOW_COPY_AND_ASSIGN(ChromeShellDelegate); |
77 }; | 88 }; |
78 | 89 |
79 #endif // CHROME_BROWSER_UI_VIEWS_ASH_CHROME_SHELL_DELEGATE_H_ | 90 #endif // CHROME_BROWSER_UI_VIEWS_ASH_CHROME_SHELL_DELEGATE_H_ |
OLD | NEW |