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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 11312195: webkit/ppapi: Notify the container when a plugin is accepting wheel events just like r143871. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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 | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index db418cce51b6df23abf3a3698c7259ff5d253aa8..c10042c949f07a952bd160402cef688d9935a403 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -563,6 +563,7 @@ bool PluginInstance::Initialize(WebPluginContainer* container,
full_frame_ = full_frame;
container_->setIsAcceptingTouchEvents(IsAcceptingTouchEvents());
+ container_->setWantsWheelEvents(IsAcceptingWheelEvents());
SetGPUHistogram(delegate_->GetPreferences(), arg_names, arg_values);
@@ -1176,6 +1177,11 @@ bool PluginInstance::IsAcceptingTouchEvents() const {
(input_event_mask_ & PP_INPUTEVENT_CLASS_TOUCH);
}
+bool PluginInstance::IsAcceptingWheelEvents() const {
+ return (filtered_input_event_mask_ & PP_INPUTEVENT_CLASS_WHEEL) ||
+ (input_event_mask_ & PP_INPUTEVENT_CLASS_WHEEL);
+}
+
void PluginInstance::ScheduleAsyncDidChangeView() {
if (view_change_weak_ptr_factory_.HasWeakPtrs())
return; // Already scheduled.
@@ -2140,6 +2146,8 @@ int32_t PluginInstance::RequestInputEvents(PP_Instance instance,
filtered_input_event_mask_ &= ~(event_classes);
if (event_classes & PP_INPUTEVENT_CLASS_TOUCH)
container_->setIsAcceptingTouchEvents(IsAcceptingTouchEvents());
+ if (event_classes & PP_INPUTEVENT_CLASS_WHEEL)
+ container_->setWantsWheelEvents(IsAcceptingWheelEvents());
jamesr 2012/11/26 06:23:07 this little 4-line block of checking for PP_INPUTE
Yusuke Sato 2012/11/26 23:22:18 Done.
return ValidateRequestInputEvents(false, event_classes);
}
@@ -2149,6 +2157,8 @@ int32_t PluginInstance::RequestFilteringInputEvents(PP_Instance instance,
input_event_mask_ &= ~(event_classes);
if (event_classes & PP_INPUTEVENT_CLASS_TOUCH)
container_->setIsAcceptingTouchEvents(IsAcceptingTouchEvents());
+ if (event_classes & PP_INPUTEVENT_CLASS_WHEEL)
+ container_->setWantsWheelEvents(IsAcceptingWheelEvents());
return ValidateRequestInputEvents(true, event_classes);
}
@@ -2158,6 +2168,8 @@ void PluginInstance::ClearInputEventRequest(PP_Instance instance,
filtered_input_event_mask_ &= ~(event_classes);
if (event_classes & PP_INPUTEVENT_CLASS_TOUCH)
container_->setIsAcceptingTouchEvents(IsAcceptingTouchEvents());
+ if (event_classes & PP_INPUTEVENT_CLASS_WHEEL)
+ container_->setWantsWheelEvents(IsAcceptingWheelEvents());
}
void PluginInstance::ZoomChanged(PP_Instance instance, double factor) {
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698