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_capture_tray_item.h" | 5 #include "ash/system/chromeos/screen_security/screen_capture_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 kScreenCaptureNotificationId[] = "chrome://screen/capture"; | 21 const char kScreenCaptureNotificationId[] = "chrome://screen/capture"; |
23 | 22 |
24 } // namespace | 23 } // namespace |
25 | 24 |
26 ScreenCaptureTrayItem::ScreenCaptureTrayItem(SystemTray* system_tray) | 25 ScreenCaptureTrayItem::ScreenCaptureTrayItem(SystemTray* system_tray) |
27 : ScreenTrayItem(system_tray) { | 26 : ScreenTrayItem(system_tray) { |
28 Shell::GetInstance()->system_tray_notifier()-> | 27 Shell::GetInstance()->system_tray_notifier()-> |
29 AddScreenCaptureObserver(this); | 28 AddScreenCaptureObserver(this); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 Start(stop_callback); | 82 Start(stop_callback); |
84 } | 83 } |
85 | 84 |
86 void ScreenCaptureTrayItem::OnScreenCaptureStop() { | 85 void ScreenCaptureTrayItem::OnScreenCaptureStop() { |
87 // We do not need to run the stop callback when | 86 // We do not need to run the stop callback when |
88 // screen capture is stopped externally. | 87 // screen capture is stopped externally. |
89 set_is_started(false); | 88 set_is_started(false); |
90 Update(); | 89 Update(); |
91 } | 90 } |
92 | 91 |
93 } // namespace internal | |
94 } // namespace ash | 92 } // namespace ash |
OLD | NEW |