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/npapi/webplugin_delegate_proxy.h" | 5 #include "content/renderer/npapi/webplugin_delegate_proxy.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 Send(new PluginMsg_SetFocus(instance_id_, focused)); | 762 Send(new PluginMsg_SetFocus(instance_id_, focused)); |
763 #if defined(OS_WIN) | 763 #if defined(OS_WIN) |
764 if (render_view_) | 764 if (render_view_) |
765 render_view_->PluginFocusChanged(focused, instance_id_); | 765 render_view_->PluginFocusChanged(focused, instance_id_); |
766 #endif | 766 #endif |
767 } | 767 } |
768 | 768 |
769 bool WebPluginDelegateProxy::HandleInputEvent( | 769 bool WebPluginDelegateProxy::HandleInputEvent( |
770 const WebInputEvent& event, | 770 const WebInputEvent& event, |
771 WebCursor::CursorInfo* cursor_info) { | 771 WebCursor::CursorInfo* cursor_info) { |
772 bool handled; | 772 bool handled = false; |
773 WebCursor cursor; | 773 WebCursor cursor; |
774 // A windowless plugin can enter a modal loop in the context of a | 774 // A windowless plugin can enter a modal loop in the context of a |
775 // NPP_HandleEvent call, in which case we need to pump messages to | 775 // NPP_HandleEvent call, in which case we need to pump messages to |
776 // the plugin. We pass of the corresponding event handle to the | 776 // the plugin. We pass of the corresponding event handle to the |
777 // plugin process, which is set if the plugin does enter a modal loop. | 777 // plugin process, which is set if the plugin does enter a modal loop. |
778 IPC::SyncMessage* message = new PluginMsg_HandleInputEvent( | 778 IPC::SyncMessage* message = new PluginMsg_HandleInputEvent( |
779 instance_id_, &event, &handled, &cursor); | 779 instance_id_, &event, &handled, &cursor); |
780 message->set_pump_messages_event(modal_loop_pump_messages_event_.get()); | 780 message->set_pump_messages_event(modal_loop_pump_messages_event_.get()); |
781 Send(message); | 781 Send(message); |
782 return handled; | 782 return handled; |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 | 1236 |
1237 plugin_->URLRedirectResponse(allow, resource_id); | 1237 plugin_->URLRedirectResponse(allow, resource_id); |
1238 } | 1238 } |
1239 | 1239 |
1240 void WebPluginDelegateProxy::OnCheckIfRunInsecureContent(const GURL& url, | 1240 void WebPluginDelegateProxy::OnCheckIfRunInsecureContent(const GURL& url, |
1241 bool* result) { | 1241 bool* result) { |
1242 *result = plugin_->CheckIfRunInsecureContent(url); | 1242 *result = plugin_->CheckIfRunInsecureContent(url); |
1243 } | 1243 } |
1244 | 1244 |
1245 } // namespace content | 1245 } // namespace content |
OLD | NEW |