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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/system/system_notifier.h" | 10 #include "ash/system/system_notifier.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 Shell::GetInstance()->system_tray_notifier()-> | 30 Shell::GetInstance()->system_tray_notifier()-> |
31 AddScreenCaptureObserver(this); | 31 AddScreenCaptureObserver(this); |
32 } | 32 } |
33 | 33 |
34 ScreenCaptureTrayItem::~ScreenCaptureTrayItem() { | 34 ScreenCaptureTrayItem::~ScreenCaptureTrayItem() { |
35 Shell::GetInstance()->RemoveShellObserver(this); | 35 Shell::GetInstance()->RemoveShellObserver(this); |
36 Shell::GetInstance()->system_tray_notifier()-> | 36 Shell::GetInstance()->system_tray_notifier()-> |
37 RemoveScreenCaptureObserver(this); | 37 RemoveScreenCaptureObserver(this); |
38 } | 38 } |
39 | 39 |
40 views::View* ScreenCaptureTrayItem::CreateTrayView(user::LoginStatus status) { | 40 views::View* ScreenCaptureTrayItem::CreateTrayView(LoginStatus status) { |
41 set_tray_view( | 41 set_tray_view( |
42 new tray::ScreenTrayView(this, IDR_AURA_UBER_TRAY_SCREENSHARE)); | 42 new tray::ScreenTrayView(this, IDR_AURA_UBER_TRAY_SCREENSHARE)); |
43 return tray_view(); | 43 return tray_view(); |
44 } | 44 } |
45 | 45 |
46 views::View* ScreenCaptureTrayItem::CreateDefaultView( | 46 views::View* ScreenCaptureTrayItem::CreateDefaultView(LoginStatus status) { |
47 user::LoginStatus status) { | |
48 set_default_view(new tray::ScreenStatusView( | 47 set_default_view(new tray::ScreenStatusView( |
49 this, | 48 this, |
50 IDR_AURA_UBER_TRAY_SCREENSHARE_DARK, | 49 IDR_AURA_UBER_TRAY_SCREENSHARE_DARK, |
51 screen_capture_status_, | 50 screen_capture_status_, |
52 l10n_util::GetStringUTF16( | 51 l10n_util::GetStringUTF16( |
53 IDS_ASH_STATUS_TRAY_SCREEN_CAPTURE_STOP))); | 52 IDS_ASH_STATUS_TRAY_SCREEN_CAPTURE_STOP))); |
54 return default_view(); | 53 return default_view(); |
55 } | 54 } |
56 | 55 |
57 void ScreenCaptureTrayItem::CreateOrUpdateNotification() { | 56 void ScreenCaptureTrayItem::CreateOrUpdateNotification() { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // screen capture is stopped externally. | 98 // screen capture is stopped externally. |
100 set_is_started(false); | 99 set_is_started(false); |
101 Update(); | 100 Update(); |
102 } | 101 } |
103 | 102 |
104 void ScreenCaptureTrayItem::OnCastingSessionStartedOrStopped(bool started) { | 103 void ScreenCaptureTrayItem::OnCastingSessionStartedOrStopped(bool started) { |
105 is_casting_ = started; | 104 is_casting_ = started; |
106 } | 105 } |
107 | 106 |
108 } // namespace ash | 107 } // namespace ash |
OLD | NEW |