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 CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ | 5 #ifndef CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ |
6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ | 6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 // The WebKit side of a plugin implementation. It provides wrappers around | 33 // The WebKit side of a plugin implementation. It provides wrappers around |
34 // operations that need to interact with the frame and other WebCore objects. | 34 // operations that need to interact with the frame and other WebCore objects. |
35 class WebPlugin { | 35 class WebPlugin { |
36 public: | 36 public: |
37 virtual ~WebPlugin() {} | 37 virtual ~WebPlugin() {} |
38 | 38 |
39 virtual void Invalidate() = 0; | 39 virtual void Invalidate() = 0; |
40 virtual void InvalidateRect(const gfx::Rect& rect) = 0; | 40 virtual void InvalidateRect(const gfx::Rect& rect) = 0; |
41 | 41 |
42 // Returns the NPObject for the browser's window object. Does not | |
43 // take a reference. | |
44 virtual NPObject* GetWindowScriptNPObject() = 0; | |
45 | |
46 // Returns the DOM element that loaded the plugin. Does not take a | |
47 // reference. | |
48 virtual NPObject* GetPluginElement() = 0; | |
49 | |
50 // Resolves the proxies for the url, returns true on success. | 42 // Resolves the proxies for the url, returns true on success. |
51 virtual bool FindProxyForUrl(const GURL& url, std::string* proxy_list) = 0; | 43 virtual bool FindProxyForUrl(const GURL& url, std::string* proxy_list) = 0; |
52 | 44 |
53 // Cookies | 45 // Cookies |
54 virtual void SetCookie(const GURL& url, | 46 virtual void SetCookie(const GURL& url, |
55 const GURL& first_party_for_cookies, | 47 const GURL& first_party_for_cookies, |
56 const std::string& cookie) = 0; | 48 const std::string& cookie) = 0; |
57 virtual std::string GetCookies(const GURL& url, | 49 virtual std::string GetCookies(const GURL& url, |
58 const GURL& first_party_for_cookies) = 0; | 50 const GURL& first_party_for_cookies) = 0; |
59 | 51 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 virtual void AcceleratedPluginAllocatedIOSurface(int32_t width, | 84 virtual void AcceleratedPluginAllocatedIOSurface(int32_t width, |
93 int32_t height, | 85 int32_t height, |
94 uint32_t surface_id) = 0; | 86 uint32_t surface_id) = 0; |
95 virtual void AcceleratedPluginSwappedIOSurface() = 0; | 87 virtual void AcceleratedPluginSwappedIOSurface() = 0; |
96 #endif | 88 #endif |
97 }; | 89 }; |
98 | 90 |
99 } // namespace content | 91 } // namespace content |
100 | 92 |
101 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ | 93 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ |
OLD | NEW |