Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: ash/common/system/chromeos/screen_security/screen_capture_tray_item.h

Issue 2465403002: Some more fixes to cros system tray icons (esp. screen tray items) (Closed)
Patch Set: commentary Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_COMMON_SYSTEM_CHROMEOS_SCREEN_SECURITY_SCREEN_CAPTURE_TRAY_ITEM_H_ 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_SCREEN_SECURITY_SCREEN_CAPTURE_TRAY_ITEM_H_
6 #define ASH_COMMON_SYSTEM_CHROMEOS_SCREEN_SECURITY_SCREEN_CAPTURE_TRAY_ITEM_H_ 6 #define ASH_COMMON_SYSTEM_CHROMEOS_SCREEN_SECURITY_SCREEN_CAPTURE_TRAY_ITEM_H_
7 7
8 #include "ash/common/shell_observer.h" 8 #include "ash/common/shell_observer.h"
9 #include "ash/common/system/chromeos/screen_security/screen_capture_observer.h" 9 #include "ash/common/system/chromeos/screen_security/screen_capture_observer.h"
10 #include "ash/common/system/chromeos/screen_security/screen_tray_item.h" 10 #include "ash/common/system/chromeos/screen_security/screen_tray_item.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 12
13 namespace views { 13 namespace views {
14 class View; 14 class View;
15 } 15 }
16 16
17 namespace ash { 17 namespace ash {
18 18
19 class ASH_EXPORT ScreenCaptureTrayItem : public ScreenTrayItem, 19 class ASH_EXPORT ScreenCaptureTrayItem : public ScreenTrayItem,
20 public ScreenCaptureObserver, 20 public ScreenCaptureObserver,
21 public ShellObserver { 21 public ShellObserver {
22 public: 22 public:
23 explicit ScreenCaptureTrayItem(SystemTray* system_tray); 23 explicit ScreenCaptureTrayItem(SystemTray* system_tray);
24 ~ScreenCaptureTrayItem() override; 24 ~ScreenCaptureTrayItem() override;
25 25
26 private: 26 private:
27 // Overridden from SystemTrayItem. 27 // Overridden from SystemTrayItem.
28 views::View* CreateTrayView(LoginStatus status) override;
29 views::View* CreateDefaultView(LoginStatus status) override; 28 views::View* CreateDefaultView(LoginStatus status) override;
30 29
31 // Overridden from ScreenTrayItem. 30 // Overridden from ScreenTrayItem.
32 void CreateOrUpdateNotification() override; 31 void CreateOrUpdateNotification() override;
33 std::string GetNotificationId() override; 32 std::string GetNotificationId() override;
34 void RecordStoppedFromDefaultViewMetric() override; 33 void RecordStoppedFromDefaultViewMetric() override;
35 void RecordStoppedFromNotificationViewMetric() override; 34 void RecordStoppedFromNotificationViewMetric() override;
36 35
37 // Overridden from ScreenCaptureObserver. 36 // Overridden from ScreenCaptureObserver.
38 void OnScreenCaptureStart( 37 void OnScreenCaptureStart(
39 const base::Closure& stop_callback, 38 const base::Closure& stop_callback,
40 const base::string16& screen_capture_status) override; 39 const base::string16& screen_capture_status) override;
41 void OnScreenCaptureStop() override; 40 void OnScreenCaptureStop() override;
42 41
43 // Overridden from ShellObserver. 42 // Overridden from ShellObserver.
44 void OnCastingSessionStartedOrStopped(bool started) override; 43 void OnCastingSessionStartedOrStopped(bool started) override;
45 44
46 base::string16 screen_capture_status_; 45 base::string16 screen_capture_status_;
47 bool is_casting_ = false; 46 bool is_casting_ = false;
48 47
49 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureTrayItem); 48 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureTrayItem);
50 }; 49 };
51 50
52 } // namespace ash 51 } // namespace ash
53 52
54 #endif // ASH_COMMON_SYSTEM_CHROMEOS_SCREEN_SECURITY_SCREEN_CAPTURE_TRAY_ITEM_H _ 53 #endif // ASH_COMMON_SYSTEM_CHROMEOS_SCREEN_SECURITY_SCREEN_CAPTURE_TRAY_ITEM_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698