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

Side by Side Diff: ash/system/screen_security/screen_capture_tray_item.cc

Issue 2808723004: Renames WmShell to ShellPort (Closed)
Patch Set: feedback Created 3 years, 8 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/system/screen_security/screen_capture_tray_item.h" 5 #include "ash/system/screen_security/screen_capture_tray_item.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/metrics/user_metrics_action.h" 9 #include "ash/metrics/user_metrics_action.h"
10 #include "ash/resources/grit/ash_resources.h" 10 #include "ash/resources/grit/ash_resources.h"
11 #include "ash/shell.h" 11 #include "ash/shell.h"
12 #include "ash/shell_port.h"
12 #include "ash/strings/grit/ash_strings.h" 13 #include "ash/strings/grit/ash_strings.h"
13 #include "ash/system/system_notifier.h" 14 #include "ash/system/system_notifier.h"
14 #include "ash/system/tray/system_tray_notifier.h" 15 #include "ash/system/tray/system_tray_notifier.h"
15 #include "ash/wm_shell.h"
16 #include "ui/base/l10n/l10n_util.h" 16 #include "ui/base/l10n/l10n_util.h"
17 #include "ui/base/resource/resource_bundle.h" 17 #include "ui/base/resource/resource_bundle.h"
18 #include "ui/message_center/message_center.h" 18 #include "ui/message_center/message_center.h"
19 #include "ui/message_center/notification.h" 19 #include "ui/message_center/notification.h"
20 20
21 using message_center::Notification; 21 using message_center::Notification;
22 22
23 namespace ash { 23 namespace ash {
24 namespace { 24 namespace {
25 25
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 notification->SetSystemPriority(); 61 notification->SetSystemPriority();
62 message_center::MessageCenter::Get()->AddNotification( 62 message_center::MessageCenter::Get()->AddNotification(
63 std::move(notification)); 63 std::move(notification));
64 } 64 }
65 65
66 std::string ScreenCaptureTrayItem::GetNotificationId() { 66 std::string ScreenCaptureTrayItem::GetNotificationId() {
67 return kScreenCaptureNotificationId; 67 return kScreenCaptureNotificationId;
68 } 68 }
69 69
70 void ScreenCaptureTrayItem::RecordStoppedFromDefaultViewMetric() { 70 void ScreenCaptureTrayItem::RecordStoppedFromDefaultViewMetric() {
71 WmShell::Get()->RecordUserMetricsAction( 71 ShellPort::Get()->RecordUserMetricsAction(
72 UMA_STATUS_AREA_SCREEN_CAPTURE_DEFAULT_STOP); 72 UMA_STATUS_AREA_SCREEN_CAPTURE_DEFAULT_STOP);
73 } 73 }
74 74
75 void ScreenCaptureTrayItem::RecordStoppedFromNotificationViewMetric() { 75 void ScreenCaptureTrayItem::RecordStoppedFromNotificationViewMetric() {
76 WmShell::Get()->RecordUserMetricsAction( 76 ShellPort::Get()->RecordUserMetricsAction(
77 UMA_STATUS_AREA_SCREEN_CAPTURE_NOTIFICATION_STOP); 77 UMA_STATUS_AREA_SCREEN_CAPTURE_NOTIFICATION_STOP);
78 } 78 }
79 79
80 void ScreenCaptureTrayItem::OnScreenCaptureStart( 80 void ScreenCaptureTrayItem::OnScreenCaptureStart(
81 const base::Closure& stop_callback, 81 const base::Closure& stop_callback,
82 const base::string16& screen_capture_status) { 82 const base::string16& screen_capture_status) {
83 screen_capture_status_ = screen_capture_status; 83 screen_capture_status_ = screen_capture_status;
84 84
85 // We do not want to show the screen capture tray item and the chromecast 85 // We do not want to show the screen capture tray item and the chromecast
86 // casting tray item at the same time. We will hide this tray item. 86 // casting tray item at the same time. We will hide this tray item.
(...skipping 13 matching lines...) Expand all
100 // screen capture is stopped externally. 100 // screen capture is stopped externally.
101 set_is_started(false); 101 set_is_started(false);
102 Update(); 102 Update();
103 } 103 }
104 104
105 void ScreenCaptureTrayItem::OnCastingSessionStartedOrStopped(bool started) { 105 void ScreenCaptureTrayItem::OnCastingSessionStartedOrStopped(bool started) {
106 is_casting_ = started; 106 is_casting_ = started;
107 } 107 }
108 108
109 } // namespace ash 109 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698