summaryrefslogtreecommitdiffstats
path: root/remoting/host/disconnect_window_mac.h
blob: c4a3423f463b55262bde478ecfe08f60ce7455fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import <Cocoa/Cocoa.h>

#include <string>

#include "base/callback.h"
#include "base/string16.h"
#include "base/strings/utf_string_conversions.h"

namespace remoting {
struct UiStrings;
}

// Controller for the disconnect window which allows the host user to
// quickly disconnect a session.
@interface DisconnectWindowController : NSWindowController {
 @private
  const remoting::UiStrings* ui_strings_;
  base::Closure disconnect_callback_;
  string16 username_;
  IBOutlet NSTextField* connectedToField_;
  IBOutlet NSButton* disconnectButton_;
}

- (id)initWithUiStrings:(const remoting::UiStrings*)ui_strings
               callback:(const base::Closure&)disconnect_callback
               username:(const std::string&)username;
- (IBAction)stopSharing:(id)sender;
@end

// A floating window with a custom border. The custom border and background
// content is defined by DisconnectView. Declared here so that it can be
// instantiated via a xib.
@interface DisconnectWindow : NSWindow
@end

// The custom background/border for the DisconnectWindow. Declared here so that
// it can be instantiated via a xib.
@interface DisconnectView : NSView
@end