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 3 // found in the LICENSE file. 4 5 #ifndef REMOTING_HOST_DISCONNECT_WINDOW_MAC_H_ 6 #define REMOTING_HOST_DISCONNECT_WINDOW_MAC_H_ 7 8 #import <Cocoa/Cocoa.h> 9 10 #include <string> 11 12 #include "base/callback.h" 13 #include "base/strings/string16.h" 14 #include "base/strings/utf_string_conversions.h" 15 16 // Controller for the disconnect window which allows the host user to 17 // quickly disconnect a session. 18 @interface DisconnectWindowController : NSWindowController { 19 @private 20 base::OnceClosure _disconnect_callback; 21 base::string16 _username; 22 } 23 24 - (id)initWithCallback:(base::OnceClosure)disconnect_callback 25 username:(const std::string&)username 26 window:(NSWindow*)window; 27 - (void)initializeWindow; 28 - (void)stopSharing:(id)sender; 29 @end 30 31 // A floating window with a custom border. The custom border and background 32 // content is defined by DisconnectView. Declared here so that it can be 33 // instantiated via a xib. 34 @interface DisconnectWindow : NSWindow 35 @end 36 37 // The custom background/border for the DisconnectWindow. Declared here so that 38 // it can be instantiated via a xib. 39 @interface DisconnectView : NSView 40 @end 41 42 #endif // REMOTING_HOST_DISCONNECT_WINDOW_MAC_H_ 43