~michael-sheldon/oxide/fix-1384357

« back to all changes in this revision

Viewing changes to shared/browser/oxide_render_widget_host_view.h

  • Committer: Chris Coulson
  • Date: 2015-05-14 15:37:57 UTC
  • Revision ID: chris.coulson@canonical.com-20150514153757-k03j3agy5oi2rxt2
Move gesture detection to RWHV, keep MotionEvent tracking on WebView (so that we keep it in sync with incoming touch events), and reset the gesture pipeline when navigating to a new page

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// vim:expandtab:shiftwidth=2:tabstop=2:
2
 
// Copyright (C) 2013-2014 Canonical Ltd.
 
2
// Copyright (C) 2013-2015 Canonical Ltd.
3
3
 
4
4
// This library is free software; you can redistribute it and/or
5
5
// modify it under the terms of the GNU Lesser General Public
34
34
#include "ui/gfx/geometry/rect.h"
35
35
#include "ui/gfx/geometry/size.h"
36
36
 
 
37
#include "shared/browser/oxide_gesture_provider.h"
37
38
#include "shared/browser/oxide_renderer_frame_evictor_client.h"
38
39
#include "shared/port/content/browser/render_widget_host_view_oxide.h"
39
40
 
46
47
class RenderWidgetHostImpl;
47
48
}
48
49
 
 
50
namespace ui {
 
51
class MotionEvent;
 
52
}
 
53
 
49
54
namespace oxide {
50
55
 
51
56
class RenderWidgetHostViewDelegate;
53
58
 
54
59
class RenderWidgetHostView final :
55
60
    public content::RenderWidgetHostViewOxide,
 
61
    public GestureProviderClient,
56
62
    public RendererFrameEvictorClient,
57
63
    public cc::DelegatedFrameResourceCollectionClient,
58
64
    public base::SupportsWeakPtr<RenderWidgetHostView> {
73
79
    return compositor_frame_metadata_;
74
80
  }
75
81
 
 
82
  void HandleTouchEvent(const ui::MotionEvent& event);
 
83
  void ResetGestureDetection();
 
84
 
76
85
  // content::RenderWidgetHostViewBase implementation
77
86
  void Blur() final;
78
87
 
153
162
  bool LockMouse() final;
154
163
  void UnlockMouse() final;
155
164
 
 
165
  // GestureProviderClient implementation
 
166
  void OnGestureEvent(const blink::WebGestureEvent& event) final;
 
167
 
 
168
  // RendererFrameEvictorClient implemenetation
 
169
  void EvictCurrentFrame() final;
 
170
 
156
171
  // cc::DelegatedFrameResourceCollectionClient implementation
157
172
  void UnusedResourcesAreAvailable() final;
158
173
 
159
 
  // RendererFrameEvictorClient implemenetation
160
 
  void EvictCurrentFrame() final;
161
 
 
162
174
  // ===================
163
175
 
164
176
  void UpdateCursorOnWebView();
207
219
 
208
220
  bool top_controls_shrink_blink_size_;
209
221
 
 
222
  scoped_ptr<GestureProvider> gesture_provider_;
 
223
 
210
224
  DISALLOW_IMPLICIT_CONSTRUCTORS(RenderWidgetHostView);
211
225
};
212
226