OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 ASH_SYSTEM_CHROMEOS_SCREEN_CAPTURE_SCREEN_CAPTURE_TRAY_ITEM_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_SCREEN_CAPTURE_SCREEN_CAPTURE_TRAY_ITEM_H_ |
6 #define ASH_SYSTEM_CHROMEOS_SCREEN_CAPTURE_SCREEN_CAPTURE_TRAY_ITEM_H_ | 6 #define ASH_SYSTEM_CHROMEOS_SCREEN_CAPTURE_SCREEN_CAPTURE_TRAY_ITEM_H_ |
7 | 7 |
| 8 #include "ash/shell_observer.h" |
8 #include "ash/system/chromeos/screen_security/screen_capture_observer.h" | 9 #include "ash/system/chromeos/screen_security/screen_capture_observer.h" |
9 #include "ash/system/chromeos/screen_security/screen_tray_item.h" | 10 #include "ash/system/chromeos/screen_security/screen_tray_item.h" |
10 | 11 |
11 namespace views { | 12 namespace views { |
12 class View; | 13 class View; |
13 } | 14 } |
14 | 15 |
15 namespace ash { | 16 namespace ash { |
16 | 17 |
17 class ASH_EXPORT ScreenCaptureTrayItem : public ScreenTrayItem, | 18 class ASH_EXPORT ScreenCaptureTrayItem : public ScreenTrayItem, |
18 public ScreenCaptureObserver { | 19 public ScreenCaptureObserver, |
| 20 public ShellObserver { |
19 public: | 21 public: |
20 explicit ScreenCaptureTrayItem(SystemTray* system_tray); | 22 explicit ScreenCaptureTrayItem(SystemTray* system_tray); |
21 ~ScreenCaptureTrayItem() override; | 23 ~ScreenCaptureTrayItem() override; |
22 | 24 |
23 private: | 25 private: |
24 // Overridden from SystemTrayItem. | 26 // Overridden from SystemTrayItem. |
25 views::View* CreateTrayView(user::LoginStatus status) override; | 27 views::View* CreateTrayView(user::LoginStatus status) override; |
26 views::View* CreateDefaultView(user::LoginStatus status) override; | 28 views::View* CreateDefaultView(user::LoginStatus status) override; |
27 | 29 |
28 // Overridden from ScreenTrayItem. | 30 // Overridden from ScreenTrayItem. |
29 void CreateOrUpdateNotification() override; | 31 void CreateOrUpdateNotification() override; |
30 std::string GetNotificationId() override; | 32 std::string GetNotificationId() override; |
31 | 33 |
32 // Overridden from ScreenCaptureObserver. | 34 // Overridden from ScreenCaptureObserver. |
33 void OnScreenCaptureStart( | 35 void OnScreenCaptureStart( |
34 const base::Closure& stop_callback, | 36 const base::Closure& stop_callback, |
35 const base::string16& screen_capture_status) override; | 37 const base::string16& screen_capture_status) override; |
36 void OnScreenCaptureStop() override; | 38 void OnScreenCaptureStop() override; |
37 | 39 |
| 40 // Overridden from ShellObserver. |
| 41 void OnCastingSessionStartedOrStopped(bool started) override; |
| 42 |
38 base::string16 screen_capture_status_; | 43 base::string16 screen_capture_status_; |
| 44 bool is_casting_; |
39 | 45 |
40 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureTrayItem); | 46 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureTrayItem); |
41 }; | 47 }; |
42 | 48 |
43 } // namespace ash | 49 } // namespace ash |
44 | 50 |
45 #endif // ASH_SYSTEM_CHROMEOS_SCREEN_CAPTURE_SCREEN_CAPTURE_TRAY_ITEM_H_ | 51 #endif // ASH_SYSTEM_CHROMEOS_SCREEN_CAPTURE_SCREEN_CAPTURE_TRAY_ITEM_H_ |
OLD | NEW |