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