| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 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. | |
| 4 | |
| 5 #include <string> | |
| 6 | |
| 7 #include "ash/shell.h" | |
| 8 #include "ash/system/tray/system_tray_notifier.h" | |
| 9 #include "remoting/host/client_session_control.h" | |
| 10 #include "remoting/host/host_window.h" | |
| 11 | |
| 12 namespace remoting { | |
| 13 | |
| 14 namespace { | |
| 15 | |
| 16 class DisconnectWindowAura : public HostWindow { | |
| 17 public: | |
| 18 DisconnectWindowAura(); | |
| 19 ~DisconnectWindowAura() override; | |
| 20 | |
| 21 // HostWindow interface. | |
| 22 void Start(const base::WeakPtr<ClientSessionControl>& client_session_control) | |
| 23 override; | |
| 24 | |
| 25 private: | |
| 26 DISALLOW_COPY_AND_ASSIGN(DisconnectWindowAura); | |
| 27 }; | |
| 28 | |
| 29 DisconnectWindowAura::DisconnectWindowAura() { | |
| 30 } | |
| 31 | |
| 32 DisconnectWindowAura::~DisconnectWindowAura() { | |
| 33 ash::Shell::GetInstance()->system_tray_notifier()->NotifyScreenShareStop(); | |
| 34 } | |
| 35 | |
| 36 void DisconnectWindowAura::Start( | |
| 37 const base::WeakPtr<ClientSessionControl>& client_session_control) { | |
| 38 // TODO(kelvinp): Clean up the NotifyScreenShareStart interface when we | |
| 39 // completely retire Hangout Remote Desktop v1. | |
| 40 base::string16 helper_name; | |
| 41 ash::Shell::GetInstance()->system_tray_notifier()->NotifyScreenShareStart( | |
| 42 base::Bind(&ClientSessionControl::DisconnectSession, | |
| 43 client_session_control), | |
| 44 helper_name); | |
| 45 } | |
| 46 | |
| 47 } // namespace | |
| 48 | |
| 49 // static | |
| 50 scoped_ptr<HostWindow> HostWindow::CreateDisconnectWindow() { | |
| 51 return make_scoped_ptr(new DisconnectWindowAura()); | |
| 52 } | |
| 53 | |
| 54 } // namespace remoting | |
| OLD | NEW |