Infer appropriate GNU_STACK alignment for a shared library.
[chromium-blink-merge.git] / remoting / host / disconnect_window_chromeos.cc
blobd2f8c01a20cb97904ac1a3ebfe53e37a898396a7
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.
5 #include <string>
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"
12 namespace remoting {
14 namespace {
16 class DisconnectWindowAura : public HostWindow {
17 public:
18 DisconnectWindowAura();
19 ~DisconnectWindowAura() override;
21 // HostWindow interface.
22 void Start(const base::WeakPtr<ClientSessionControl>& client_session_control)
23 override;
25 private:
26 DISALLOW_COPY_AND_ASSIGN(DisconnectWindowAura);
29 DisconnectWindowAura::DisconnectWindowAura() {
32 DisconnectWindowAura::~DisconnectWindowAura() {
33 ash::Shell::GetInstance()->system_tray_notifier()->NotifyScreenShareStop();
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);
47 } // namespace
49 // static
50 scoped_ptr<HostWindow> HostWindow::CreateDisconnectWindow() {
51 return make_scoped_ptr(new DisconnectWindowAura());
54 } // namespace remoting