OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_PAGE_DELEGATE_ | 5 #ifndef WEBKIT_GLUE_WEBPLUGIN_PAGE_DELEGATE_ |
6 #define WEBKIT_GLUE_WEBPLUGIN_PAGE_DELEGATE_ | 6 #define WEBKIT_GLUE_WEBPLUGIN_PAGE_DELEGATE_ |
7 | 7 |
8 #include "base/gfx/native_widget_types.h" | 8 #include "base/gfx/native_widget_types.h" |
9 | 9 |
10 class GURL; | 10 class GURL; |
11 | 11 |
12 namespace webkit_glue { | 12 namespace webkit_glue { |
13 | 13 |
14 class WebPluginDelegate; | 14 class WebPluginDelegate; |
15 struct WebPluginGeometry; | 15 struct WebPluginGeometry; |
16 | 16 |
17 // Used by the WebPlugin to communicate back to the containing page. | 17 // Used by the WebPlugin to communicate back to the containing page. |
18 class WebPluginPageDelegate { | 18 class WebPluginPageDelegate { |
19 public: | 19 public: |
20 // This method is called to create a WebPluginDelegate implementation when a | 20 // This method is called to create a WebPluginDelegate implementation when a |
21 // new plugin is instanced. See webkit_glue::CreateWebPluginDelegateHelper | 21 // new plugin is instanced. See webkit_glue::CreateWebPluginDelegateHelper |
22 // for a default WebPluginDelegate implementation. | 22 // for a default WebPluginDelegate implementation. |
23 // TODO(port): clsid is very Win- and ActiveX-specific; refactor to be more | |
24 // platform-neutral | |
25 virtual WebPluginDelegate* CreatePluginDelegate( | 23 virtual WebPluginDelegate* CreatePluginDelegate( |
26 const GURL& url, | 24 const GURL& url, |
27 const std::string& mime_type, | 25 const std::string& mime_type, |
28 const std::string& clsid, | |
29 std::string* actual_mime_type) = 0; | 26 std::string* actual_mime_type) = 0; |
30 | 27 |
31 // Called when a windowed plugin is created. | 28 // Called when a windowed plugin is created. |
32 // Lets the view delegate create anything it is using to wrap the plugin. | 29 // Lets the view delegate create anything it is using to wrap the plugin. |
33 virtual void CreatedPluginWindow( | 30 virtual void CreatedPluginWindow( |
34 gfx::PluginWindowHandle handle) = 0; | 31 gfx::PluginWindowHandle handle) = 0; |
35 | 32 |
36 // Called when a windowed plugin is closing. | 33 // Called when a windowed plugin is closing. |
37 // Lets the view delegate shut down anything it is using to wrap the plugin. | 34 // Lets the view delegate shut down anything it is using to wrap the plugin. |
38 virtual void WillDestroyPluginWindow( | 35 virtual void WillDestroyPluginWindow( |
(...skipping 17 matching lines...) Expand all Loading... |
56 virtual void ShowModalHTMLDialogForPlugin( | 53 virtual void ShowModalHTMLDialogForPlugin( |
57 const GURL& url, | 54 const GURL& url, |
58 const gfx::Size& size, | 55 const gfx::Size& size, |
59 const std::string& json_arguments, | 56 const std::string& json_arguments, |
60 std::string* json_retval) = 0; | 57 std::string* json_retval) = 0; |
61 }; | 58 }; |
62 | 59 |
63 } // namespace webkit_glue | 60 } // namespace webkit_glue |
64 | 61 |
65 #endif // WEBKIT_GLUE_WEBPLUGIN_PAGE_DELEGATE_H_ | 62 #endif // WEBKIT_GLUE_WEBPLUGIN_PAGE_DELEGATE_H_ |
OLD | NEW |