Chromium Code Reviews| 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/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.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 "build/build_config.h" | 16 #include "build/build_config.h" |
| 17 #include "chrome/browser/ui/ash/metrics/chrome_user_metrics_recorder.h" | 17 #include "chrome/browser/ui/ash/metrics/chrome_user_metrics_recorder.h" |
| 18 #include "content/public/browser/notification_observer.h" | 18 #include "content/public/browser/notification_observer.h" |
| 19 #include "content/public/browser/notification_registrar.h" | 19 #include "content/public/browser/notification_registrar.h" |
| 20 | 20 |
| 21 #if defined(OS_CHROMEOS) | |
| 22 #include "ash/shell_observer.h" | |
| 23 #endif | |
| 24 | |
| 25 class Browser; | 21 class Browser; |
| 26 | 22 |
| 27 namespace ash { | 23 namespace ash { |
| 28 class ShelfItemDelegate; | 24 class ShelfItemDelegate; |
| 29 } | 25 } |
| 30 | 26 |
| 31 namespace content { | 27 namespace content { |
| 32 class WebContents; | 28 class WebContents; |
| 33 } | 29 } |
| 34 | 30 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 gfx::Image GetDeprecatedAcceleratorImage() const override; | 81 gfx::Image GetDeprecatedAcceleratorImage() const override; |
| 86 void ToggleTouchpad() override; | 82 void ToggleTouchpad() override; |
| 87 void ToggleTouchscreen() override; | 83 void ToggleTouchscreen() override; |
| 88 | 84 |
| 89 // content::NotificationObserver override: | 85 // content::NotificationObserver override: |
| 90 void Observe(int type, | 86 void Observe(int type, |
| 91 const content::NotificationSource& source, | 87 const content::NotificationSource& source, |
| 92 const content::NotificationDetails& details) override; | 88 const content::NotificationDetails& details) override; |
| 93 | 89 |
| 94 private: | 90 private: |
| 95 #if defined(OS_CHROMEOS) | |
| 96 // An Observer to track session state and start/stop ARC accordingly. | |
| 97 class ArcSessionObserver : public ash::ShellObserver { | |
|
khmel
2016/01/22 21:55:24
We had 2 points to handle user login. I removed th
| |
| 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 | |
| 110 void PlatformInit(); | 91 void PlatformInit(); |
| 111 | 92 |
| 112 static ChromeShellDelegate* instance_; | 93 static ChromeShellDelegate* instance_; |
| 113 | 94 |
| 114 content::NotificationRegistrar registrar_; | 95 content::NotificationRegistrar registrar_; |
| 115 | 96 |
| 116 ChromeLauncherController* shelf_delegate_; | 97 ChromeLauncherController* shelf_delegate_; |
| 117 | 98 |
| 118 base::ObserverList<ash::VirtualKeyboardStateObserver> | 99 base::ObserverList<ash::VirtualKeyboardStateObserver> |
| 119 keyboard_state_observer_list_; | 100 keyboard_state_observer_list_; |
| 120 | 101 |
| 121 // Proxies events from chrome/browser to ash::UserMetricsRecorder. | 102 // Proxies events from chrome/browser to ash::UserMetricsRecorder. |
| 122 scoped_ptr<ChromeUserMetricsRecorder> chrome_user_metrics_recorder_; | 103 scoped_ptr<ChromeUserMetricsRecorder> chrome_user_metrics_recorder_; |
| 123 | 104 |
| 124 #if defined(OS_CHROMEOS) | 105 #if defined(OS_CHROMEOS) |
| 125 scoped_ptr<chromeos::DisplayConfigurationObserver> | 106 scoped_ptr<chromeos::DisplayConfigurationObserver> |
| 126 display_configuration_observer_; | 107 display_configuration_observer_; |
| 127 | |
| 128 // An Observer to track session state and start/stop ARC accordingly. | |
| 129 scoped_ptr<ArcSessionObserver> arc_session_observer_; | |
| 130 #endif | 108 #endif |
| 131 | 109 |
| 132 DISALLOW_COPY_AND_ASSIGN(ChromeShellDelegate); | 110 DISALLOW_COPY_AND_ASSIGN(ChromeShellDelegate); |
| 133 }; | 111 }; |
| 134 | 112 |
| 135 #endif // CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_ | 113 #endif // CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_ |
| OLD | NEW |