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_SUPPORT_TEST_WEBPLUGIN_PAGE_DELEGATE_H_ | 5 #ifndef WEBKIT_SUPPORT_TEST_WEBPLUGIN_PAGE_DELEGATE_H_ |
6 #define WEBKIT_SUPPORT_TEST_WEBPLUGIN_PAGE_DELEGATE_H_ | 6 #define WEBKIT_SUPPORT_TEST_WEBPLUGIN_PAGE_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" | 10 #include "webkit/glue/plugins/webplugin_delegate_impl.h" |
11 #include "webkit/plugins/npapi/webplugin_page_delegate.h" | 11 #include "webkit/glue/plugins/webplugin_page_delegate.h" |
12 | 12 |
13 namespace webkit_support { | 13 namespace webkit_support { |
14 | 14 |
15 class TestWebPluginPageDelegate : public webkit::npapi::WebPluginPageDelegate { | 15 class TestWebPluginPageDelegate : public webkit_glue::WebPluginPageDelegate { |
16 public: | 16 public: |
17 TestWebPluginPageDelegate() {} | 17 TestWebPluginPageDelegate() {} |
18 virtual ~TestWebPluginPageDelegate() {} | 18 virtual ~TestWebPluginPageDelegate() {} |
19 | 19 |
20 virtual webkit::npapi::WebPluginDelegate* CreatePluginDelegate( | 20 virtual webkit_glue::WebPluginDelegate* CreatePluginDelegate( |
21 const FilePath& file_path, | 21 const FilePath& file_path, |
22 const std::string& mime_type) { | 22 const std::string& mime_type) { |
23 // We don't need a valid native window handle in layout tests. | 23 // We don't need a valid native window handle in layout tests. |
24 // So just passing 0. | 24 // So just passing 0. |
25 return webkit::npapi::WebPluginDelegateImpl::Create( | 25 return WebPluginDelegateImpl::Create(file_path, mime_type, 0); |
26 file_path, mime_type, 0); | |
27 } | 26 } |
28 virtual void CreatedPluginWindow(gfx::PluginWindowHandle handle) {} | 27 virtual void CreatedPluginWindow(gfx::PluginWindowHandle handle) {} |
29 virtual void WillDestroyPluginWindow(gfx::PluginWindowHandle handle) {} | 28 virtual void WillDestroyPluginWindow(gfx::PluginWindowHandle handle) {} |
30 virtual void DidMovePlugin(const webkit::npapi::WebPluginGeometry& move) {} | 29 virtual void DidMovePlugin(const webkit_glue::WebPluginGeometry& move) {} |
31 virtual void DidStartLoadingForPlugin() {} | 30 virtual void DidStartLoadingForPlugin() {} |
32 virtual void DidStopLoadingForPlugin() {} | 31 virtual void DidStopLoadingForPlugin() {} |
33 virtual void ShowModalHTMLDialogForPlugin( | 32 virtual void ShowModalHTMLDialogForPlugin( |
34 const GURL& url, | 33 const GURL& url, |
35 const gfx::Size& size, | 34 const gfx::Size& size, |
36 const std::string& json_arguments, | 35 const std::string& json_arguments, |
37 std::string* json_retval) {} | 36 std::string* json_retval) {} |
38 virtual WebKit::WebCookieJar* GetCookieJar() { | 37 virtual WebKit::WebCookieJar* GetCookieJar() { |
39 return WebKit::webKitClient()->cookieJar(); | 38 return WebKit::webKitClient()->cookieJar(); |
40 } | 39 } |
41 }; | 40 }; |
42 | 41 |
43 } // namespace webkit_support | 42 } // namespace webkit_support |
44 | |
45 #endif // WEBKIT_SUPPORT_TEST_WEBPLUGIN_PAGE_DELEGATE_H_ | 43 #endif // WEBKIT_SUPPORT_TEST_WEBPLUGIN_PAGE_DELEGATE_H_ |
OLD | NEW |