Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Unified Diff: remoting/ios/bridge/client_proxy_delegate_wrapper.h

Issue 278863003: Chromoting iOS client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/ios/bridge/client_proxy_delegate.h ('k') | remoting/ios/bridge/client_proxy_delegate_wrapper.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/ios/bridge/client_proxy_delegate_wrapper.h
diff --git a/remoting/ios/bridge/client_proxy_delegate_wrapper.h b/remoting/ios/bridge/client_proxy_delegate_wrapper.h
new file mode 100644
index 0000000000000000000000000000000000000000..e57045bce35004653fc97f09ca42d2b62d62b073
--- /dev/null
+++ b/remoting/ios/bridge/client_proxy_delegate_wrapper.h
@@ -0,0 +1,33 @@
+// Copyright 2014 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.
+
+#ifndef REMOTING_IOS_BRIDGE_HOST_PROXY_DELEGATE_WRAPPER_H_
+#define REMOTING_IOS_BRIDGE_HOST_PROXY_DELEGATE_WRAPPER_H_
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+#include <vector>
+
+#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
+
+#import "remoting/ios/bridge/client_proxy_delegate.h"
+
+// Wraps ClientProxyDelegate in a class so C++ can accept a strongly typed
+// pointer. C++ does not understand the id<> convention of passing around a
+// OBJ_C @protocol pointer. So the @protocol is wrapped and the class is passed
+// around. After accepting an instance of ClientProxyDelegateWrapper, the
+// @protocol can be referenced as type (id), which is similar to a (void*),
+
+@interface ClientProxyDelegateWrapper : NSObject
+
+@property(nonatomic, retain, readonly) id<ClientProxyDelegate> delegate;
+
+- (id)init __unavailable;
+
++ (id)wrapDelegate:(id<ClientProxyDelegate>)delegate;
+
+@end
+
+#endif // REMOTING_IOS_BRIDGE_HOST_PROXY_DELEGATE_WRAPPER_H_
« no previous file with comments | « remoting/ios/bridge/client_proxy_delegate.h ('k') | remoting/ios/bridge/client_proxy_delegate_wrapper.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698