OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ | 5 #ifndef CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ |
6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ | 6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace blink { | 21 namespace blink { |
22 class WebInputEvent; | 22 class WebInputEvent; |
23 } | 23 } |
24 | 24 |
25 namespace gfx { | 25 namespace gfx { |
26 class Rect; | 26 class Rect; |
27 } | 27 } |
28 | 28 |
29 namespace content { | 29 namespace content { |
30 | 30 |
| 31 struct Referrer; |
31 class WebPluginResourceClient; | 32 class WebPluginResourceClient; |
32 | 33 |
33 // This is the interface that a plugin implementation needs to provide. | 34 // This is the interface that a plugin implementation needs to provide. |
34 class WebPluginDelegate { | 35 class WebPluginDelegate { |
35 public: | 36 public: |
36 virtual ~WebPluginDelegate() {} | 37 virtual ~WebPluginDelegate() {} |
37 | 38 |
38 // Initializes the plugin implementation with the given (UTF8) arguments. | 39 // Initializes the plugin implementation with the given (UTF8) arguments. |
39 // Note that the lifetime of WebPlugin must be longer than this delegate. | 40 // Note that the lifetime of WebPlugin must be longer than this delegate. |
40 // If this function returns false the plugin isn't started and shouldn't be | 41 // If this function returns false the plugin isn't started and shouldn't be |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // Tell the plugin that the given URL should be fetched. This is a result of | 132 // Tell the plugin that the given URL should be fetched. This is a result of |
132 // loading the plugin data or the plugin calling HandleURLRequest which didn't | 133 // loading the plugin data or the plugin calling HandleURLRequest which didn't |
133 // end up being routed to another frame or being a javscript:// URL. | 134 // end up being routed to another frame or being a javscript:// URL. |
134 virtual void FetchURL(unsigned long resource_id, | 135 virtual void FetchURL(unsigned long resource_id, |
135 int notify_id, | 136 int notify_id, |
136 const GURL& url, | 137 const GURL& url, |
137 const GURL& first_party_for_cookies, | 138 const GURL& first_party_for_cookies, |
138 const std::string& method, | 139 const std::string& method, |
139 const char* buf, | 140 const char* buf, |
140 unsigned int len, | 141 unsigned int len, |
141 const GURL& referrer, | 142 const Referrer& referrer, |
142 bool notify_redirects, | 143 bool notify_redirects, |
143 bool is_plugin_src_load, | 144 bool is_plugin_src_load, |
144 int origin_pid, | 145 int origin_pid, |
145 int render_frame_id, | 146 int render_frame_id, |
146 int render_view_id) = 0; | 147 int render_view_id) = 0; |
147 | 148 |
148 }; | 149 }; |
149 | 150 |
150 } // namespace content | 151 } // namespace content |
151 | 152 |
152 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ | 153 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ |
OLD | NEW |