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

Side by Side Diff: ash/common/system/chromeos/screen_security/screen_capture_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_capture_tray_item.h" 5 #include "ash/common/system/chromeos/screen_security/screen_capture_tray_item.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/metrics/user_metrics_action.h" 9 #include "ash/common/metrics/user_metrics_action.h"
10 #include "ash/common/system/system_notifier.h" 10 #include "ash/common/system/system_notifier.h"
(...skipping 20 matching lines...) Expand all
31 WmShell::Get()->AddShellObserver(this); 31 WmShell::Get()->AddShellObserver(this);
32 WmShell::Get()->system_tray_notifier()->AddScreenCaptureObserver(this); 32 WmShell::Get()->system_tray_notifier()->AddScreenCaptureObserver(this);
33 } 33 }
34 34
35 ScreenCaptureTrayItem::~ScreenCaptureTrayItem() { 35 ScreenCaptureTrayItem::~ScreenCaptureTrayItem() {
36 WmShell::Get()->RemoveShellObserver(this); 36 WmShell::Get()->RemoveShellObserver(this);
37 WmShell::Get()->system_tray_notifier()->RemoveScreenCaptureObserver(this); 37 WmShell::Get()->system_tray_notifier()->RemoveScreenCaptureObserver(this);
38 } 38 }
39 39
40 views::View* ScreenCaptureTrayItem::CreateTrayView(LoginStatus status) { 40 views::View* ScreenCaptureTrayItem::CreateTrayView(LoginStatus status) {
41 set_tray_view(new tray::ScreenTrayView(this, IDR_AURA_UBER_TRAY_SCREENSHARE)); 41 set_tray_view(new tray::ScreenTrayView(this));
42 return tray_view(); 42 return tray_view();
43 } 43 }
44 44
45 views::View* ScreenCaptureTrayItem::CreateDefaultView(LoginStatus status) { 45 views::View* ScreenCaptureTrayItem::CreateDefaultView(LoginStatus status) {
46 set_default_view(new tray::ScreenStatusView( 46 set_default_view(new tray::ScreenStatusView(
47 this, IDR_AURA_UBER_TRAY_SCREENSHARE_DARK, screen_capture_status_, 47 this, screen_capture_status_,
48 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SCREEN_CAPTURE_STOP))); 48 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SCREEN_CAPTURE_STOP)));
49 return default_view(); 49 return default_view();
50 } 50 }
51 51
52 void ScreenCaptureTrayItem::CreateOrUpdateNotification() { 52 void ScreenCaptureTrayItem::CreateOrUpdateNotification() {
53 message_center::RichNotificationData data; 53 message_center::RichNotificationData data;
54 data.buttons.push_back(message_center::ButtonInfo( 54 data.buttons.push_back(message_center::ButtonInfo(
55 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SCREEN_CAPTURE_STOP))); 55 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SCREEN_CAPTURE_STOP)));
56 ui::ResourceBundle& resource_bundle = ui::ResourceBundle::GetSharedInstance(); 56 ui::ResourceBundle& resource_bundle = ui::ResourceBundle::GetSharedInstance();
57 std::unique_ptr<Notification> notification(new Notification( 57 std::unique_ptr<Notification> notification(new Notification(
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // screen capture is stopped externally. 104 // screen capture is stopped externally.
105 set_is_started(false); 105 set_is_started(false);
106 Update(); 106 Update();
107 } 107 }
108 108
109 void ScreenCaptureTrayItem::OnCastingSessionStartedOrStopped(bool started) { 109 void ScreenCaptureTrayItem::OnCastingSessionStartedOrStopped(bool started) {
110 is_casting_ = started; 110 is_casting_ = started;
111 } 111 }
112 112
113 } // namespace ash 113 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/network/tray_vpn.cc ('k') | ash/common/system/chromeos/screen_security/screen_share_tray_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698