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" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void SetWindowlessBuffer(const base::SharedMemoryHandle& windowless_buffer, | 101 void SetWindowlessBuffer(const base::SharedMemoryHandle& windowless_buffer, |
102 const base::SharedMemoryHandle& background_buffer); | 102 const base::SharedMemoryHandle& background_buffer); |
103 | 103 |
104 // Converts a shared memory section handle from the renderer process into a | 104 // Converts a shared memory section handle from the renderer process into a |
105 // bitmap and hdc that are mapped to this process. | 105 // bitmap and hdc that are mapped to this process. |
106 void ConvertBuffer(const base::SharedMemoryHandle& buffer, | 106 void ConvertBuffer(const base::SharedMemoryHandle& buffer, |
107 ScopedHandle* shared_section, | 107 ScopedHandle* shared_section, |
108 ScopedBitmap* bitmap, | 108 ScopedBitmap* bitmap, |
109 ScopedHDC* hdc); | 109 ScopedHDC* hdc); |
110 | 110 |
| 111 // Handler for sending over the paint event to the plugin. |
| 112 void OnPaint(const gfx::Rect& damaged_rect); |
| 113 |
111 // Called when a plugin's origin moves, so that we can update the world | 114 // Called when a plugin's origin moves, so that we can update the world |
112 // transform of the local HDC. | 115 // transform of the local HDC. |
113 void UpdateTransform(); | 116 void UpdateTransform(); |
114 | 117 |
115 typedef base::hash_map<int, WebPluginResourceClient*> ResourceClientMap; | 118 typedef base::hash_map<int, WebPluginResourceClient*> ResourceClientMap; |
116 ResourceClientMap resource_clients_; | 119 ResourceClientMap resource_clients_; |
117 | 120 |
118 scoped_refptr<PluginChannel> channel_; | 121 scoped_refptr<PluginChannel> channel_; |
119 int route_id_; | 122 int route_id_; |
120 NPObject* window_npobject_; | 123 NPObject* window_npobject_; |
121 NPObject* plugin_element_; | 124 NPObject* plugin_element_; |
122 WebPluginDelegateImpl* delegate_; | 125 WebPluginDelegateImpl* delegate_; |
123 gfx::Rect damaged_rect_; | 126 gfx::Rect damaged_rect_; |
124 bool waiting_for_paint_; | 127 bool waiting_for_paint_; |
125 uint32 cp_browsing_context_; | 128 uint32 cp_browsing_context_; |
126 ScopedHandle modal_dialog_event_; | 129 ScopedHandle modal_dialog_event_; |
127 | 130 |
128 // Variables used for desynchronized windowless plugin painting. See note in | 131 // Variables used for desynchronized windowless plugin painting. See note in |
129 // webplugin_delegate_proxy.h for how this works. | 132 // webplugin_delegate_proxy.h for how this works. |
130 | 133 |
131 // These hold the bitmap where the plugin draws. | 134 // These hold the bitmap where the plugin draws. |
132 ScopedHandle windowless_shared_section_; | 135 ScopedHandle windowless_shared_section_; |
133 ScopedBitmap windowless_bitmap_; | 136 ScopedBitmap windowless_bitmap_; |
134 ScopedHDC windowless_hdc_; | 137 ScopedHDC windowless_hdc_; |
135 | 138 |
136 // These hold the bitmap of the background image. | 139 // These hold the bitmap of the background image. |
137 ScopedHandle background_shared_section_; | 140 ScopedHandle background_shared_section_; |
138 ScopedBitmap background_bitmap_; | 141 ScopedBitmap background_bitmap_; |
139 ScopedHDC background_hdc_; | 142 ScopedHDC background_hdc_; |
| 143 |
| 144 ScopedRunnableMethodFactory<WebPluginProxy> runnable_method_factory_; |
140 }; | 145 }; |
141 | 146 |
142 #endif // CHROME_PLUGIN_PLUGIN_WEBPLUGIN_PROXY_H__ | 147 #endif // CHROME_PLUGIN_PLUGIN_WEBPLUGIN_PROXY_H__ |
OLD | NEW |