| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 bool supportsKeyboardFocus() const OVERRIDE; | 177 virtual bool supportsKeyboardFocus() const OVERRIDE; |
| 178 virtual bool supportsEditCommands() const OVERRIDE; |
| 178 virtual bool canProcessDrag() const OVERRIDE; | 179 virtual bool canProcessDrag() const OVERRIDE; |
| 179 virtual void paint( | 180 virtual void paint( |
| 180 WebKit::WebCanvas* canvas, | 181 WebKit::WebCanvas* canvas, |
| 181 const WebKit::WebRect& rect) OVERRIDE; | 182 const WebKit::WebRect& rect) OVERRIDE; |
| 182 virtual void updateGeometry( | 183 virtual void updateGeometry( |
| 183 const WebKit::WebRect& frame_rect, | 184 const WebKit::WebRect& frame_rect, |
| 184 const WebKit::WebRect& clip_rect, | 185 const WebKit::WebRect& clip_rect, |
| 185 const WebKit::WebVector<WebKit::WebRect>& cut_outs_rects, | 186 const WebKit::WebVector<WebKit::WebRect>& cut_outs_rects, |
| 186 bool is_visible) OVERRIDE; | 187 bool is_visible) OVERRIDE; |
| 187 virtual void updateFocus(bool focused) OVERRIDE; | 188 virtual void updateFocus(bool focused) OVERRIDE; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 201 virtual void didFinishLoading() OVERRIDE; | 202 virtual void didFinishLoading() OVERRIDE; |
| 202 virtual void didFailLoading(const WebKit::WebURLError& error) OVERRIDE; | 203 virtual void didFailLoading(const WebKit::WebURLError& error) OVERRIDE; |
| 203 virtual void didFinishLoadingFrameRequest( | 204 virtual void didFinishLoadingFrameRequest( |
| 204 const WebKit::WebURL& url, | 205 const WebKit::WebURL& url, |
| 205 void* notify_data) OVERRIDE; | 206 void* notify_data) OVERRIDE; |
| 206 virtual void didFailLoadingFrameRequest( | 207 virtual void didFailLoadingFrameRequest( |
| 207 const WebKit::WebURL& url, | 208 const WebKit::WebURL& url, |
| 208 void* notify_data, | 209 void* notify_data, |
| 209 const WebKit::WebURLError& error) OVERRIDE; | 210 const WebKit::WebURLError& error) OVERRIDE; |
| 210 virtual bool executeEditCommand(const WebKit::WebString& name) OVERRIDE; | 211 virtual bool executeEditCommand(const WebKit::WebString& name) OVERRIDE; |
| 212 virtual bool executeEditCommand(const WebKit::WebString& name, |
| 213 const WebKit::WebString& value) OVERRIDE; |
| 211 | 214 |
| 212 // MouseLockDispatcher::LockTarget implementation. | 215 // MouseLockDispatcher::LockTarget implementation. |
| 213 virtual void OnLockMouseACK(bool succeeded) OVERRIDE; | 216 virtual void OnLockMouseACK(bool succeeded) OVERRIDE; |
| 214 virtual void OnMouseLockLost() OVERRIDE; | 217 virtual void OnMouseLockLost() OVERRIDE; |
| 215 virtual bool HandleMouseLockedInputEvent( | 218 virtual bool HandleMouseLockedInputEvent( |
| 216 const WebKit::WebMouseEvent& event) OVERRIDE; | 219 const WebKit::WebMouseEvent& event) OVERRIDE; |
| 217 | 220 |
| 218 private: | 221 private: |
| 219 friend class base::DeleteHelper<BrowserPlugin>; | 222 friend class base::DeleteHelper<BrowserPlugin>; |
| 220 // Only the manager is allowed to create a BrowserPlugin. | 223 // Only the manager is allowed to create a BrowserPlugin. |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 int nav_entry_count_; | 441 int nav_entry_count_; |
| 439 | 442 |
| 440 // Used for HW compositing. | 443 // Used for HW compositing. |
| 441 bool compositing_enabled_; | 444 bool compositing_enabled_; |
| 442 scoped_refptr<BrowserPluginCompositingHelper> compositing_helper_; | 445 scoped_refptr<BrowserPluginCompositingHelper> compositing_helper_; |
| 443 | 446 |
| 444 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might | 447 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might |
| 445 // get called after BrowserPlugin has been destroyed. | 448 // get called after BrowserPlugin has been destroyed. |
| 446 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; | 449 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; |
| 447 | 450 |
| 451 std::vector<EditCommand> edit_commands_; |
| 452 |
| 448 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 453 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
| 449 }; | 454 }; |
| 450 | 455 |
| 451 } // namespace content | 456 } // namespace content |
| 452 | 457 |
| 453 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 458 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
| OLD | NEW |