| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/plugin/webplugin_proxy.h" | 5 #include "content/plugin/webplugin_proxy.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/memory/scoped_handle.h" | 10 #include "base/memory/scoped_handle.h" |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 // This message can be sent during event-handling, and needs to be delivered | 665 // This message can be sent during event-handling, and needs to be delivered |
| 666 // within that context. | 666 // within that context. |
| 667 msg->set_unblock(true); | 667 msg->set_unblock(true); |
| 668 Send(msg); | 668 Send(msg); |
| 669 } | 669 } |
| 670 | 670 |
| 671 void WebPluginProxy::BindFakePluginWindowHandle(bool opaque) { | 671 void WebPluginProxy::BindFakePluginWindowHandle(bool opaque) { |
| 672 Send(new PluginHostMsg_BindFakePluginWindowHandle(route_id_, opaque)); | 672 Send(new PluginHostMsg_BindFakePluginWindowHandle(route_id_, opaque)); |
| 673 } | 673 } |
| 674 | 674 |
| 675 WebPluginAcceleratedSurface* WebPluginProxy::GetAcceleratedSurface() { | 675 WebPluginAcceleratedSurface* WebPluginProxy::GetAcceleratedSurface( |
| 676 gfx::GpuPreference gpu_preference) { |
| 676 if (!accelerated_surface_.get()) | 677 if (!accelerated_surface_.get()) |
| 677 accelerated_surface_.reset(new WebPluginAcceleratedSurfaceProxy(this)); | 678 accelerated_surface_.reset(new WebPluginAcceleratedSurfaceProxy( |
| 679 this, gpu_preference)); |
| 678 return accelerated_surface_.get(); | 680 return accelerated_surface_.get(); |
| 679 } | 681 } |
| 680 | 682 |
| 681 void WebPluginProxy::AcceleratedFrameBuffersDidSwap( | 683 void WebPluginProxy::AcceleratedFrameBuffersDidSwap( |
| 682 gfx::PluginWindowHandle window, uint64 surface_id) { | 684 gfx::PluginWindowHandle window, uint64 surface_id) { |
| 683 Send(new PluginHostMsg_AcceleratedSurfaceBuffersSwapped( | 685 Send(new PluginHostMsg_AcceleratedSurfaceBuffersSwapped( |
| 684 route_id_, window, surface_id)); | 686 route_id_, window, surface_id)); |
| 685 } | 687 } |
| 686 | 688 |
| 687 void WebPluginProxy::SetAcceleratedSurface( | 689 void WebPluginProxy::SetAcceleratedSurface( |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 // Retrieve the IME status from a plug-in and send it to a renderer process | 755 // Retrieve the IME status from a plug-in and send it to a renderer process |
| 754 // when the plug-in has updated it. | 756 // when the plug-in has updated it. |
| 755 int input_type; | 757 int input_type; |
| 756 gfx::Rect caret_rect; | 758 gfx::Rect caret_rect; |
| 757 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) | 759 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) |
| 758 return; | 760 return; |
| 759 | 761 |
| 760 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); | 762 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); |
| 761 } | 763 } |
| 762 #endif | 764 #endif |
| OLD | NEW |