Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: ash/common/system/chromeos/screen_security/screen_share_tray_item.cc

Issue 2228183002: Updates to icons for Ash material design system tray (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: const ref Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/common/system/chromeos/screen_security/screen_share_tray_item.h" 5 #include "ash/common/system/chromeos/screen_security/screen_share_tray_item.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/system/system_notifier.h" 9 #include "ash/common/system/system_notifier.h"
10 #include "ash/common/system/tray/system_tray_notifier.h" 10 #include "ash/common/system/tray/system_tray_notifier.h"
(...skipping 16 matching lines...) Expand all
27 ScreenShareTrayItem::ScreenShareTrayItem(SystemTray* system_tray) 27 ScreenShareTrayItem::ScreenShareTrayItem(SystemTray* system_tray)
28 : ScreenTrayItem(system_tray, UMA_SCREEN_SHARE) { 28 : ScreenTrayItem(system_tray, UMA_SCREEN_SHARE) {
29 WmShell::Get()->system_tray_notifier()->AddScreenShareObserver(this); 29 WmShell::Get()->system_tray_notifier()->AddScreenShareObserver(this);
30 } 30 }
31 31
32 ScreenShareTrayItem::~ScreenShareTrayItem() { 32 ScreenShareTrayItem::~ScreenShareTrayItem() {
33 WmShell::Get()->system_tray_notifier()->RemoveScreenShareObserver(this); 33 WmShell::Get()->system_tray_notifier()->RemoveScreenShareObserver(this);
34 } 34 }
35 35
36 views::View* ScreenShareTrayItem::CreateTrayView(LoginStatus status) { 36 views::View* ScreenShareTrayItem::CreateTrayView(LoginStatus status) {
37 set_tray_view(new tray::ScreenTrayView(this, IDR_AURA_UBER_TRAY_SCREENSHARE)); 37 set_tray_view(new tray::ScreenTrayView(this));
38 return tray_view(); 38 return tray_view();
39 } 39 }
40 40
41 views::View* ScreenShareTrayItem::CreateDefaultView(LoginStatus status) { 41 views::View* ScreenShareTrayItem::CreateDefaultView(LoginStatus status) {
42 set_default_view(new tray::ScreenStatusView( 42 set_default_view(new tray::ScreenStatusView(
43 this, IDR_AURA_UBER_TRAY_SCREENSHARE_DARK, 43 this,
44 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SCREEN_SHARE_BEING_HELPED), 44 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SCREEN_SHARE_BEING_HELPED),
45 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SCREEN_SHARE_STOP))); 45 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SCREEN_SHARE_STOP)));
46 return default_view(); 46 return default_view();
47 } 47 }
48 48
49 void ScreenShareTrayItem::CreateOrUpdateNotification() { 49 void ScreenShareTrayItem::CreateOrUpdateNotification() {
50 base::string16 help_label_text; 50 base::string16 help_label_text;
51 if (!helper_name_.empty()) { 51 if (!helper_name_.empty()) {
52 help_label_text = l10n_util::GetStringFUTF16( 52 help_label_text = l10n_util::GetStringFUTF16(
53 IDS_ASH_STATUS_TRAY_SCREEN_SHARE_BEING_HELPED_NAME, helper_name_); 53 IDS_ASH_STATUS_TRAY_SCREEN_SHARE_BEING_HELPED_NAME, helper_name_);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 94
95 void ScreenShareTrayItem::OnScreenShareStop() { 95 void ScreenShareTrayItem::OnScreenShareStop() {
96 // We do not need to run the stop callback 96 // We do not need to run the stop callback
97 // when screening is stopped externally. 97 // when screening is stopped externally.
98 set_is_started(false); 98 set_is_started(false);
99 Update(); 99 Update();
100 } 100 }
101 101
102 } // namespace ash 102 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698