Index: content/renderer/render_widget.h |
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h |
index 87866408934b1d6e9a731f74ebec8a9637f40a4c..fd7de9b5024142e671cdc8fb6aac2387dcbe15e5 100644 |
--- a/content/renderer/render_widget.h |
+++ b/content/renderer/render_widget.h |
@@ -17,6 +17,7 @@ |
#include "base/compiler_specific.h" |
#include "base/macros.h" |
#include "base/memory/ref_counted.h" |
+#include "base/memory/weak_ptr.h" |
#include "base/observer_list.h" |
#include "base/time/time.h" |
#include "build/build_config.h" |
@@ -64,12 +65,14 @@ namespace blink { |
namespace scheduler { |
class RenderWidgetSchedulingState; |
} |
+struct WebActiveWheelFlingParameters; |
struct WebDeviceEmulationParams; |
class WebFrameWidget; |
class WebGestureEvent; |
class WebLocalFrame; |
class WebMouseEvent; |
class WebNode; |
+class WebURL; |
struct WebPoint; |
} |
@@ -118,6 +121,7 @@ class CONTENT_EXPORT RenderWidget |
public RenderWidgetCompositorDelegate, |
public RenderWidgetInputHandlerDelegate, |
public RenderWidgetScreenMetricsEmulatorDelegate, |
+ public base::SupportsWeakPtr<RenderWidget>, |
dcheng
2016/11/04 21:00:02
Let's embed a WeakPtrFactory instead.
wjmaclean
2016/11/07 15:57:27
Done.
|
public base::RefCounted<RenderWidget> { |
public: |
// Creates a new RenderWidget. The opener_id is the routing ID of the |
@@ -395,6 +399,9 @@ class CONTENT_EXPORT RenderWidget |
// When emulated, this returns original device scale factor. |
float GetOriginalDeviceScaleFactor() const; |
+ virtual void TransferActiveWheelFlingAnimation( |
+ const blink::WebActiveWheelFlingParameters& params) {} |
+ |
protected: |
// Friend RefCounted so that the dtor can be non-public. Using this class |
// without ref-counting is an error. |
@@ -508,6 +515,17 @@ class CONTENT_EXPORT RenderWidget |
// Called by the browser process to update text input state. |
void OnRequestTextInputStateUpdate(); |
+ |
+ // Declared here to allow use of RenderWidget weak pointer. Overriden in |
+ // RenderViewImpl. |
+ virtual void LaunchAndroidContentIntent(const GURL& intent, |
+ size_t request_id, |
+ bool is_main_frame) {} |
+ |
+ // Utility function so LaunchAndroidContentIntent can remain protected. |
+ void scheduleContentIntentForRenderView(const blink::WebURL& intent, |
+ bool is_main_frame, |
+ size_t expected_content_intent_id); |
#endif |
// Called by the browser process to update the cursor and composition |
@@ -787,6 +805,8 @@ class CONTENT_EXPORT RenderWidget |
// Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface. |
std::unique_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_; |
+ bool has_added_input_handler_; |
+ |
private: |
// Applies/Removes the DevTools device emulation transformation to/from a |
// window rect. |