| 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_ASH_CHROME_SHELL_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ash/shelf/shelf_item_types.h" | 10 #include "ash/shelf/shelf_item_types.h" |
| 11 #include "ash/shell_delegate.h" | 11 #include "ash/shell_delegate.h" |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
| 16 #include "chrome/browser/ui/ash/metrics/chrome_user_metrics_recorder.h" | 16 #include "chrome/browser/ui/ash/metrics/chrome_user_metrics_recorder.h" |
| 17 #include "content/public/browser/notification_observer.h" | 17 #include "content/public/browser/notification_observer.h" |
| 18 #include "content/public/browser/notification_registrar.h" | 18 #include "content/public/browser/notification_registrar.h" |
| 19 | 19 |
| 20 #if defined(OS_CHROMEOS) && defined(ENABLE_ARC) |
| 21 #include "ash/shell_observer.h" |
| 22 #endif |
| 23 |
| 20 class Browser; | 24 class Browser; |
| 21 | 25 |
| 22 namespace ash { | 26 namespace ash { |
| 23 class ShelfItemDelegate; | 27 class ShelfItemDelegate; |
| 24 } | 28 } |
| 25 | 29 |
| 26 namespace content { | 30 namespace content { |
| 27 class WebContents; | 31 class WebContents; |
| 28 } | 32 } |
| 29 | 33 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 gfx::Image GetDeprecatedAcceleratorImage() const override; | 85 gfx::Image GetDeprecatedAcceleratorImage() const override; |
| 82 void ToggleTouchpad() override; | 86 void ToggleTouchpad() override; |
| 83 void ToggleTouchscreen() override; | 87 void ToggleTouchscreen() override; |
| 84 | 88 |
| 85 // content::NotificationObserver override: | 89 // content::NotificationObserver override: |
| 86 void Observe(int type, | 90 void Observe(int type, |
| 87 const content::NotificationSource& source, | 91 const content::NotificationSource& source, |
| 88 const content::NotificationDetails& details) override; | 92 const content::NotificationDetails& details) override; |
| 89 | 93 |
| 90 private: | 94 private: |
| 95 #if defined(OS_CHROMEOS) && defined(ENABLE_ARC) |
| 96 // An Observer to track session state and start/stop ARC accordingly. |
| 97 class ArcSessionObserver : public ash::ShellObserver { |
| 98 public: |
| 99 ArcSessionObserver(); |
| 100 ~ArcSessionObserver() override; |
| 101 |
| 102 // ash::ShellObserver overrides: |
| 103 void OnLoginStateChanged(ash::user::LoginStatus status) override; |
| 104 |
| 105 private: |
| 106 DISALLOW_COPY_AND_ASSIGN(ArcSessionObserver); |
| 107 }; |
| 108 #endif |
| 109 |
| 91 void PlatformInit(); | 110 void PlatformInit(); |
| 92 | 111 |
| 93 static ChromeShellDelegate* instance_; | 112 static ChromeShellDelegate* instance_; |
| 94 | 113 |
| 95 content::NotificationRegistrar registrar_; | 114 content::NotificationRegistrar registrar_; |
| 96 | 115 |
| 97 ChromeLauncherController* shelf_delegate_; | 116 ChromeLauncherController* shelf_delegate_; |
| 98 | 117 |
| 99 base::ObserverList<ash::VirtualKeyboardStateObserver> | 118 base::ObserverList<ash::VirtualKeyboardStateObserver> |
| 100 keyboard_state_observer_list_; | 119 keyboard_state_observer_list_; |
| 101 | 120 |
| 102 // Proxies events from chrome/browser to ash::UserMetricsRecorder. | 121 // Proxies events from chrome/browser to ash::UserMetricsRecorder. |
| 103 scoped_ptr<ChromeUserMetricsRecorder> chrome_user_metrics_recorder_; | 122 scoped_ptr<ChromeUserMetricsRecorder> chrome_user_metrics_recorder_; |
| 104 | 123 |
| 105 #if defined(OS_CHROMEOS) | 124 #if defined(OS_CHROMEOS) |
| 106 scoped_ptr<chromeos::DisplayConfigurationObserver> | 125 scoped_ptr<chromeos::DisplayConfigurationObserver> |
| 107 display_configuration_observer_; | 126 display_configuration_observer_; |
| 108 #endif | 127 #endif |
| 109 | 128 |
| 129 #if defined(OS_CHROMEOS) && defined(ENABLE_ARC) |
| 130 // An Observer to track session state and start/stop ARC accordingly. |
| 131 scoped_ptr<ArcSessionObserver> arc_session_observer_; |
| 132 #endif |
| 133 |
| 110 DISALLOW_COPY_AND_ASSIGN(ChromeShellDelegate); | 134 DISALLOW_COPY_AND_ASSIGN(ChromeShellDelegate); |
| 111 }; | 135 }; |
| 112 | 136 |
| 113 #endif // CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_ | 137 #endif // CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_ |
| OLD | NEW |