OLD | NEW |
1 // Copyright (c) 2012 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 WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_PAGE_DELEGATE_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_PAGE_DELEGATE_H_ |
6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_PAGE_DELEGATE_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_PAGE_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
11 | 11 |
12 class FilePath; | 12 class FilePath; |
13 | 13 |
14 namespace WebKit { | 14 namespace WebKit { |
15 class WebCookieJar; | 15 class WebCookieJar; |
16 class WebPlugin; | |
17 } | 16 } |
18 | 17 |
19 namespace webkit { | 18 namespace webkit { |
20 namespace npapi { | 19 namespace npapi { |
21 | 20 |
22 class WebPluginDelegate; | 21 class WebPluginDelegate; |
23 struct WebPluginGeometry; | 22 struct WebPluginGeometry; |
24 | 23 |
25 // Used by the WebPlugin to communicate back to the containing page. | 24 // Used by the WebPlugin to communicate back to the containing page. |
26 class WebPluginPageDelegate { | 25 class WebPluginPageDelegate { |
27 public: | 26 public: |
28 // This method is called to create a WebPluginDelegate implementation when a | 27 // This method is called to create a WebPluginDelegate implementation when a |
29 // new plugin is instanced. See CreateWebPluginDelegateHelper | 28 // new plugin is instanced. See CreateWebPluginDelegateHelper |
30 // for a default WebPluginDelegate implementation. | 29 // for a default WebPluginDelegate implementation. |
31 virtual WebPluginDelegate* CreatePluginDelegate( | 30 virtual WebPluginDelegate* CreatePluginDelegate( |
32 const FilePath& file_path, | 31 const FilePath& file_path, |
33 const std::string& mime_type) = 0; | 32 const std::string& mime_type) = 0; |
34 | 33 |
35 // Caled to create a replacement plug-in when loading a plug-in failed. | |
36 virtual WebKit::WebPlugin* CreatePluginReplacement( | |
37 const FilePath& file_path) = 0; | |
38 | |
39 // Called when a windowed plugin is created. | 34 // Called when a windowed plugin is created. |
40 // Lets the view delegate create anything it is using to wrap the plugin. | 35 // Lets the view delegate create anything it is using to wrap the plugin. |
41 virtual void CreatedPluginWindow( | 36 virtual void CreatedPluginWindow( |
42 gfx::PluginWindowHandle handle) = 0; | 37 gfx::PluginWindowHandle handle) = 0; |
43 | 38 |
44 // Called when a windowed plugin is closing. | 39 // Called when a windowed plugin is closing. |
45 // Lets the view delegate shut down anything it is using to wrap the plugin. | 40 // Lets the view delegate shut down anything it is using to wrap the plugin. |
46 virtual void WillDestroyPluginWindow( | 41 virtual void WillDestroyPluginWindow( |
47 gfx::PluginWindowHandle handle) = 0; | 42 gfx::PluginWindowHandle handle) = 0; |
48 | 43 |
(...skipping 10 matching lines...) Expand all Loading... |
59 virtual void DidStopLoadingForPlugin() = 0; | 54 virtual void DidStopLoadingForPlugin() = 0; |
60 | 55 |
61 // The WebCookieJar to use for this plugin. | 56 // The WebCookieJar to use for this plugin. |
62 virtual WebKit::WebCookieJar* GetCookieJar() = 0; | 57 virtual WebKit::WebCookieJar* GetCookieJar() = 0; |
63 }; | 58 }; |
64 | 59 |
65 } // namespace npapi | 60 } // namespace npapi |
66 } // namespace webkit | 61 } // namespace webkit |
67 | 62 |
68 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_PAGE_DELEGATE_H_ | 63 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_PAGE_DELEGATE_H_ |
OLD | NEW |