| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_PLUGIN_PLUGIN_WEBPLUGIN_PROXY_H__ | 5 #ifndef CHROME_PLUGIN_PLUGIN_WEBPLUGIN_PROXY_H__ |
| 6 #define CHROME_PLUGIN_PLUGIN_WEBPLUGIN_PROXY_H__ | 6 #define CHROME_PLUGIN_PLUGIN_WEBPLUGIN_PROXY_H__ |
| 7 | 7 |
| 8 #include "base/hash_tables.h" | 8 #include "base/hash_tables.h" |
| 9 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
| 10 #include "base/scoped_handle.h" | 10 #include "base/scoped_handle.h" |
| 11 #include "base/scoped_ptr.h" |
| 11 #include "base/shared_memory.h" | 12 #include "base/shared_memory.h" |
| 12 #include "base/timer.h" | 13 #include "base/timer.h" |
| 13 #include "chrome/common/ipc_message.h" | 14 #include "chrome/common/ipc_message.h" |
| 14 #include "chrome/common/chrome_plugin_api.h" | 15 #include "chrome/common/chrome_plugin_api.h" |
| 15 #include "webkit/glue/webplugin.h" | 16 #include "webkit/glue/webplugin.h" |
| 16 | 17 |
| 18 namespace base { |
| 19 class WaitableEvent; |
| 20 } |
| 21 |
| 17 class PluginChannel; | 22 class PluginChannel; |
| 18 class WebPluginDelegateImpl; | 23 class WebPluginDelegateImpl; |
| 19 | 24 |
| 20 // This is an implementation of WebPlugin that proxies all calls to the | 25 // This is an implementation of WebPlugin that proxies all calls to the |
| 21 // renderer. | 26 // renderer. |
| 22 class WebPluginProxy : public WebPlugin { | 27 class WebPluginProxy : public WebPlugin { |
| 23 public: | 28 public: |
| 24 // Creates a new proxy for WebPlugin, using the given sender to send the | 29 // Creates a new proxy for WebPlugin, using the given sender to send the |
| 25 // marshalled WebPlugin calls. | 30 // marshalled WebPlugin calls. |
| 26 WebPluginProxy(PluginChannel* channel, | 31 WebPluginProxy(PluginChannel* channel, |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 ResourceClientMap resource_clients_; | 124 ResourceClientMap resource_clients_; |
| 120 | 125 |
| 121 scoped_refptr<PluginChannel> channel_; | 126 scoped_refptr<PluginChannel> channel_; |
| 122 int route_id_; | 127 int route_id_; |
| 123 NPObject* window_npobject_; | 128 NPObject* window_npobject_; |
| 124 NPObject* plugin_element_; | 129 NPObject* plugin_element_; |
| 125 WebPluginDelegateImpl* delegate_; | 130 WebPluginDelegateImpl* delegate_; |
| 126 gfx::Rect damaged_rect_; | 131 gfx::Rect damaged_rect_; |
| 127 bool waiting_for_paint_; | 132 bool waiting_for_paint_; |
| 128 uint32 cp_browsing_context_; | 133 uint32 cp_browsing_context_; |
| 129 ScopedHandle modal_dialog_event_; | 134 scoped_ptr<base::WaitableEvent> modal_dialog_event_; |
| 130 | 135 |
| 131 // Variables used for desynchronized windowless plugin painting. See note in | 136 // Variables used for desynchronized windowless plugin painting. See note in |
| 132 // webplugin_delegate_proxy.h for how this works. | 137 // webplugin_delegate_proxy.h for how this works. |
| 133 | 138 |
| 134 // These hold the bitmap where the plugin draws. | 139 // These hold the bitmap where the plugin draws. |
| 135 ScopedHandle windowless_shared_section_; | 140 ScopedHandle windowless_shared_section_; |
| 136 ScopedBitmap windowless_bitmap_; | 141 ScopedBitmap windowless_bitmap_; |
| 137 ScopedHDC windowless_hdc_; | 142 ScopedHDC windowless_hdc_; |
| 138 | 143 |
| 139 // These hold the bitmap of the background image. | 144 // These hold the bitmap of the background image. |
| 140 ScopedHandle background_shared_section_; | 145 ScopedHandle background_shared_section_; |
| 141 ScopedBitmap background_bitmap_; | 146 ScopedBitmap background_bitmap_; |
| 142 ScopedHDC background_hdc_; | 147 ScopedHDC background_hdc_; |
| 143 | 148 |
| 144 ScopedRunnableMethodFactory<WebPluginProxy> runnable_method_factory_; | 149 ScopedRunnableMethodFactory<WebPluginProxy> runnable_method_factory_; |
| 145 }; | 150 }; |
| 146 | 151 |
| 147 #endif // CHROME_PLUGIN_PLUGIN_WEBPLUGIN_PROXY_H__ | 152 #endif // CHROME_PLUGIN_PLUGIN_WEBPLUGIN_PROXY_H__ |
| OLD | NEW |