OLD | NEW |
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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 } | 200 } |
200 | 201 |
201 void PepperWebPluginImpl::UpdateFocus(bool focused, | 202 void PepperWebPluginImpl::UpdateFocus(bool focused, |
202 blink::WebFocusType focus_type) { | 203 blink::WebFocusType focus_type) { |
203 instance_->SetWebKitFocus(focused); | 204 instance_->SetWebKitFocus(focused); |
204 } | 205 } |
205 | 206 |
206 void PepperWebPluginImpl::UpdateVisibility(bool visible) {} | 207 void PepperWebPluginImpl::UpdateVisibility(bool visible) {} |
207 | 208 |
208 blink::WebInputEventResult PepperWebPluginImpl::HandleInputEvent( | 209 blink::WebInputEventResult PepperWebPluginImpl::HandleInputEvent( |
209 const blink::WebInputEvent& event, | 210 const blink::WebCoalescedInputEvent& coalesced_event, |
210 blink::WebCursorInfo& cursor_info) { | 211 blink::WebCursorInfo& cursor_info) { |
211 if (instance_->FlashIsFullscreenOrPending()) | 212 if (instance_->FlashIsFullscreenOrPending()) |
212 return blink::WebInputEventResult::kNotHandled; | 213 return blink::WebInputEventResult::kNotHandled; |
213 return instance_->HandleInputEvent(event, &cursor_info) | 214 return instance_->HandleCoalescedInputEvent(coalesced_event, &cursor_info) |
214 ? blink::WebInputEventResult::kHandledApplication | 215 ? blink::WebInputEventResult::kHandledApplication |
215 : blink::WebInputEventResult::kNotHandled; | 216 : blink::WebInputEventResult::kNotHandled; |
216 } | 217 } |
217 | 218 |
218 void PepperWebPluginImpl::DidReceiveResponse( | 219 void PepperWebPluginImpl::DidReceiveResponse( |
219 const blink::WebURLResponse& response) { | 220 const blink::WebURLResponse& response) { |
220 DCHECK(!instance_->document_loader()); | 221 DCHECK(!instance_->document_loader()); |
221 instance_->HandleDocumentLoad(response); | 222 instance_->HandleDocumentLoad(response); |
222 } | 223 } |
223 | 224 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 | 304 |
304 void PepperWebPluginImpl::RotateView(RotationType type) { | 305 void PepperWebPluginImpl::RotateView(RotationType type) { |
305 instance_->RotateView(type); | 306 instance_->RotateView(type); |
306 } | 307 } |
307 | 308 |
308 bool PepperWebPluginImpl::IsPlaceholder() { | 309 bool PepperWebPluginImpl::IsPlaceholder() { |
309 return false; | 310 return false; |
310 } | 311 } |
311 | 312 |
312 } // namespace content | 313 } // namespace content |
OLD | NEW |