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_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_ |
6 #define CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_ | 6 #define CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 blink::WebInputEventResult handleInputEvent( | 89 blink::WebInputEventResult handleInputEvent( |
90 const blink::WebInputEvent& event, | 90 const blink::WebInputEvent& event, |
91 blink::WebCursorInfo& cursor_info) override; | 91 blink::WebCursorInfo& cursor_info) override; |
92 void didReceiveResponse(const blink::WebURLResponse& response) override {} | 92 void didReceiveResponse(const blink::WebURLResponse& response) override {} |
93 void didReceiveData(const char* data, int data_length) override {} | 93 void didReceiveData(const char* data, int data_length) override {} |
94 void didFinishLoading() override {} | 94 void didFinishLoading() override {} |
95 void didFailLoading(const blink::WebURLError& error) override {} | 95 void didFailLoading(const blink::WebURLError& error) override {} |
96 bool isPlaceholder() override; | 96 bool isPlaceholder() override; |
97 | 97 |
98 // WebPlugin implementation: | 98 // WebPlugin implementation: |
99 void SetWindow(gfx::PluginWindowHandle window) override; | |
100 void SetAcceptsInputEvents(bool accepts) override; | |
101 void WillDestroyWindow(gfx::PluginWindowHandle window) override; | |
102 void Invalidate() override; | 99 void Invalidate() override; |
103 void InvalidateRect(const gfx::Rect& rect) override; | 100 void InvalidateRect(const gfx::Rect& rect) override; |
104 NPObject* GetWindowScriptNPObject() override; | 101 NPObject* GetWindowScriptNPObject() override; |
105 NPObject* GetPluginElement() override; | 102 NPObject* GetPluginElement() override; |
106 bool FindProxyForUrl(const GURL& url, std::string* proxy_list) override; | 103 bool FindProxyForUrl(const GURL& url, std::string* proxy_list) override; |
107 void SetCookie(const GURL& url, | 104 void SetCookie(const GURL& url, |
108 const GURL& first_party_for_cookies, | 105 const GURL& first_party_for_cookies, |
109 const std::string& cookie) override; | 106 const std::string& cookie) override; |
110 std::string GetCookies(const GURL& url, | 107 std::string GetCookies(const GURL& url, |
111 const GURL& first_party_for_cookies) override; | 108 const GURL& first_party_for_cookies) override; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 // to handle the response identified by the loader parameter. | 175 // to handle the response identified by the loader parameter. |
179 bool ReinitializePluginForResponse(blink::WebURLLoader* loader); | 176 bool ReinitializePluginForResponse(blink::WebURLLoader* loader); |
180 | 177 |
181 | 178 |
182 // Helper function to set the referrer on the request passed in. | 179 // Helper function to set the referrer on the request passed in. |
183 void SetReferrer(blink::WebURLRequest* request, ReferrerValue referrer_flag); | 180 void SetReferrer(blink::WebURLRequest* request, ReferrerValue referrer_flag); |
184 | 181 |
185 // Check for invalid chars like @, ;, \ before the first / (in path). | 182 // Check for invalid chars like @, ;, \ before the first / (in path). |
186 bool IsValidUrl(const GURL& url, ReferrerValue referrer_flag); | 183 bool IsValidUrl(const GURL& url, ReferrerValue referrer_flag); |
187 | 184 |
188 bool windowless_; | |
189 gfx::PluginWindowHandle window_; | |
190 #if defined(OS_MACOSX) | 185 #if defined(OS_MACOSX) |
191 bool next_io_surface_allocated_; | 186 bool next_io_surface_allocated_; |
192 int32_t next_io_surface_width_; | 187 int32_t next_io_surface_width_; |
193 int32_t next_io_surface_height_; | 188 int32_t next_io_surface_height_; |
194 uint32_t next_io_surface_id_; | 189 uint32_t next_io_surface_id_; |
195 scoped_refptr<cc::IOSurfaceLayer> io_surface_layer_; | 190 scoped_refptr<cc::IOSurfaceLayer> io_surface_layer_; |
196 scoped_ptr<blink::WebLayer> web_layer_; | 191 scoped_ptr<blink::WebLayer> web_layer_; |
197 #endif | 192 #endif |
198 bool accepts_input_events_; | |
199 RenderFrameImpl* render_frame_; | 193 RenderFrameImpl* render_frame_; |
200 base::WeakPtr<RenderViewImpl> render_view_; | 194 base::WeakPtr<RenderViewImpl> render_view_; |
201 blink::WebFrame* webframe_; | 195 blink::WebFrame* webframe_; |
202 | 196 |
203 WebPluginDelegateProxy* delegate_; | 197 WebPluginDelegateProxy* delegate_; |
204 | 198 |
205 // This is just a weak reference. | 199 // This is just a weak reference. |
206 blink::WebPluginContainer* container_; | 200 blink::WebPluginContainer* container_; |
207 | 201 |
208 // Unique identifier for this plugin, used to track script objects. | 202 // Unique identifier for this plugin, used to track script objects. |
(...skipping 24 matching lines...) Expand all Loading... |
233 // these so that we can re-initialize the plugin if we need to. | 227 // these so that we can re-initialize the plugin if we need to. |
234 std::vector<std::string> arg_names_; | 228 std::vector<std::string> arg_names_; |
235 std::vector<std::string> arg_values_; | 229 std::vector<std::string> arg_values_; |
236 | 230 |
237 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); | 231 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); |
238 }; | 232 }; |
239 | 233 |
240 } // namespace content | 234 } // namespace content |
241 | 235 |
242 #endif // CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_ | 236 #endif // CONTENT_RENDERER_NPAPI_WEBPLUGIN_IMPL_H_ |
OLD | NEW |