OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_COMPOSITING_HELPER_H_ |
| 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_COMPOSITING_HELPER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "content/common/content_export.h" |
| 13 #include "ui/gfx/size.h" |
| 14 |
| 15 namespace cc { |
| 16 class TextureLayer; |
| 17 } |
| 18 |
| 19 namespace WebKit { |
| 20 class WebPluginContainer; |
| 21 class WebLayer; |
| 22 } |
| 23 |
| 24 namespace content { |
| 25 |
| 26 class CONTENT_EXPORT BrowserPluginCompositingHelper { |
| 27 public: |
| 28 BrowserPluginCompositingHelper(WebKit::WebPluginContainer* container, |
| 29 int host_routing_id); |
| 30 ~BrowserPluginCompositingHelper(); |
| 31 |
| 32 void EnableCompositing(bool); |
| 33 void OnBuffersSwapped(const gfx::Size& size, |
| 34 const std::string& mailbox_name, |
| 35 int gpu_route_id, |
| 36 int gpu_host_id); |
| 37 |
| 38 private: |
| 39 int host_routing_id_; |
| 40 bool last_mailbox_valid_; |
| 41 |
| 42 scoped_refptr<cc::TextureLayer> texture_layer_; |
| 43 scoped_ptr<WebKit::WebLayer> web_layer_; |
| 44 WebKit::WebPluginContainer* container_; |
| 45 }; |
| 46 |
| 47 } // namespace content |
| 48 |
| 49 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_COMPOSITING_HELPER_H_ |
OLD | NEW |