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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 bool is_javascript_url, | 76 bool is_javascript_url, |
77 const char* target, unsigned int len, | 77 const char* target, unsigned int len, |
78 const char* buf, bool is_file_data, | 78 const char* buf, bool is_file_data, |
79 bool notify, const char* url, | 79 bool notify, const char* url, |
80 void* notify_data, bool popups_allowed); | 80 void* notify_data, bool popups_allowed); |
81 | 81 |
82 void UpdateGeometry(const gfx::Rect& window_rect, | 82 void UpdateGeometry(const gfx::Rect& window_rect, |
83 const gfx::Rect& clip_rect, | 83 const gfx::Rect& clip_rect, |
84 const std::vector<gfx::Rect>& cutout_rects, | 84 const std::vector<gfx::Rect>& cutout_rects, |
85 bool visible, | 85 bool visible, |
86 const SharedMemoryHandle& windowless_buffer, | 86 const base::SharedMemoryHandle& windowless_buffer, |
87 const SharedMemoryHandle& background_buffer); | 87 const base::SharedMemoryHandle& background_buffer); |
88 | 88 |
89 void CancelDocumentLoad(); | 89 void CancelDocumentLoad(); |
90 | 90 |
91 void InitiateHTTPRangeRequest(const char* url, | 91 void InitiateHTTPRangeRequest(const char* url, |
92 const char* range_info, | 92 const char* range_info, |
93 void* existing_stream, | 93 void* existing_stream, |
94 bool notify_needed, | 94 bool notify_needed, |
95 HANDLE notify_data); | 95 HANDLE notify_data); |
96 | 96 |
97 private: | 97 private: |
98 bool Send(IPC::Message* msg); | 98 bool Send(IPC::Message* msg); |
99 | 99 |
100 // Updates the shared memory section where windowless plugins paint. | 100 // Updates the shared memory section where windowless plugins paint. |
101 void SetWindowlessBuffer(const SharedMemoryHandle& windowless_buffer, | 101 void SetWindowlessBuffer(const base::SharedMemoryHandle& windowless_buffer, |
102 const 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 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 // Called when a plugin's origin moves, so that we can update the world | 111 // Called when a plugin's origin moves, so that we can update the world |
112 // transform of the local HDC. | 112 // transform of the local HDC. |
113 void UpdateTransform(); | 113 void UpdateTransform(); |
114 | 114 |
115 typedef base::hash_map<int, WebPluginResourceClient*> ResourceClientMap; | 115 typedef base::hash_map<int, WebPluginResourceClient*> ResourceClientMap; |
116 ResourceClientMap resource_clients_; | 116 ResourceClientMap resource_clients_; |
(...skipping 16 matching lines...) Expand all Loading... |
133 ScopedBitmap windowless_bitmap_; | 133 ScopedBitmap windowless_bitmap_; |
134 ScopedHDC windowless_hdc_; | 134 ScopedHDC windowless_hdc_; |
135 | 135 |
136 // These hold the bitmap of the background image. | 136 // These hold the bitmap of the background image. |
137 ScopedHandle background_shared_section_; | 137 ScopedHandle background_shared_section_; |
138 ScopedBitmap background_bitmap_; | 138 ScopedBitmap background_bitmap_; |
139 ScopedHDC background_hdc_; | 139 ScopedHDC background_hdc_; |
140 }; | 140 }; |
141 | 141 |
142 #endif // CHROME_PLUGIN_PLUGIN_WEBPLUGIN_PROXY_H__ | 142 #endif // CHROME_PLUGIN_PLUGIN_WEBPLUGIN_PROXY_H__ |
OLD | NEW |