Cleanup BrowserPluginEmbedder
[chromium-blink-merge.git] / chrome / browser / chromeos / ui / screen_capture_notification_ui_chromeos.cc
blob14fe316a5a5f1326f18857075b6299dbd4243da7
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"
10 namespace chromeos {
12 ScreenCaptureNotificationUIChromeOS::ScreenCaptureNotificationUIChromeOS(
13 const base::string16& text)
14 : text_(text) {
17 ScreenCaptureNotificationUIChromeOS::~ScreenCaptureNotificationUIChromeOS() {
18 // MediaStreamCaptureIndicator will delete ScreenCaptureNotificationUI object
19 // after it stops screen capture.
20 ash::Shell::GetInstance()->system_tray_notifier()->NotifyScreenCaptureStop();
23 gfx::NativeViewId ScreenCaptureNotificationUIChromeOS::OnStarted(
24 const base::Closure& stop_callback) {
25 ash::Shell::GetInstance()->system_tray_notifier()->NotifyScreenCaptureStart(
26 stop_callback, text_);
27 return 0;
30 } // namespace chromeos
32 // static
33 scoped_ptr<ScreenCaptureNotificationUI> ScreenCaptureNotificationUI::Create(
34 const base::string16& text) {
35 return scoped_ptr<ScreenCaptureNotificationUI>(
36 new chromeos::ScreenCaptureNotificationUIChromeOS(text));