OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 namespace base { |
12 class FilePath; | 13 class FilePath; |
| 14 } |
13 | 15 |
14 namespace WebKit { | 16 namespace WebKit { |
15 class WebCookieJar; | 17 class WebCookieJar; |
16 class WebPlugin; | 18 class WebPlugin; |
17 } | 19 } |
18 | 20 |
19 namespace webkit { | 21 namespace webkit { |
20 namespace npapi { | 22 namespace npapi { |
21 | 23 |
22 class WebPluginDelegate; | 24 class WebPluginDelegate; |
23 struct WebPluginGeometry; | 25 struct WebPluginGeometry; |
24 | 26 |
25 // Used by the WebPlugin to communicate back to the containing page. | 27 // Used by the WebPlugin to communicate back to the containing page. |
26 class WebPluginPageDelegate { | 28 class WebPluginPageDelegate { |
27 public: | 29 public: |
28 // This method is called to create a WebPluginDelegate implementation when a | 30 // This method is called to create a WebPluginDelegate implementation when a |
29 // new plugin is instanced. See CreateWebPluginDelegateHelper | 31 // new plugin is instanced. See CreateWebPluginDelegateHelper |
30 // for a default WebPluginDelegate implementation. | 32 // for a default WebPluginDelegate implementation. |
31 virtual WebPluginDelegate* CreatePluginDelegate( | 33 virtual WebPluginDelegate* CreatePluginDelegate( |
32 const FilePath& file_path, | 34 const base::FilePath& file_path, |
33 const std::string& mime_type) = 0; | 35 const std::string& mime_type) = 0; |
34 | 36 |
35 // Caled to create a replacement plug-in when loading a plug-in failed. | 37 // Caled to create a replacement plug-in when loading a plug-in failed. |
36 virtual WebKit::WebPlugin* CreatePluginReplacement( | 38 virtual WebKit::WebPlugin* CreatePluginReplacement( |
37 const FilePath& file_path) = 0; | 39 const base::FilePath& file_path) = 0; |
38 | 40 |
39 // Called when a windowed plugin is created. | 41 // Called when a windowed plugin is created. |
40 // Lets the view delegate create anything it is using to wrap the plugin. | 42 // Lets the view delegate create anything it is using to wrap the plugin. |
41 virtual void CreatedPluginWindow( | 43 virtual void CreatedPluginWindow( |
42 gfx::PluginWindowHandle handle) = 0; | 44 gfx::PluginWindowHandle handle) = 0; |
43 | 45 |
44 // Called when a windowed plugin is closing. | 46 // Called when a windowed plugin is closing. |
45 // Lets the view delegate shut down anything it is using to wrap the plugin. | 47 // Lets the view delegate shut down anything it is using to wrap the plugin. |
46 virtual void WillDestroyPluginWindow( | 48 virtual void WillDestroyPluginWindow( |
47 gfx::PluginWindowHandle handle) = 0; | 49 gfx::PluginWindowHandle handle) = 0; |
(...skipping 14 matching lines...) Expand all Loading... |
62 virtual WebKit::WebCookieJar* GetCookieJar() = 0; | 64 virtual WebKit::WebCookieJar* GetCookieJar() = 0; |
63 | 65 |
64 protected: | 66 protected: |
65 virtual ~WebPluginPageDelegate() {} | 67 virtual ~WebPluginPageDelegate() {} |
66 }; | 68 }; |
67 | 69 |
68 } // namespace npapi | 70 } // namespace npapi |
69 } // namespace webkit | 71 } // namespace webkit |
70 | 72 |
71 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_PAGE_DELEGATE_H_ | 73 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_PAGE_DELEGATE_H_ |
OLD | NEW |