Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(907)

Side by Side Diff: webkit/glue/webplugin_impl.h

Issue 2896: This CB fixes the following issues:-... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webplugin_delegate.h ('k') | webkit/glue/webplugin_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 WEBKIT_GLUE_WEBPLUGIN_IMPL_H__ 5 #ifndef WEBKIT_GLUE_WEBPLUGIN_IMPL_H__
6 #define WEBKIT_GLUE_WEBPLUGIN_IMPL_H__ 6 #define WEBKIT_GLUE_WEBPLUGIN_IMPL_H__
7 7
8 #include <string> 8 #include <string>
9 #include <map>
9 #include <vector> 10 #include <vector>
10 11
11 #include "config.h" 12 #include "config.h"
12 #pragma warning(push, 0) 13 #pragma warning(push, 0)
13 #include "ResourceHandle.h" 14 #include "ResourceHandle.h"
14 #include "ResourceHandleClient.h" 15 #include "ResourceHandleClient.h"
15 #include "ResourceRequest.h" 16 #include "ResourceRequest.h"
16 #include "Widget.h" 17 #include "Widget.h"
17 #pragma warning(pop) 18 #pragma warning(pop)
18 19
19 #include "base/basictypes.h" 20 #include "base/basictypes.h"
20 #include "base/scoped_ptr.h" 21 #include "base/scoped_ptr.h"
21 #include "webkit/glue/webframe_impl.h" 22 #include "webkit/glue/webframe_impl.h"
22 #include "webkit/glue/webplugin.h" 23 #include "webkit/glue/webplugin.h"
23 #include "webkit/glue/webplugin_delegate.h" 24 #include "webkit/glue/webplugin_delegate.h"
24 25
25 class WebFrameImpl; 26 class WebFrameImpl;
26 class WebPluginDelegate; 27 class WebPluginDelegate;
27 class WebPluginImpl; 28 class WebPluginImpl;
29 class MultipartResponseDelegate;
28 30
29 namespace WebCore { 31 namespace WebCore {
30 class DeprecatedString; 32 class DeprecatedString;
31 class Element; 33 class Element;
32 class Event; 34 class Event;
33 class Frame; 35 class Frame;
34 class IntRect; 36 class IntRect;
35 class KeyboardEvent; 37 class KeyboardEvent;
36 class KURL; 38 class KURL;
37 class MouseEvent; 39 class MouseEvent;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // Cancels a pending request. 144 // Cancels a pending request.
143 void CancelResource(int id); 145 void CancelResource(int id);
144 146
145 // Returns the next avaiable resource id. 147 // Returns the next avaiable resource id.
146 int GetNextResourceId(); 148 int GetNextResourceId();
147 149
148 // Initiates HTTP GET/POST requests. 150 // Initiates HTTP GET/POST requests.
149 // Returns true on success. 151 // Returns true on success.
150 bool InitiateHTTPRequest(int resource_id, WebPluginResourceClient* client, 152 bool InitiateHTTPRequest(int resource_id, WebPluginResourceClient* client,
151 const char* method, const char* buf, int buf_len, 153 const char* method, const char* buf, int buf_len,
152 const GURL& complete_url_string); 154 const GURL& complete_url_string,
155 const char* range_info);
153 156
154 gfx::Rect GetWindowClipRect(const gfx::Rect& rect); 157 gfx::Rect GetWindowClipRect(const gfx::Rect& rect);
155 158
156 NPObject* GetWindowScriptNPObject(); 159 NPObject* GetWindowScriptNPObject();
157 NPObject* GetPluginElement(); 160 NPObject* GetPluginElement();
158 virtual WebFrame* GetWebFrame() { return webframe_; } 161 virtual WebFrame* GetWebFrame() { return webframe_; }
159 162
160 void SetCookie(const GURL& url, 163 void SetCookie(const GURL& url,
161 const GURL& policy_url, 164 const GURL& policy_url,
162 const std::string& cookie); 165 const std::string& cookie);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 WebCore::IntRect* window_rect, 238 WebCore::IntRect* window_rect,
236 WebCore::IntRect* clip_rect); 239 WebCore::IntRect* clip_rect);
237 240
238 void HandleURLRequest(const char *method, 241 void HandleURLRequest(const char *method,
239 bool is_javascript_url, 242 bool is_javascript_url,
240 const char* target, unsigned int len, 243 const char* target, unsigned int len,
241 const char* buf, bool is_file_data, 244 const char* buf, bool is_file_data,
242 bool notify, const char* url, 245 bool notify, const char* url,
243 void* notify_data, bool popups_allowed); 246 void* notify_data, bool popups_allowed);
244 247
248 void CancelDocumentLoad();
249
250 void InitiateHTTPRangeRequest(const char* url, const char* range_info,
251 HANDLE existing_stream, bool notify_needed,
252 HANDLE notify_data);
253
254 // Handles HTTP multipart responses, i.e. responses received with a HTTP
255 // status code of 206.
256 void HandleHttpMultipartResponse(const WebCore::ResourceResponse& response,
257 WebPluginResourceClient* client);
258
245 struct ClientInfo { 259 struct ClientInfo {
246 int id; 260 int id;
247 WebPluginResourceClient* client; 261 WebPluginResourceClient* client;
248 WebCore::ResourceRequest request; 262 WebCore::ResourceRequest request;
249 RefPtr<WebCore::ResourceHandle> handle; 263 RefPtr<WebCore::ResourceHandle> handle;
250 }; 264 };
251 265
252 std::vector<ClientInfo> clients_; 266 std::vector<ClientInfo> clients_;
253 267
254 bool windowless_; 268 bool windowless_;
255 HWND window_; 269 HWND window_;
256 WebCore::Element* element_; 270 WebCore::Element* element_;
257 WebFrameImpl* webframe_; 271 WebFrameImpl* webframe_;
258 272
259 WebPluginDelegate* delegate_; 273 WebPluginDelegate* delegate_;
260 bool force_geometry_update_; 274 bool force_geometry_update_;
261 bool visible_; 275 bool visible_;
262 // Set when we receive the first paint notification for the plugin widget. 276 // Set when we receive the first paint notification for the plugin widget.
263 bool received_first_paint_notification_; 277 bool received_first_paint_notification_;
264 278
265 WebPluginContainer* widget_; 279 WebPluginContainer* widget_;
266 280
281 typedef std::map<WebPluginResourceClient*, MultipartResponseDelegate*>
282 MultiPartResponseHandlerMap;
283 // Tracks HTTP multipart response handlers instantiated for
284 // a WebPluginResourceClient instance.
285 MultiPartResponseHandlerMap multi_part_response_map_;
286
267 DISALLOW_EVIL_CONSTRUCTORS(WebPluginImpl); 287 DISALLOW_EVIL_CONSTRUCTORS(WebPluginImpl);
268 }; 288 };
269 289
270 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_IMPL_H__ 290 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_IMPL_H__
271 291
OLDNEW
« no previous file with comments | « webkit/glue/webplugin_delegate.h ('k') | webkit/glue/webplugin_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698