Index: content/renderer/render_widget.h |
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h |
index 8962e31a6e59fafd25b5dd47fba47a67540be4c0..ca7d39f6aefaba2f33890e1e555b2a3580a13267 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" |
@@ -66,6 +67,7 @@ namespace blink { |
namespace scheduler { |
class RenderWidgetSchedulingState; |
} |
+struct WebActiveWheelFlingParameters; |
struct WebDeviceEmulationParams; |
class WebDragData; |
class WebFrameWidget; |
@@ -74,6 +76,7 @@ class WebImage; |
class WebLocalFrame; |
class WebMouseEvent; |
class WebNode; |
+class WebURL; |
struct WebPoint; |
} |
@@ -404,6 +407,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. |
@@ -517,6 +523,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, |
dcheng
2016/11/10 07:46:11
Can you help me understand why this is needed? Sin
wjmaclean
2016/11/10 15:57:15
Yes, the weak pointer type was the issue. This is
|
+ bool is_main_frame, |
+ size_t expected_content_intent_id); |
#endif |
// Called by the browser process to update the cursor and composition |
@@ -796,6 +813,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. |
@@ -828,6 +847,8 @@ class CONTENT_EXPORT RenderWidget |
// session, this info is sent to the browser along with other drag/drop info. |
DragEventSourceInfo possible_drag_event_info_; |
+ base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
}; |