OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
| 7 #include "base/callback.h" |
| 8 #include "remoting/host/disconnect_window.h" |
| 9 |
7 namespace remoting { | 10 namespace remoting { |
8 class ChromotingHost; | 11 class ChromotingHost; |
9 } | 12 } |
10 | 13 |
11 // Controller for the disconnect window which allows the host user to | 14 // Controller for the disconnect window which allows the host user to |
12 // quickly disconnect a session. | 15 // quickly disconnect a session. |
13 @interface DisconnectWindowController : NSWindowController { | 16 @interface DisconnectWindowController : NSWindowController { |
14 @private | 17 @private |
15 remoting::ChromotingHost* host_; | 18 remoting::ChromotingHost* host_; |
| 19 base::Closure disconnect_callback_; |
16 NSString* username_; | 20 NSString* username_; |
17 IBOutlet NSTextField* connectedToField_; | 21 IBOutlet NSTextField* connectedToField_; |
18 IBOutlet NSButton* disconnectButton_; | 22 IBOutlet NSButton* disconnectButton_; |
19 } | 23 } |
20 | 24 |
21 - (id)initWithHost:(remoting::ChromotingHost*)host | 25 - (id)initWithHost:(remoting::ChromotingHost*)host |
| 26 callback:(const base::Closure&)disconnect_callback |
22 username:(NSString*)username; | 27 username:(NSString*)username; |
23 - (IBAction)stopSharing:(id)sender; | 28 - (IBAction)stopSharing:(id)sender; |
24 @end | 29 @end |
25 | 30 |
26 // A floating window with a custom border. The custom border and background | 31 // A floating window with a custom border. The custom border and background |
27 // content is defined by DisconnectView. Declared here so that it can be | 32 // content is defined by DisconnectView. Declared here so that it can be |
28 // instantiated via a xib. | 33 // instantiated via a xib. |
29 @interface DisconnectWindow : NSWindow | 34 @interface DisconnectWindow : NSWindow |
30 @end | 35 @end |
31 | 36 |
32 // The custom background/border for the DisconnectWindow. Declared here so that | 37 // The custom background/border for the DisconnectWindow. Declared here so that |
33 // it can be instantiated via a xib. | 38 // it can be instantiated via a xib. |
34 @interface DisconnectView : NSView | 39 @interface DisconnectView : NSView |
35 @end | 40 @end |
OLD | NEW |