15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef REMOTING_IOS_BRIDGE_HOST_PROXY_DELEGATE_WRAPPER_H_ 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define REMOTING_IOS_BRIDGE_HOST_PROXY_DELEGATE_WRAPPER_H_ 77d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 82a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#import <Foundation/Foundation.h> 92a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#import <UIKit/UIKit.h> 10eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch 112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include <vector> 122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" 142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 15c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)#import "remoting/ios/bridge/client_proxy_delegate.h" 162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Wraps ClientProxyDelegate in a class so C++ can accept a strongly typed 182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// pointer. C++ does not understand the id<> convention of passing around a 192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// OBJ_C @protocol pointer. So the @protocol is wrapped and the class is passed 202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// around. After accepting an instance of ClientProxyDelegateWrapper, the 215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// @protocol can be referenced as type (id), which is similar to a (void*), 222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)@interface ClientProxyDelegateWrapper : NSObject 242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 25d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)@property(nonatomic, retain, readonly) id<ClientProxyDelegate> delegate; 263551c9c881056c480085172ff9840cab31610854Torne (Richard Coles) 272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)- (id)init __unavailable; 28f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) 295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)+ (id)wrapDelegate:(id<ClientProxyDelegate>)delegate; 302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)@end 325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif // REMOTING_IOS_BRIDGE_HOST_PROXY_DELEGATE_WRAPPER_H_ 345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)