~michael-sheldon/oxide/fix-1384357

« back to all changes in this revision

Viewing changes to shared/browser/oxide_web_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 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
49
49
#include "shared/browser/compositor/oxide_compositor_client.h"
50
50
#include "shared/browser/oxide_certificate_error.h"
51
51
#include "shared/browser/oxide_content_types.h"
52
 
#include "shared/browser/oxide_gesture_provider.h"
53
52
#include "shared/browser/oxide_permission_request.h"
54
53
#include "shared/browser/oxide_render_widget_host_view_delegate.h"
55
54
#include "shared/browser/oxide_script_message_target.h"
56
55
#include "shared/browser/oxide_security_status.h"
57
56
#include "shared/browser/oxide_security_types.h"
 
57
#include "shared/browser/oxide_touch_event_state.h"
58
58
#include "shared/browser/oxide_web_preferences_observer.h"
59
59
#include "shared/common/oxide_message_enums.h"
60
60
 
90
90
}
91
91
 
92
92
namespace ui {
93
 
class GestureEvent;
94
93
class TouchEvent;
95
94
}
96
95
 
131
130
class WebView : public ScriptMessageTarget,
132
131
                private CompositorClient,
133
132
                private WebPreferencesObserver,
134
 
                private GestureProviderClient,
135
133
                private content::NotificationObserver,
136
134
                private RenderWidgetHostViewDelegate,
137
135
                private content::WebContentsDelegate,
369
367
  // WebPreferencesObserver implementation
370
368
  void WebPreferencesDestroyed() final;
371
369
 
372
 
  // GestureProviderClient implementation
373
 
  void OnGestureEvent(const blink::WebGestureEvent& event) final;
374
 
 
375
370
  // content::NotificationObserver implementation
376
371
  void Observe(int type,
377
372
               const content::NotificationSource& source,
379
374
 
380
375
  // RenderWidgetHostViewDelegate implementation
381
376
  void EvictCurrentFrame() final;
382
 
  void ProcessAckedTouchEvent(bool consumed) final;
383
377
  void UpdateCursor(const content::WebCursor& cursor) final;
384
378
  void TextInputStateChanged(ui::TextInputType type,
385
379
                             bool show_ime_if_needed) final;
593
587
  std::vector<scoped_refptr<CompositorFrameHandle> > previous_compositor_frames_;
594
588
  std::queue<uint32> received_surface_ids_;
595
589
 
596
 
  scoped_ptr<GestureProvider> gesture_provider_;
597
 
  bool in_swap_;
 
590
  TouchEventState touch_state_;
598
591
 
599
592
  GURL initial_url_;
600
593
  scoped_ptr<content::NavigationController::LoadURLParams> initial_data_;