OLD | NEW |
1 // Copyright (c) 2012 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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 | 12 |
13 namespace remoting { | |
14 struct UiStrings; | |
15 } | |
16 | |
17 // Controller for the disconnect window which allows the host user to | 13 // Controller for the disconnect window which allows the host user to |
18 // quickly disconnect a session. | 14 // quickly disconnect a session. |
19 @interface DisconnectWindowController : NSWindowController { | 15 @interface DisconnectWindowController : NSWindowController { |
20 @private | 16 @private |
21 const remoting::UiStrings* ui_strings_; | |
22 base::Closure disconnect_callback_; | 17 base::Closure disconnect_callback_; |
23 string16 username_; | 18 string16 username_; |
24 IBOutlet NSTextField* connectedToField_; | 19 IBOutlet NSTextField* connectedToField_; |
25 IBOutlet NSButton* disconnectButton_; | 20 IBOutlet NSButton* disconnectButton_; |
26 } | 21 } |
27 | 22 |
28 - (id)initWithUiStrings:(const remoting::UiStrings*)ui_strings | 23 - (id)initWithCallback:(const base::Closure&)disconnect_callback |
29 callback:(const base::Closure&)disconnect_callback | 24 username:(const std::string&)username; |
30 username:(const std::string&)username; | |
31 - (IBAction)stopSharing:(id)sender; | 25 - (IBAction)stopSharing:(id)sender; |
32 @end | 26 @end |
33 | 27 |
34 // A floating window with a custom border. The custom border and background | 28 // A floating window with a custom border. The custom border and background |
35 // content is defined by DisconnectView. Declared here so that it can be | 29 // content is defined by DisconnectView. Declared here so that it can be |
36 // instantiated via a xib. | 30 // instantiated via a xib. |
37 @interface DisconnectWindow : NSWindow | 31 @interface DisconnectWindow : NSWindow |
38 @end | 32 @end |
39 | 33 |
40 // The custom background/border for the DisconnectWindow. Declared here so that | 34 // The custom background/border for the DisconnectWindow. Declared here so that |
41 // it can be instantiated via a xib. | 35 // it can be instantiated via a xib. |
42 @interface DisconnectView : NSView | 36 @interface DisconnectView : NSView |
43 @end | 37 @end |
OLD | NEW |