| 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_PLUGINS_NPAPI_WEBPLUGIN_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ |
| 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 // Returns the DOM element that loaded the plugin. | 98 // Returns the DOM element that loaded the plugin. |
| 99 virtual NPObject* GetPluginElement() = 0; | 99 virtual NPObject* GetPluginElement() = 0; |
| 100 | 100 |
| 101 // Cookies | 101 // Cookies |
| 102 virtual void SetCookie(const GURL& url, | 102 virtual void SetCookie(const GURL& url, |
| 103 const GURL& first_party_for_cookies, | 103 const GURL& first_party_for_cookies, |
| 104 const std::string& cookie) = 0; | 104 const std::string& cookie) = 0; |
| 105 virtual std::string GetCookies(const GURL& url, | 105 virtual std::string GetCookies(const GURL& url, |
| 106 const GURL& first_party_for_cookies) = 0; | 106 const GURL& first_party_for_cookies) = 0; |
| 107 | 107 |
| 108 // Shows a modal HTML dialog containing the given URL. json_arguments are | |
| 109 // passed to the dialog via the DOM 'window.chrome.dialogArguments', and the | |
| 110 // retval is the string returned by 'window.chrome.send("DialogClose", | |
| 111 // retval)'. | |
| 112 virtual void ShowModalHTMLDialog(const GURL& url, int width, int height, | |
| 113 const std::string& json_arguments, | |
| 114 std::string* json_retval) = 0; | |
| 115 | |
| 116 // When a default plugin has downloaded the plugin list and finds it is | 108 // When a default plugin has downloaded the plugin list and finds it is |
| 117 // available, it calls this method to notify the renderer. Also it will update | 109 // available, it calls this method to notify the renderer. Also it will update |
| 118 // the status when user clicks on the plugin to install. | 110 // the status when user clicks on the plugin to install. |
| 119 virtual void OnMissingPluginStatus(int status) = 0; | 111 virtual void OnMissingPluginStatus(int status) = 0; |
| 120 | 112 |
| 121 // Handles GetURL/GetURLNotify/PostURL/PostURLNotify requests initiated | 113 // Handles GetURL/GetURLNotify/PostURL/PostURLNotify requests initiated |
| 122 // by plugins. If the plugin wants notification of the result, notify_id will | 114 // by plugins. If the plugin wants notification of the result, notify_id will |
| 123 // be non-zero. | 115 // be non-zero. |
| 124 virtual void HandleURLRequest(const char* url, | 116 virtual void HandleURLRequest(const char* url, |
| 125 const char* method, | 117 const char* method, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 virtual void DidFinishLoading() = 0; | 188 virtual void DidFinishLoading() = 0; |
| 197 virtual void DidFail() = 0; | 189 virtual void DidFail() = 0; |
| 198 virtual bool IsMultiByteResponseExpected() = 0; | 190 virtual bool IsMultiByteResponseExpected() = 0; |
| 199 virtual int ResourceId() = 0; | 191 virtual int ResourceId() = 0; |
| 200 }; | 192 }; |
| 201 | 193 |
| 202 } // namespace npapi | 194 } // namespace npapi |
| 203 } // namespace webkit | 195 } // namespace webkit |
| 204 | 196 |
| 205 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ | 197 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ |
| OLD | NEW |