| 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/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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 | 678 |
| 679 WebPluginAcceleratedSurface* WebPluginProxy::GetAcceleratedSurface( | 679 WebPluginAcceleratedSurface* WebPluginProxy::GetAcceleratedSurface( |
| 680 gfx::GpuPreference gpu_preference) { | 680 gfx::GpuPreference gpu_preference) { |
| 681 if (!accelerated_surface_.get()) | 681 if (!accelerated_surface_.get()) |
| 682 accelerated_surface_.reset( | 682 accelerated_surface_.reset( |
| 683 WebPluginAcceleratedSurfaceProxy::Create(this, gpu_preference)); | 683 WebPluginAcceleratedSurfaceProxy::Create(this, gpu_preference)); |
| 684 return accelerated_surface_.get(); | 684 return accelerated_surface_.get(); |
| 685 } | 685 } |
| 686 | 686 |
| 687 void WebPluginProxy::AcceleratedFrameBuffersDidSwap( | 687 void WebPluginProxy::AcceleratedFrameBuffersDidSwap( |
| 688 gfx::PluginWindowHandle window, uint64 surface_id) { | 688 gfx::PluginWindowHandle window, uint64 surface_handle) { |
| 689 Send(new PluginHostMsg_AcceleratedSurfaceBuffersSwapped( | 689 Send(new PluginHostMsg_AcceleratedSurfaceBuffersSwapped( |
| 690 route_id_, window, surface_id)); | 690 route_id_, window, surface_handle)); |
| 691 } | 691 } |
| 692 | 692 |
| 693 void WebPluginProxy::SetAcceleratedSurface( | 693 void WebPluginProxy::SetAcceleratedSurface( |
| 694 gfx::PluginWindowHandle window, | 694 gfx::PluginWindowHandle window, |
| 695 const gfx::Size& size, | 695 const gfx::Size& size, |
| 696 uint64 accelerated_surface_identifier) { | 696 uint64 accelerated_surface_identifier) { |
| 697 Send(new PluginHostMsg_AcceleratedSurfaceSetIOSurface( | 697 Send(new PluginHostMsg_AcceleratedSurfaceSetIOSurface( |
| 698 route_id_, window, size.width(), size.height(), | 698 route_id_, window, size.width(), size.height(), |
| 699 accelerated_surface_identifier)); | 699 accelerated_surface_identifier)); |
| 700 } | 700 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 // Retrieve the IME status from a plug-in and send it to a renderer process | 775 // Retrieve the IME status from a plug-in and send it to a renderer process |
| 776 // when the plug-in has updated it. | 776 // when the plug-in has updated it. |
| 777 int input_type; | 777 int input_type; |
| 778 gfx::Rect caret_rect; | 778 gfx::Rect caret_rect; |
| 779 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) | 779 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) |
| 780 return; | 780 return; |
| 781 | 781 |
| 782 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); | 782 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); |
| 783 } | 783 } |
| 784 #endif | 784 #endif |
| OLD | NEW |