| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/public/web/WebPlugin.h" | 8 #include "third_party/WebKit/public/web/WebPlugin.h" |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 // Notify the plugin about a compositor commit so that frame ACKs could be | 136 // Notify the plugin about a compositor commit so that frame ACKs could be |
| 137 // sent, if needed. | 137 // sent, if needed. |
| 138 void DidCommitCompositorFrame(); | 138 void DidCommitCompositorFrame(); |
| 139 | 139 |
| 140 // Returns whether a message should be forwarded to BrowserPlugin. | 140 // Returns whether a message should be forwarded to BrowserPlugin. |
| 141 static bool ShouldForwardToBrowserPlugin(const IPC::Message& message); | 141 static bool ShouldForwardToBrowserPlugin(const IPC::Message& message); |
| 142 | 142 |
| 143 // blink::WebPlugin implementation. | 143 // blink::WebPlugin implementation. |
| 144 virtual blink::WebPluginContainer* container() const OVERRIDE; | 144 virtual blink::WebPluginContainer* container() const OVERRIDE; |
| 145 virtual void containerDidDetachFromParent() OVERRIDE; |
| 145 virtual bool initialize(blink::WebPluginContainer* container) OVERRIDE; | 146 virtual bool initialize(blink::WebPluginContainer* container) OVERRIDE; |
| 146 virtual void destroy() OVERRIDE; | 147 virtual void destroy() OVERRIDE; |
| 147 virtual NPObject* scriptableObject() OVERRIDE; | 148 virtual NPObject* scriptableObject() OVERRIDE; |
| 148 virtual struct _NPP* pluginNPP() OVERRIDE; | 149 virtual struct _NPP* pluginNPP() OVERRIDE; |
| 149 virtual bool supportsKeyboardFocus() const OVERRIDE; | 150 virtual bool supportsKeyboardFocus() const OVERRIDE; |
| 150 virtual bool supportsEditCommands() const OVERRIDE; | 151 virtual bool supportsEditCommands() const OVERRIDE; |
| 151 virtual bool supportsInputMethod() const OVERRIDE; | 152 virtual bool supportsInputMethod() const OVERRIDE; |
| 152 virtual bool canProcessDrag() const OVERRIDE; | 153 virtual bool canProcessDrag() const OVERRIDE; |
| 153 virtual void paint( | 154 virtual void paint( |
| 154 blink::WebCanvas* canvas, | 155 blink::WebCanvas* canvas, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 const blink::WebString& text, | 194 const blink::WebString& text, |
| 194 blink::WebWidget::ConfirmCompositionBehavior selectionBehavior) OVERRIDE; | 195 blink::WebWidget::ConfirmCompositionBehavior selectionBehavior) OVERRIDE; |
| 195 virtual void extendSelectionAndDelete(int before, int after) OVERRIDE; | 196 virtual void extendSelectionAndDelete(int before, int after) OVERRIDE; |
| 196 | 197 |
| 197 // MouseLockDispatcher::LockTarget implementation. | 198 // MouseLockDispatcher::LockTarget implementation. |
| 198 virtual void OnLockMouseACK(bool succeeded) OVERRIDE; | 199 virtual void OnLockMouseACK(bool succeeded) OVERRIDE; |
| 199 virtual void OnMouseLockLost() OVERRIDE; | 200 virtual void OnMouseLockLost() OVERRIDE; |
| 200 virtual bool HandleMouseLockedInputEvent( | 201 virtual bool HandleMouseLockedInputEvent( |
| 201 const blink::WebMouseEvent& event) OVERRIDE; | 202 const blink::WebMouseEvent& event) OVERRIDE; |
| 202 | 203 |
| 204 virtual bool shouldPersist() const OVERRIDE; |
| 205 |
| 203 private: | 206 private: |
| 204 friend class base::DeleteHelper<BrowserPlugin>; | 207 friend class base::DeleteHelper<BrowserPlugin>; |
| 205 // Only the manager is allowed to create a BrowserPlugin. | 208 // Only the manager is allowed to create a BrowserPlugin. |
| 206 friend class BrowserPluginManagerImpl; | 209 friend class BrowserPluginManagerImpl; |
| 207 friend class MockBrowserPluginManager; | 210 friend class MockBrowserPluginManager; |
| 208 | 211 |
| 209 // For unit/integration tests. | 212 // For unit/integration tests. |
| 210 friend class MockBrowserPlugin; | 213 friend class MockBrowserPlugin; |
| 211 | 214 |
| 212 // A BrowserPlugin object is a controller that represents an instance of a | 215 // A BrowserPlugin object is a controller that represents an instance of a |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might | 369 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might |
| 367 // get called after BrowserPlugin has been destroyed. | 370 // get called after BrowserPlugin has been destroyed. |
| 368 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; | 371 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; |
| 369 | 372 |
| 370 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 373 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
| 371 }; | 374 }; |
| 372 | 375 |
| 373 } // namespace content | 376 } // namespace content |
| 374 | 377 |
| 375 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 378 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
| OLD | NEW |