OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 const FilePath& file_path, | 53 const FilePath& file_path, |
54 const std::string& mime_type, | 54 const std::string& mime_type, |
55 const base::WeakPtr<WebPluginPageDelegate>& page_delegate); | 55 const base::WeakPtr<WebPluginPageDelegate>& page_delegate); |
56 virtual ~WebPluginImpl(); | 56 virtual ~WebPluginImpl(); |
57 | 57 |
58 // Helper function for sorting post data. | 58 // Helper function for sorting post data. |
59 static bool SetPostData(WebKit::WebURLRequest* request, | 59 static bool SetPostData(WebKit::WebURLRequest* request, |
60 const char* buf, | 60 const char* buf, |
61 uint32 length); | 61 uint32 length); |
62 | 62 |
63 virtual WebPluginDelegate* delegate() { return delegate_; } | 63 virtual WebPluginDelegate* delegate(); |
64 | 64 |
65 private: | 65 private: |
66 // WebKit::WebPlugin methods: | 66 // WebKit::WebPlugin methods: |
67 virtual bool initialize( | 67 virtual bool initialize( |
68 WebKit::WebPluginContainer* container); | 68 WebKit::WebPluginContainer* container); |
69 virtual void destroy(); | 69 virtual void destroy(); |
70 virtual NPObject* scriptableObject(); | 70 virtual NPObject* scriptableObject(); |
71 virtual void paint( | 71 virtual void paint( |
72 WebKit::WebCanvas* canvas, const WebKit::WebRect& paint_rect); | 72 WebKit::WebCanvas* canvas, const WebKit::WebRect& paint_rect); |
73 virtual void updateGeometry( | 73 virtual void updateGeometry( |
(...skipping 24 matching lines...) Expand all Loading... |
98 virtual WebKit::WebString selectionAsMarkup() const; | 98 virtual WebKit::WebString selectionAsMarkup() const; |
99 virtual void setZoomFactor(float scale, bool text_only); | 99 virtual void setZoomFactor(float scale, bool text_only); |
100 virtual bool startFind(const WebKit::WebString& search_text, | 100 virtual bool startFind(const WebKit::WebString& search_text, |
101 bool case_sensitive, | 101 bool case_sensitive, |
102 int identifier); | 102 int identifier); |
103 virtual void selectFindResult(bool forward); | 103 virtual void selectFindResult(bool forward); |
104 virtual void stopFind(); | 104 virtual void stopFind(); |
105 | 105 |
106 // WebPlugin implementation: | 106 // WebPlugin implementation: |
107 virtual void SetWindow(gfx::PluginWindowHandle window); | 107 virtual void SetWindow(gfx::PluginWindowHandle window); |
108 virtual void SetAcceptsInputEvents(bool accepts) { | 108 virtual void SetAcceptsInputEvents(bool accepts); |
109 accepts_input_events_ = accepts; | |
110 } | |
111 virtual void WillDestroyWindow(gfx::PluginWindowHandle window); | 109 virtual void WillDestroyWindow(gfx::PluginWindowHandle window); |
112 #if defined(OS_WIN) | 110 #if defined(OS_WIN) |
113 void SetWindowlessPumpEvent(HANDLE pump_messages_event) { } | 111 void SetWindowlessPumpEvent(HANDLE pump_messages_event) { } |
114 #endif | 112 #endif |
115 virtual void CancelResource(unsigned long id); | 113 virtual void CancelResource(unsigned long id); |
116 virtual void Invalidate(); | 114 virtual void Invalidate(); |
117 virtual void InvalidateRect(const gfx::Rect& rect); | 115 virtual void InvalidateRect(const gfx::Rect& rect); |
118 virtual NPObject* GetWindowScriptNPObject(); | 116 virtual NPObject* GetWindowScriptNPObject(); |
119 virtual NPObject* GetPluginElement(); | 117 virtual NPObject* GetPluginElement(); |
120 virtual void SetCookie(const GURL& url, | 118 virtual void SetCookie(const GURL& url, |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 bool notify_redirects); | 228 bool notify_redirects); |
231 | 229 |
232 virtual void CancelDocumentLoad(); | 230 virtual void CancelDocumentLoad(); |
233 | 231 |
234 virtual void InitiateHTTPRangeRequest( | 232 virtual void InitiateHTTPRangeRequest( |
235 const char* url, const char* range_info, int pending_request_id); | 233 const char* url, const char* range_info, int pending_request_id); |
236 | 234 |
237 virtual void SetDeferResourceLoading(unsigned long resource_id, bool defer); | 235 virtual void SetDeferResourceLoading(unsigned long resource_id, bool defer); |
238 | 236 |
239 // Ignore in-process plugins mode for this flag. | 237 // Ignore in-process plugins mode for this flag. |
240 virtual bool IsOffTheRecord() { return false; } | 238 virtual bool IsOffTheRecord(); |
241 | 239 |
242 // Handles HTTP multipart responses, i.e. responses received with a HTTP | 240 // Handles HTTP multipart responses, i.e. responses received with a HTTP |
243 // status code of 206. | 241 // status code of 206. |
244 void HandleHttpMultipartResponse(const WebKit::WebURLResponse& response, | 242 void HandleHttpMultipartResponse(const WebKit::WebURLResponse& response, |
245 WebPluginResourceClient* client); | 243 WebPluginResourceClient* client); |
246 | 244 |
247 void HandleURLRequestInternal(const char* url, | 245 void HandleURLRequestInternal(const char* url, |
248 const char* method, | 246 const char* method, |
249 const char* target, | 247 const char* target, |
250 const char* buf, | 248 const char* buf, |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 std::vector<std::string> arg_values_; | 321 std::vector<std::string> arg_values_; |
324 | 322 |
325 ScopedRunnableMethodFactory<WebPluginImpl> method_factory_; | 323 ScopedRunnableMethodFactory<WebPluginImpl> method_factory_; |
326 | 324 |
327 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); | 325 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); |
328 }; | 326 }; |
329 | 327 |
330 } // namespace webkit_glue | 328 } // namespace webkit_glue |
331 | 329 |
332 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_IMPL_H_ | 330 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_IMPL_H_ |
OLD | NEW |