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 <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/debug/crash_logging.h" | 9 #include "base/debug/crash_logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 212 |
213 void PepperWebPluginImpl::updateFocus(bool focused, | 213 void PepperWebPluginImpl::updateFocus(bool focused, |
214 blink::WebFocusType focus_type) { | 214 blink::WebFocusType focus_type) { |
215 instance_->SetWebKitFocus(focused); | 215 instance_->SetWebKitFocus(focused); |
216 } | 216 } |
217 | 217 |
218 void PepperWebPluginImpl::updateVisibility(bool visible) {} | 218 void PepperWebPluginImpl::updateVisibility(bool visible) {} |
219 | 219 |
220 bool PepperWebPluginImpl::acceptsInputEvents() { return true; } | 220 bool PepperWebPluginImpl::acceptsInputEvents() { return true; } |
221 | 221 |
222 bool PepperWebPluginImpl::handleInputEvent(const blink::WebInputEvent& event, | 222 blink::WebInputEventResult PepperWebPluginImpl::handleInputEvent( |
223 blink::WebCursorInfo& cursor_info) { | 223 const blink::WebInputEvent& event, |
| 224 blink::WebCursorInfo& cursor_info) { |
224 if (instance_->FlashIsFullscreenOrPending()) | 225 if (instance_->FlashIsFullscreenOrPending()) |
225 return false; | 226 return blink::WebInputEventResult::NotHandled; |
226 return instance_->HandleInputEvent(event, &cursor_info); | 227 return instance_->HandleInputEvent(event, &cursor_info) |
| 228 ? blink::WebInputEventResult::HandledApplication |
| 229 : blink::WebInputEventResult::NotHandled; |
227 } | 230 } |
228 | 231 |
229 void PepperWebPluginImpl::didReceiveResponse( | 232 void PepperWebPluginImpl::didReceiveResponse( |
230 const blink::WebURLResponse& response) { | 233 const blink::WebURLResponse& response) { |
231 DCHECK(!instance_->document_loader()); | 234 DCHECK(!instance_->document_loader()); |
232 instance_->HandleDocumentLoad(response); | 235 instance_->HandleDocumentLoad(response); |
233 } | 236 } |
234 | 237 |
235 void PepperWebPluginImpl::didReceiveData(const char* data, int data_length) { | 238 void PepperWebPluginImpl::didReceiveData(const char* data, int data_length) { |
236 blink::WebURLLoaderClient* document_loader = instance_->document_loader(); | 239 blink::WebURLLoaderClient* document_loader = instance_->document_loader(); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 | 315 |
313 bool PepperWebPluginImpl::canRotateView() { return instance_->CanRotateView(); } | 316 bool PepperWebPluginImpl::canRotateView() { return instance_->CanRotateView(); } |
314 | 317 |
315 void PepperWebPluginImpl::rotateView(RotationType type) { | 318 void PepperWebPluginImpl::rotateView(RotationType type) { |
316 instance_->RotateView(type); | 319 instance_->RotateView(type); |
317 } | 320 } |
318 | 321 |
319 bool PepperWebPluginImpl::isPlaceholder() { return false; } | 322 bool PepperWebPluginImpl::isPlaceholder() { return false; } |
320 | 323 |
321 } // namespace content | 324 } // namespace content |
OLD | NEW |