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

Unified Diff: remoting/client/ios/app/host_view_controller.mm

Issue 2856933007: [Remoting iOS] Basic viewport manipulation support (Closed)
Patch Set: Move the delegate getter/setting to the bottom Created 3 years, 8 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/client/ios/app/host_view_controller.h ('k') | remoting/client/ios/client_gestures.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/ios/app/host_view_controller.mm
diff --git a/remoting/client/ios/app/host_view_controller.mm b/remoting/client/ios/app/host_view_controller.mm
index bd8fa39c6c7da3c403e3cd38aaaaa005143cdd3a..24a351420623ddb8176403eb734d5da533acd27d 100644
--- a/remoting/client/ios/app/host_view_controller.mm
+++ b/remoting/client/ios/app/host_view_controller.mm
@@ -8,17 +8,23 @@
#import "remoting/client/ios/app/host_view_controller.h"
+#include <memory>
+
#import <GLKit/GLKit.h>
#import "ios/third_party/material_components_ios/src/components/Buttons/src/MaterialButtons.h"
-#import "remoting/client/ios/display/gl_display_handler.h"
+#import "remoting/client/ios/client_gestures.h"
#import "remoting/client/ios/session/remoting_client.h"
+#include "remoting/client/gesture_interpreter.h"
+
static const CGFloat kFabInset = 15.f;
@interface HostViewController () {
RemotingClient* _client;
MDCFloatingButton* _floatingButton;
+
+ ClientGestures* _clientGestures;
}
@end
@@ -71,24 +77,28 @@ static const CGFloat kFabInset = 15.f;
// viewDidLayoutSubviews may be called before viewDidAppear, in which case
// the surface is not ready and onSurfaceChanged will be no-op.
// Call onSurfaceChanged here to cover that case.
- [_client.displayHandler onSurfaceChanged:glView.frame];
+ [_client surfaceChanged:self.view.frame];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
- ((GLKView*)self.view).enableSetNeedsDisplay = true;
+
+ _clientGestures =
+ [[ClientGestures alloc] initWithView:self.view client:_client];
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
+
+ _clientGestures = nil;
}
- (void)viewDidLayoutSubviews {
[super viewDidLayoutSubviews];
- [_client.displayHandler onSurfaceChanged:((GLKView*)self.view).frame];
+ [_client surfaceChanged:self.view.frame];
- const CGSize& btnSize = _floatingButton.frame.size;
+ CGSize btnSize = _floatingButton.frame.size;
_floatingButton.frame =
CGRectMake(self.view.frame.size.width - btnSize.width - kFabInset,
self.view.frame.size.height - btnSize.height - kFabInset,
« no previous file with comments | « remoting/client/ios/app/host_view_controller.h ('k') | remoting/client/ios/client_gestures.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698