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 #include "ash/system/chromeos/screen_security/screen_share_tray_item.h" | 5 #include "ash/system/chromeos/screen_security/screen_share_tray_item.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/system_notifier.h" | 8 #include "ash/system/system_notifier.h" |
9 #include "grit/ash_resources.h" | 9 #include "grit/ash_resources.h" |
10 #include "grit/ash_strings.h" | 10 #include "grit/ash_strings.h" |
11 #include "ui/base/l10n/l10n_util.h" | 11 #include "ui/base/l10n/l10n_util.h" |
12 #include "ui/base/resource/resource_bundle.h" | 12 #include "ui/base/resource/resource_bundle.h" |
13 #include "ui/message_center/message_center.h" | 13 #include "ui/message_center/message_center.h" |
14 #include "ui/message_center/notification.h" | 14 #include "ui/message_center/notification.h" |
15 | 15 |
16 using message_center::Notification; | 16 using message_center::Notification; |
17 | 17 |
18 namespace ash { | 18 namespace ash { |
19 namespace internal { | |
20 namespace { | 19 namespace { |
21 | 20 |
22 const char kScreenShareNotificationId[] = "chrome://screen/share"; | 21 const char kScreenShareNotificationId[] = "chrome://screen/share"; |
23 | 22 |
24 } | 23 } |
25 | 24 |
26 ScreenShareTrayItem::ScreenShareTrayItem(SystemTray* system_tray) | 25 ScreenShareTrayItem::ScreenShareTrayItem(SystemTray* system_tray) |
27 : ScreenTrayItem(system_tray) { | 26 : ScreenTrayItem(system_tray) { |
28 Shell::GetInstance()->system_tray_notifier()-> | 27 Shell::GetInstance()->system_tray_notifier()-> |
29 AddScreenShareObserver(this); | 28 AddScreenShareObserver(this); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 Start(stop_callback); | 92 Start(stop_callback); |
94 } | 93 } |
95 | 94 |
96 void ScreenShareTrayItem::OnScreenShareStop() { | 95 void ScreenShareTrayItem::OnScreenShareStop() { |
97 // We do not need to run the stop callback | 96 // We do not need to run the stop callback |
98 // when screening is stopped externally. | 97 // when screening is stopped externally. |
99 set_is_started(false); | 98 set_is_started(false); |
100 Update(); | 99 Update(); |
101 } | 100 } |
102 | 101 |
103 } // namespace internal | |
104 } // namespace ash | 102 } // namespace ash |
OLD | NEW |