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

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

Issue 186733007: iOS Chromoting Client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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_instance_unittest.mm ('k') | remoting/ios/bridge/client_proxy.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/ios/bridge/client_proxy.h
diff --git a/remoting/ios/bridge/client_proxy.h b/remoting/ios/bridge/client_proxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..8088570550f565d40c930a9a4a6d94e905f55889
--- /dev/null
+++ b/remoting/ios/bridge/client_proxy.h
@@ -0,0 +1,62 @@
+// 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_H_
+#define REMOTING_IOS_BRIDGE_HOST_PROXY_H_
+
+#include <string>
+
+#include <objc/objc.h>
+#include "base/memory/weak_ptr.h"
+#include "remoting/protocol/connection_to_host.h"
+#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
+
+#if defined(__OBJC__)
+@class ClientProxyDelegateWrapper;
+#else // __OBJC__
+class ClientProxyDelegateWrapper;
+#endif // __OBJC__
+
+namespace remoting {
+
+// Proxies incoming common Chromoting protocol (HOST) to the UI Application
+// (CLIENT). The HOST will have a Weak reference to call member functions on
+// the UI Thread.
+class ClientProxy : public base::SupportsWeakPtr<ClientProxy> {
+ public:
+ ClientProxy(ClientProxyDelegateWrapper* wrapper);
+
+ // Notifies the user of the current connection status.
+ void ReportConnectionStatus(protocol::ConnectionToHost::State state,
+ protocol::ErrorCode error);
+
+ // Display a dialog box asking the user to enter a PIN.
+ void DisplayAuthenticationPrompt(bool pairing_supported);
+
+ // Saves new pairing credentials to permanent storage.
+ void CommitPairingCredentials(const std::string& hostId,
+ const std::string& pairId,
+ const std::string& pairSecret);
+
+ // Delivers the latest image buffer for the canvas.
+ void RedrawCanvas(const webrtc::DesktopSize& view_size,
+ webrtc::DesktopFrame* buffer,
+ const webrtc::DesktopRegion& region);
+
+ // Updates cursor.
+ void UpdateCursorShape(const protocol::CursorShapeInfo& cursor_shape);
+
+ private:
+ // Pointer to the UI application which implements the ClientProxyDelegate.
+ // (id) is similar to a (void*) |delegate_| is set from accepting a
+ // strongly typed @interface which wraps the @protocol ClientProxyDelegate.
+ // see comments for host_proxy_delegate_wrapper.h
+ id delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(ClientProxy);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_IOS_BRIDGE_HOST_PROXY_H_
« no previous file with comments | « remoting/ios/bridge/client_instance_unittest.mm ('k') | remoting/ios/bridge/client_proxy.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698