| 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_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
| 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
| 7 | 7 |
| 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" | 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 void DidCommitCompositorFrame(); | 167 void DidCommitCompositorFrame(); |
| 168 | 168 |
| 169 // Returns whether a message should be forwarded to BrowserPlugin. | 169 // Returns whether a message should be forwarded to BrowserPlugin. |
| 170 static bool ShouldForwardToBrowserPlugin(const IPC::Message& message); | 170 static bool ShouldForwardToBrowserPlugin(const IPC::Message& message); |
| 171 | 171 |
| 172 // WebKit::WebPlugin implementation. | 172 // WebKit::WebPlugin implementation. |
| 173 virtual WebKit::WebPluginContainer* container() const OVERRIDE; | 173 virtual WebKit::WebPluginContainer* container() const OVERRIDE; |
| 174 virtual bool initialize(WebKit::WebPluginContainer* container) OVERRIDE; | 174 virtual bool initialize(WebKit::WebPluginContainer* container) OVERRIDE; |
| 175 virtual void destroy() OVERRIDE; | 175 virtual void destroy() OVERRIDE; |
| 176 virtual NPObject* scriptableObject() OVERRIDE; | 176 virtual NPObject* scriptableObject() OVERRIDE; |
| 177 virtual struct _NPP* pluginNPP() OVERRIDE; | |
| 178 virtual bool supportsKeyboardFocus() const OVERRIDE; | 177 virtual bool supportsKeyboardFocus() const OVERRIDE; |
| 179 virtual bool canProcessDrag() const OVERRIDE; | 178 virtual bool canProcessDrag() const OVERRIDE; |
| 180 virtual void paint( | 179 virtual void paint( |
| 181 WebKit::WebCanvas* canvas, | 180 WebKit::WebCanvas* canvas, |
| 182 const WebKit::WebRect& rect) OVERRIDE; | 181 const WebKit::WebRect& rect) OVERRIDE; |
| 183 virtual void updateGeometry( | 182 virtual void updateGeometry( |
| 184 const WebKit::WebRect& frame_rect, | 183 const WebKit::WebRect& frame_rect, |
| 185 const WebKit::WebRect& clip_rect, | 184 const WebKit::WebRect& clip_rect, |
| 186 const WebKit::WebVector<WebKit::WebRect>& cut_outs_rects, | 185 const WebKit::WebVector<WebKit::WebRect>& cut_outs_rects, |
| 187 bool is_visible) OVERRIDE; | 186 bool is_visible) OVERRIDE; |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 // will change after a navigation (e.g., for back, forward, or go), because | 434 // will change after a navigation (e.g., for back, forward, or go), because |
| 436 // the changes are not always obvious. For example, there is a maximum | 435 // the changes are not always obvious. For example, there is a maximum |
| 437 // number of entries and earlier ones will automatically be pruned. | 436 // number of entries and earlier ones will automatically be pruned. |
| 438 int current_nav_entry_index_; | 437 int current_nav_entry_index_; |
| 439 int nav_entry_count_; | 438 int nav_entry_count_; |
| 440 | 439 |
| 441 // Used for HW compositing. | 440 // Used for HW compositing. |
| 442 bool compositing_enabled_; | 441 bool compositing_enabled_; |
| 443 scoped_refptr<BrowserPluginCompositingHelper> compositing_helper_; | 442 scoped_refptr<BrowserPluginCompositingHelper> compositing_helper_; |
| 444 | 443 |
| 445 // Used to identify the plugin to WebBindings. | |
| 446 scoped_ptr<struct _NPP> npp_; | |
| 447 | |
| 448 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might | 444 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might |
| 449 // get called after BrowserPlugin has been destroyed. | 445 // get called after BrowserPlugin has been destroyed. |
| 450 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; | 446 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; |
| 451 | 447 |
| 452 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 448 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
| 453 }; | 449 }; |
| 454 | 450 |
| 455 } // namespace content | 451 } // namespace content |
| 456 | 452 |
| 457 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 453 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
| OLD | NEW |