| 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 <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 17 matching lines...) Expand all Loading... |
| 28 : ScreenTrayItem(system_tray) { | 28 : ScreenTrayItem(system_tray) { |
| 29 Shell::GetInstance()->system_tray_notifier()-> | 29 Shell::GetInstance()->system_tray_notifier()-> |
| 30 AddScreenShareObserver(this); | 30 AddScreenShareObserver(this); |
| 31 } | 31 } |
| 32 | 32 |
| 33 ScreenShareTrayItem::~ScreenShareTrayItem() { | 33 ScreenShareTrayItem::~ScreenShareTrayItem() { |
| 34 Shell::GetInstance()->system_tray_notifier()-> | 34 Shell::GetInstance()->system_tray_notifier()-> |
| 35 RemoveScreenShareObserver(this); | 35 RemoveScreenShareObserver(this); |
| 36 } | 36 } |
| 37 | 37 |
| 38 views::View* ScreenShareTrayItem::CreateTrayView(user::LoginStatus status) { | 38 views::View* ScreenShareTrayItem::CreateTrayView(LoginStatus status) { |
| 39 set_tray_view( | 39 set_tray_view( |
| 40 new tray::ScreenTrayView(this, IDR_AURA_UBER_TRAY_SCREENSHARE)); | 40 new tray::ScreenTrayView(this, IDR_AURA_UBER_TRAY_SCREENSHARE)); |
| 41 return tray_view(); | 41 return tray_view(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 views::View* ScreenShareTrayItem::CreateDefaultView(user::LoginStatus status) { | 44 views::View* ScreenShareTrayItem::CreateDefaultView(LoginStatus status) { |
| 45 set_default_view(new tray::ScreenStatusView( | 45 set_default_view(new tray::ScreenStatusView( |
| 46 this, | 46 this, |
| 47 IDR_AURA_UBER_TRAY_SCREENSHARE_DARK, | 47 IDR_AURA_UBER_TRAY_SCREENSHARE_DARK, |
| 48 l10n_util::GetStringUTF16( | 48 l10n_util::GetStringUTF16( |
| 49 IDS_ASH_STATUS_TRAY_SCREEN_SHARE_BEING_HELPED), | 49 IDS_ASH_STATUS_TRAY_SCREEN_SHARE_BEING_HELPED), |
| 50 l10n_util::GetStringUTF16( | 50 l10n_util::GetStringUTF16( |
| 51 IDS_ASH_STATUS_TRAY_SCREEN_SHARE_STOP))); | 51 IDS_ASH_STATUS_TRAY_SCREEN_SHARE_STOP))); |
| 52 return default_view(); | 52 return default_view(); |
| 53 } | 53 } |
| 54 | 54 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 92 } |
| 93 | 93 |
| 94 void ScreenShareTrayItem::OnScreenShareStop() { | 94 void ScreenShareTrayItem::OnScreenShareStop() { |
| 95 // We do not need to run the stop callback | 95 // We do not need to run the stop callback |
| 96 // when screening is stopped externally. | 96 // when screening is stopped externally. |
| 97 set_is_started(false); | 97 set_is_started(false); |
| 98 Update(); | 98 Update(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace ash | 101 } // namespace ash |
| OLD | NEW |