Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / chromeos / ui / screen_capture_notification_ui_chromeos.cc
blobffb59e0c1d0800fd2b59362b5b1890481c0d57b4
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
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/ui/screen_capture_notification_ui_chromeos.h"
7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray_notifier.h"
9 #include "grit/generated_resources.h"
10 #include "ui/base/l10n/l10n_util.h"
12 namespace chromeos {
14 ScreenCaptureNotificationUIChromeOS::ScreenCaptureNotificationUIChromeOS(
15 const base::string16& text)
16 : text_(text) {
19 ScreenCaptureNotificationUIChromeOS::~ScreenCaptureNotificationUIChromeOS() {
20 // MediaStreamCaptureIndicator will delete ScreenCaptureNotificationUI object
21 // after it stops screen capture.
22 ash::Shell::GetInstance()->system_tray_notifier()->NotifyScreenCaptureStop();
25 gfx::NativeViewId ScreenCaptureNotificationUIChromeOS::OnStarted(
26 const base::Closure& stop_callback) {
27 ash::Shell::GetInstance()->system_tray_notifier()->NotifyScreenCaptureStart(
28 stop_callback, text_);
29 return 0;
32 } // namespace chromeos
34 // static
35 scoped_ptr<ScreenCaptureNotificationUI> ScreenCaptureNotificationUI::Create(
36 const base::string16& text) {
37 return scoped_ptr<ScreenCaptureNotificationUI>(
38 new chromeos::ScreenCaptureNotificationUIChromeOS(text));