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_TRAY_ITEM_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_SCREEN_TRAY_ITEM_H_ |
6 #define ASH_SYSTEM_CHROMEOS_SCREEN_TRAY_ITEM_H_ | 6 #define ASH_SYSTEM_CHROMEOS_SCREEN_TRAY_ITEM_H_ |
7 | 7 |
8 #include "ash/common/system/tray/system_tray_item.h" | 8 #include "ash/common/system/tray/system_tray_item.h" |
9 #include "ash/common/system/tray/tray_item_view.h" | 9 #include "ash/common/system/tray/tray_item_view.h" |
10 #include "ash/common/system/tray/tray_notification_view.h" | 10 #include "ash/common/system/tray/tray_notification_view.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 ~ScreenTrayView() override; | 30 ~ScreenTrayView() override; |
31 | 31 |
32 void Update(); | 32 void Update(); |
33 | 33 |
34 private: | 34 private: |
35 ScreenTrayItem* screen_tray_item_; | 35 ScreenTrayItem* screen_tray_item_; |
36 | 36 |
37 DISALLOW_COPY_AND_ASSIGN(ScreenTrayView); | 37 DISALLOW_COPY_AND_ASSIGN(ScreenTrayView); |
38 }; | 38 }; |
39 | 39 |
40 class ScreenStatusView : public views::View, | 40 class ScreenStatusView : public views::View, public views::ButtonListener { |
41 public views::ButtonListener { | |
42 public: | 41 public: |
43 ScreenStatusView(ScreenTrayItem* screen_tray_item, | 42 ScreenStatusView(ScreenTrayItem* screen_tray_item, |
44 int icon_id, | 43 int icon_id, |
45 const base::string16& label_text, | 44 const base::string16& label_text, |
46 const base::string16& stop_button_text); | 45 const base::string16& stop_button_text); |
47 ~ScreenStatusView() override; | 46 ~ScreenStatusView() override; |
48 | 47 |
49 // Overridden from views::View. | 48 // Overridden from views::View. |
50 void Layout() override; | 49 void Layout() override; |
51 | 50 |
(...skipping 26 matching lines...) Expand all Loading... |
78 ~ScreenNotificationDelegate() override; | 77 ~ScreenNotificationDelegate() override; |
79 | 78 |
80 private: | 79 private: |
81 ScreenTrayItem* screen_tray_; | 80 ScreenTrayItem* screen_tray_; |
82 | 81 |
83 DISALLOW_COPY_AND_ASSIGN(ScreenNotificationDelegate); | 82 DISALLOW_COPY_AND_ASSIGN(ScreenNotificationDelegate); |
84 }; | 83 }; |
85 | 84 |
86 } // namespace tray | 85 } // namespace tray |
87 | 86 |
88 | |
89 // The base tray item for screen capture and screen sharing. The | 87 // The base tray item for screen capture and screen sharing. The |
90 // Start method brings up a notification and a tray item, and the user | 88 // Start method brings up a notification and a tray item, and the user |
91 // can stop the screen capture/sharing by pressing the stop button. | 89 // can stop the screen capture/sharing by pressing the stop button. |
92 class ASH_EXPORT ScreenTrayItem : public SystemTrayItem { | 90 class ASH_EXPORT ScreenTrayItem : public SystemTrayItem { |
93 public: | 91 public: |
94 explicit ScreenTrayItem(SystemTray* system_tray); | 92 explicit ScreenTrayItem(SystemTray* system_tray); |
95 ~ScreenTrayItem() override; | 93 ~ScreenTrayItem() override; |
96 | 94 |
97 tray::ScreenTrayView* tray_view() { return tray_view_; } | 95 tray::ScreenTrayView* tray_view() { return tray_view_; } |
98 void set_tray_view(tray::ScreenTrayView* tray_view) { | 96 void set_tray_view(tray::ScreenTrayView* tray_view) { |
(...skipping 30 matching lines...) Expand all Loading... |
129 tray::ScreenStatusView* default_view_; | 127 tray::ScreenStatusView* default_view_; |
130 bool is_started_; | 128 bool is_started_; |
131 base::Closure stop_callback_; | 129 base::Closure stop_callback_; |
132 | 130 |
133 DISALLOW_COPY_AND_ASSIGN(ScreenTrayItem); | 131 DISALLOW_COPY_AND_ASSIGN(ScreenTrayItem); |
134 }; | 132 }; |
135 | 133 |
136 } // namespace ash | 134 } // namespace ash |
137 | 135 |
138 #endif // ASH_SYSTEM_CHROMEOS_SCREEN_TRAY_ITEM_H_ | 136 #endif // ASH_SYSTEM_CHROMEOS_SCREEN_TRAY_ITEM_H_ |
OLD | NEW |