• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 #ifndef REMOTING_IOS_BRIDGE_HOST_PROXY_DELEGATE_WRAPPER_H_
6 #define REMOTING_IOS_BRIDGE_HOST_PROXY_DELEGATE_WRAPPER_H_
7 
8 #import <Foundation/Foundation.h>
9 #import <UIKit/UIKit.h>
10 
11 #include <vector>
12 
13 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
14 
15 #import "remoting/ios/bridge/client_proxy_delegate.h"
16 
17 // Wraps ClientProxyDelegate in a class so C++ can accept a strongly typed
18 // pointer.  C++ does not understand the id<> convention of passing around a
19 // OBJ_C @protocol pointer.  So the @protocol is wrapped and the class is passed
20 // around.  After accepting an instance of ClientProxyDelegateWrapper, the
21 // @protocol can be referenced as type (id), which is similar to a (void*),
22 
23 @interface ClientProxyDelegateWrapper : NSObject
24 
25 @property(nonatomic, retain, readonly) id<ClientProxyDelegate> delegate;
26 
27 - (id)init __unavailable;
28 
29 + (id)wrapDelegate:(id<ClientProxyDelegate>)delegate;
30 
31 @end
32 
33 #endif  // REMOTING_IOS_BRIDGE_HOST_PROXY_DELEGATE_WRAPPER_H_
34