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

Side by Side Diff: content/renderer/pepper/pepper_webplugin_impl.cc

Issue 2844823002: Support Coalesced Touch in ppapi (Closed)
Patch Set: Support Coalesced Touch in ppapi Created 3 years, 7 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/pepper/pepper_webplugin_impl.h" 5 #include "content/renderer/pepper/pepper_webplugin_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <cmath> 8 #include <cmath>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/debug/crash_logging.h" 11 #include "base/debug/crash_logging.h"
12 #include "base/location.h" 12 #include "base/location.h"
13 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
14 #include "base/threading/thread_task_runner_handle.h" 14 #include "base/threading/thread_task_runner_handle.h"
15 #include "content/public/renderer/content_renderer_client.h" 15 #include "content/public/renderer/content_renderer_client.h"
16 #include "content/renderer/pepper/message_channel.h" 16 #include "content/renderer/pepper/message_channel.h"
17 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 17 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
18 #include "content/renderer/pepper/plugin_instance_throttler_impl.h" 18 #include "content/renderer/pepper/plugin_instance_throttler_impl.h"
19 #include "content/renderer/pepper/plugin_module.h" 19 #include "content/renderer/pepper/plugin_module.h"
20 #include "content/renderer/pepper/v8object_var.h" 20 #include "content/renderer/pepper/v8object_var.h"
21 #include "content/renderer/render_frame_impl.h" 21 #include "content/renderer/render_frame_impl.h"
22 #include "ppapi/shared_impl/ppapi_globals.h" 22 #include "ppapi/shared_impl/ppapi_globals.h"
23 #include "ppapi/shared_impl/var_tracker.h" 23 #include "ppapi/shared_impl/var_tracker.h"
24 #include "third_party/WebKit/public/platform/WebCoalescedInputEvent.h"
24 #include "third_party/WebKit/public/platform/WebPoint.h" 25 #include "third_party/WebKit/public/platform/WebPoint.h"
25 #include "third_party/WebKit/public/platform/WebRect.h" 26 #include "third_party/WebKit/public/platform/WebRect.h"
26 #include "third_party/WebKit/public/platform/WebSize.h" 27 #include "third_party/WebKit/public/platform/WebSize.h"
27 #include "third_party/WebKit/public/web/WebAssociatedURLLoaderClient.h" 28 #include "third_party/WebKit/public/web/WebAssociatedURLLoaderClient.h"
28 #include "third_party/WebKit/public/web/WebDocument.h" 29 #include "third_party/WebKit/public/web/WebDocument.h"
29 #include "third_party/WebKit/public/web/WebElement.h" 30 #include "third_party/WebKit/public/web/WebElement.h"
30 #include "third_party/WebKit/public/web/WebFrame.h" 31 #include "third_party/WebKit/public/web/WebFrame.h"
31 #include "third_party/WebKit/public/web/WebPluginContainer.h" 32 #include "third_party/WebKit/public/web/WebPluginContainer.h"
32 #include "third_party/WebKit/public/web/WebPluginParams.h" 33 #include "third_party/WebKit/public/web/WebPluginParams.h"
33 #include "third_party/WebKit/public/web/WebPrintParams.h" 34 #include "third_party/WebKit/public/web/WebPrintParams.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 blink::WebFocusType focus_type) { 204 blink::WebFocusType focus_type) {
204 // Re-entrancy may cause JS to try to execute script on the plugin before it 205 // Re-entrancy may cause JS to try to execute script on the plugin before it
205 // is fully initialized. See: crbug.com/715747. 206 // is fully initialized. See: crbug.com/715747.
206 if (instance_) 207 if (instance_)
207 instance_->SetWebKitFocus(focused); 208 instance_->SetWebKitFocus(focused);
208 } 209 }
209 210
210 void PepperWebPluginImpl::UpdateVisibility(bool visible) {} 211 void PepperWebPluginImpl::UpdateVisibility(bool visible) {}
211 212
212 blink::WebInputEventResult PepperWebPluginImpl::HandleInputEvent( 213 blink::WebInputEventResult PepperWebPluginImpl::HandleInputEvent(
213 const blink::WebInputEvent& event, 214 const blink::WebCoalescedInputEvent& coalesced_event,
214 blink::WebCursorInfo& cursor_info) { 215 blink::WebCursorInfo& cursor_info) {
215 // Re-entrancy may cause JS to try to execute script on the plugin before it 216 // Re-entrancy may cause JS to try to execute script on the plugin before it
216 // is fully initialized. See: crbug.com/715747. 217 // is fully initialized. See: crbug.com/715747.
217 if (!instance_ || instance_->FlashIsFullscreenOrPending()) 218 if (!instance_ || instance_->FlashIsFullscreenOrPending())
218 return blink::WebInputEventResult::kNotHandled; 219 return blink::WebInputEventResult::kNotHandled;
219 return instance_->HandleInputEvent(event, &cursor_info) 220 return instance_->HandleCoalescedInputEvent(coalesced_event, &cursor_info)
220 ? blink::WebInputEventResult::kHandledApplication 221 ? blink::WebInputEventResult::kHandledApplication
221 : blink::WebInputEventResult::kNotHandled; 222 : blink::WebInputEventResult::kNotHandled;
222 } 223 }
223 224
224 void PepperWebPluginImpl::DidReceiveResponse( 225 void PepperWebPluginImpl::DidReceiveResponse(
225 const blink::WebURLResponse& response) { 226 const blink::WebURLResponse& response) {
226 // Re-entrancy may cause JS to try to execute script on the plugin before it 227 // Re-entrancy may cause JS to try to execute script on the plugin before it
227 // is fully initialized. See: crbug.com/715747. 228 // is fully initialized. See: crbug.com/715747.
228 if (!instance_) 229 if (!instance_)
229 return; 230 return;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 // is fully initialized. See: crbug.com/715747. 377 // is fully initialized. See: crbug.com/715747.
377 if (instance_) 378 if (instance_)
378 instance_->RotateView(type); 379 instance_->RotateView(type);
379 } 380 }
380 381
381 bool PepperWebPluginImpl::IsPlaceholder() { 382 bool PepperWebPluginImpl::IsPlaceholder() {
382 return false; 383 return false;
383 } 384 }
384 385
385 } // namespace content 386 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_webplugin_impl.h ('k') | content/shell/test_runner/test_plugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698