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 CONTENT_RENDERER_WEBPLUGIN_PAGE_DELEGATE_H_ |
6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_PAGE_DELEGATE_H_ | 6 #define CONTENT_RENDERER_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 namespace base { |
13 class FilePath; | 13 class FilePath; |
14 } | 14 } |
15 | 15 |
16 namespace WebKit { | 16 namespace WebKit { |
17 class WebCookieJar; | 17 class WebCookieJar; |
18 class WebPlugin; | 18 class WebPlugin; |
19 } | 19 } |
20 | 20 |
21 namespace webkit { | 21 namespace content { |
22 namespace npapi { | |
23 | 22 |
24 class WebPluginDelegate; | 23 class WebPluginDelegate; |
25 struct WebPluginGeometry; | 24 struct WebPluginGeometry; |
26 | 25 |
27 // Used by the WebPlugin to communicate back to the containing page. | 26 // Used by the WebPlugin to communicate back to the containing page. |
28 class WebPluginPageDelegate { | 27 class WebPluginPageDelegate { |
29 public: | 28 public: |
30 // This method is called to create a WebPluginDelegate implementation when a | 29 // This method is called to create a WebPluginDelegate implementation when a |
31 // new plugin is instanced. See CreateWebPluginDelegateHelper | 30 // new plugin is instanced. See CreateWebPluginDelegateHelper |
32 // for a default WebPluginDelegate implementation. | 31 // for a default WebPluginDelegate implementation. |
(...skipping 11 matching lines...) Expand all Loading... |
44 gfx::PluginWindowHandle handle) = 0; | 43 gfx::PluginWindowHandle handle) = 0; |
45 | 44 |
46 // Called when a windowed plugin is closing. | 45 // Called when a windowed plugin is closing. |
47 // Lets the view delegate shut down anything it is using to wrap the plugin. | 46 // Lets the view delegate shut down anything it is using to wrap the plugin. |
48 virtual void WillDestroyPluginWindow( | 47 virtual void WillDestroyPluginWindow( |
49 gfx::PluginWindowHandle handle) = 0; | 48 gfx::PluginWindowHandle handle) = 0; |
50 | 49 |
51 // Keeps track of the necessary window move for a plugin window that resulted | 50 // Keeps track of the necessary window move for a plugin window that resulted |
52 // from a scroll operation. That way, all plugin windows can be moved at the | 51 // from a scroll operation. That way, all plugin windows can be moved at the |
53 // same time as each other and the page. | 52 // same time as each other and the page. |
54 virtual void DidMovePlugin( | 53 virtual void DidMovePlugin(const WebPluginGeometry& move) = 0; |
55 const WebPluginGeometry& move) = 0; | |
56 | 54 |
57 // Notifies the parent view that a load has begun. | 55 // Notifies the parent view that a load has begun. |
58 virtual void DidStartLoadingForPlugin() = 0; | 56 virtual void DidStartLoadingForPlugin() = 0; |
59 | 57 |
60 // Notifies the parent view that all loads are finished. | 58 // Notifies the parent view that all loads are finished. |
61 virtual void DidStopLoadingForPlugin() = 0; | 59 virtual void DidStopLoadingForPlugin() = 0; |
62 | 60 |
63 // The WebCookieJar to use for this plugin. | 61 // The WebCookieJar to use for this plugin. |
64 virtual WebKit::WebCookieJar* GetCookieJar() = 0; | 62 virtual WebKit::WebCookieJar* GetCookieJar() = 0; |
65 | 63 |
66 protected: | 64 protected: |
67 virtual ~WebPluginPageDelegate() {} | 65 virtual ~WebPluginPageDelegate() {} |
68 }; | 66 }; |
69 | 67 |
70 } // namespace npapi | 68 } // namespace content |
71 } // namespace webkit | |
72 | 69 |
73 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_PAGE_DELEGATE_H_ | 70 #endif // CONTENT_RENDERER_WEBPLUGIN_PAGE_DELEGATE_H_ |
OLD | NEW |