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

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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 blink::WebFocusType focus_type) { 205 blink::WebFocusType focus_type) {
205 // Re-entrancy may cause JS to try to execute script on the plugin before it 206 // Re-entrancy may cause JS to try to execute script on the plugin before it
206 // is fully initialized. See: crbug.com/715747. 207 // is fully initialized. See: crbug.com/715747.
207 if (instance_) 208 if (instance_)
208 instance_->SetWebKitFocus(focused); 209 instance_->SetWebKitFocus(focused);
209 } 210 }
210 211
211 void PepperWebPluginImpl::UpdateVisibility(bool visible) {} 212 void PepperWebPluginImpl::UpdateVisibility(bool visible) {}
212 213
213 blink::WebInputEventResult PepperWebPluginImpl::HandleInputEvent( 214 blink::WebInputEventResult PepperWebPluginImpl::HandleInputEvent(
214 const blink::WebInputEvent& event, 215 const blink::WebCoalescedInputEvent& coalesced_event,
215 blink::WebCursorInfo& cursor_info) { 216 blink::WebCursorInfo& cursor_info) {
216 // Re-entrancy may cause JS to try to execute script on the plugin before it 217 // Re-entrancy may cause JS to try to execute script on the plugin before it
217 // is fully initialized. See: crbug.com/715747. 218 // is fully initialized. See: crbug.com/715747.
218 if (!instance_ || instance_->FlashIsFullscreenOrPending()) 219 if (!instance_ || instance_->FlashIsFullscreenOrPending())
219 return blink::WebInputEventResult::kNotHandled; 220 return blink::WebInputEventResult::kNotHandled;
220 return instance_->HandleInputEvent(event, &cursor_info) 221 return instance_->HandleCoalescedInputEvent(coalesced_event, &cursor_info)
221 ? blink::WebInputEventResult::kHandledApplication 222 ? blink::WebInputEventResult::kHandledApplication
222 : blink::WebInputEventResult::kNotHandled; 223 : blink::WebInputEventResult::kNotHandled;
223 } 224 }
224 225
225 void PepperWebPluginImpl::DidReceiveResponse( 226 void PepperWebPluginImpl::DidReceiveResponse(
226 const blink::WebURLResponse& response) { 227 const blink::WebURLResponse& response) {
227 // Re-entrancy may cause JS to try to execute script on the plugin before it 228 // Re-entrancy may cause JS to try to execute script on the plugin before it
228 // is fully initialized. See: crbug.com/715747. 229 // is fully initialized. See: crbug.com/715747.
229 if (!instance_) 230 if (!instance_)
230 return; 231 return;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 // is fully initialized. See: crbug.com/715747. 378 // is fully initialized. See: crbug.com/715747.
378 if (instance_) 379 if (instance_)
379 instance_->RotateView(type); 380 instance_->RotateView(type);
380 } 381 }
381 382
382 bool PepperWebPluginImpl::IsPlaceholder() { 383 bool PepperWebPluginImpl::IsPlaceholder() {
383 return false; 384 return false;
384 } 385 }
385 386
386 } // namespace content 387 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698