| 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" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/sequenced_task_runner_helpers.h" | 12 #include "base/sequenced_task_runner_helpers.h" |
| 13 #if defined(OS_WIN) | 13 #if defined(OS_WIN) |
| 14 #include "base/memory/shared_memory.h" | 14 #include "base/memory/shared_memory.h" |
| 15 #endif | 15 #endif |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "content/renderer/browser_plugin/browser_plugin_backing_store.h" | 17 #include "content/renderer/browser_plugin/browser_plugin_backing_store.h" |
| 18 #include "content/renderer/browser_plugin/browser_plugin_bindings.h" | 18 #include "content/renderer/browser_plugin/browser_plugin_bindings.h" |
| 19 #include "content/renderer/mouse_lock_dispatcher.h" | 19 #include "content/renderer/mouse_lock_dispatcher.h" |
| 20 #include "content/renderer/render_view_impl.h" | 20 #include "content/renderer/render_view_impl.h" |
| 21 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" |
| 21 #include "third_party/WebKit/public/web/WebDragStatus.h" | 22 #include "third_party/WebKit/public/web/WebDragStatus.h" |
| 23 #include "third_party/WebKit/public/web/WebWidget.h" |
| 22 | 24 |
| 23 struct BrowserPluginHostMsg_AutoSize_Params; | 25 struct BrowserPluginHostMsg_AutoSize_Params; |
| 24 struct BrowserPluginHostMsg_ResizeGuest_Params; | 26 struct BrowserPluginHostMsg_ResizeGuest_Params; |
| 25 struct BrowserPluginMsg_Attach_ACK_Params; | 27 struct BrowserPluginMsg_Attach_ACK_Params; |
| 26 struct BrowserPluginMsg_BuffersSwapped_Params; | 28 struct BrowserPluginMsg_BuffersSwapped_Params; |
| 27 struct BrowserPluginMsg_UpdateRect_Params; | 29 struct BrowserPluginMsg_UpdateRect_Params; |
| 28 | 30 |
| 29 namespace content { | 31 namespace content { |
| 30 | 32 |
| 31 class BrowserPluginCompositingHelper; | 33 class BrowserPluginCompositingHelper; |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 static bool ShouldForwardToBrowserPlugin(const IPC::Message& message); | 146 static bool ShouldForwardToBrowserPlugin(const IPC::Message& message); |
| 145 | 147 |
| 146 // blink::WebPlugin implementation. | 148 // blink::WebPlugin implementation. |
| 147 virtual blink::WebPluginContainer* container() const OVERRIDE; | 149 virtual blink::WebPluginContainer* container() const OVERRIDE; |
| 148 virtual bool initialize(blink::WebPluginContainer* container) OVERRIDE; | 150 virtual bool initialize(blink::WebPluginContainer* container) OVERRIDE; |
| 149 virtual void destroy() OVERRIDE; | 151 virtual void destroy() OVERRIDE; |
| 150 virtual NPObject* scriptableObject() OVERRIDE; | 152 virtual NPObject* scriptableObject() OVERRIDE; |
| 151 virtual struct _NPP* pluginNPP() OVERRIDE; | 153 virtual struct _NPP* pluginNPP() OVERRIDE; |
| 152 virtual bool supportsKeyboardFocus() const OVERRIDE; | 154 virtual bool supportsKeyboardFocus() const OVERRIDE; |
| 153 virtual bool supportsEditCommands() const OVERRIDE; | 155 virtual bool supportsEditCommands() const OVERRIDE; |
| 156 virtual bool supportsInputMethod() const OVERRIDE; |
| 154 virtual bool canProcessDrag() const OVERRIDE; | 157 virtual bool canProcessDrag() const OVERRIDE; |
| 155 virtual void paint( | 158 virtual void paint( |
| 156 blink::WebCanvas* canvas, | 159 blink::WebCanvas* canvas, |
| 157 const blink::WebRect& rect) OVERRIDE; | 160 const blink::WebRect& rect) OVERRIDE; |
| 158 virtual void updateGeometry( | 161 virtual void updateGeometry( |
| 159 const blink::WebRect& frame_rect, | 162 const blink::WebRect& frame_rect, |
| 160 const blink::WebRect& clip_rect, | 163 const blink::WebRect& clip_rect, |
| 161 const blink::WebVector<blink::WebRect>& cut_outs_rects, | 164 const blink::WebVector<blink::WebRect>& cut_outs_rects, |
| 162 bool is_visible) OVERRIDE; | 165 bool is_visible) OVERRIDE; |
| 163 virtual void updateFocus(bool focused) OVERRIDE; | 166 virtual void updateFocus(bool focused) OVERRIDE; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 179 virtual void didFinishLoadingFrameRequest( | 182 virtual void didFinishLoadingFrameRequest( |
| 180 const blink::WebURL& url, | 183 const blink::WebURL& url, |
| 181 void* notify_data) OVERRIDE; | 184 void* notify_data) OVERRIDE; |
| 182 virtual void didFailLoadingFrameRequest( | 185 virtual void didFailLoadingFrameRequest( |
| 183 const blink::WebURL& url, | 186 const blink::WebURL& url, |
| 184 void* notify_data, | 187 void* notify_data, |
| 185 const blink::WebURLError& error) OVERRIDE; | 188 const blink::WebURLError& error) OVERRIDE; |
| 186 virtual bool executeEditCommand(const blink::WebString& name) OVERRIDE; | 189 virtual bool executeEditCommand(const blink::WebString& name) OVERRIDE; |
| 187 virtual bool executeEditCommand(const blink::WebString& name, | 190 virtual bool executeEditCommand(const blink::WebString& name, |
| 188 const blink::WebString& value) OVERRIDE; | 191 const blink::WebString& value) OVERRIDE; |
| 192 virtual bool setComposition( |
| 193 const blink::WebString& text, |
| 194 const blink::WebVector<blink::WebCompositionUnderline>& underlines, |
| 195 int selectionStart, |
| 196 int selectionEnd) OVERRIDE; |
| 197 virtual bool confirmComposition( |
| 198 const blink::WebString& text, |
| 199 blink::WebWidget::ConfirmCompositionBehavior selectionBehavior) OVERRIDE; |
| 189 | 200 |
| 190 // MouseLockDispatcher::LockTarget implementation. | 201 // MouseLockDispatcher::LockTarget implementation. |
| 191 virtual void OnLockMouseACK(bool succeeded) OVERRIDE; | 202 virtual void OnLockMouseACK(bool succeeded) OVERRIDE; |
| 192 virtual void OnMouseLockLost() OVERRIDE; | 203 virtual void OnMouseLockLost() OVERRIDE; |
| 193 virtual bool HandleMouseLockedInputEvent( | 204 virtual bool HandleMouseLockedInputEvent( |
| 194 const blink::WebMouseEvent& event) OVERRIDE; | 205 const blink::WebMouseEvent& event) OVERRIDE; |
| 195 | 206 |
| 196 private: | 207 private: |
| 197 friend class base::DeleteHelper<BrowserPlugin>; | 208 friend class base::DeleteHelper<BrowserPlugin>; |
| 198 // Only the manager is allowed to create a BrowserPlugin. | 209 // Only the manager is allowed to create a BrowserPlugin. |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; | 369 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; |
| 359 | 370 |
| 360 std::vector<EditCommand> edit_commands_; | 371 std::vector<EditCommand> edit_commands_; |
| 361 | 372 |
| 362 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 373 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
| 363 }; | 374 }; |
| 364 | 375 |
| 365 } // namespace content | 376 } // namespace content |
| 366 | 377 |
| 367 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 378 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
| OLD | NEW |