| 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_CHILD_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 5 #ifndef CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
| 6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // WebPluginDelegate implementation | 84 // WebPluginDelegate implementation |
| 85 virtual bool Initialize(const GURL& url, | 85 virtual bool Initialize(const GURL& url, |
| 86 const std::vector<std::string>& arg_names, | 86 const std::vector<std::string>& arg_names, |
| 87 const std::vector<std::string>& arg_values, | 87 const std::vector<std::string>& arg_values, |
| 88 bool load_manually) OVERRIDE; | 88 bool load_manually) OVERRIDE; |
| 89 virtual void PluginDestroyed() OVERRIDE; | 89 virtual void PluginDestroyed() OVERRIDE; |
| 90 virtual void UpdateGeometry(const gfx::Rect& window_rect, | 90 virtual void UpdateGeometry(const gfx::Rect& window_rect, |
| 91 const gfx::Rect& clip_rect) OVERRIDE; | 91 const gfx::Rect& clip_rect) OVERRIDE; |
| 92 virtual void Paint(SkCanvas* canvas, const gfx::Rect& rect) OVERRIDE; | 92 virtual void Paint(SkCanvas* canvas, const gfx::Rect& rect) OVERRIDE; |
| 93 virtual void SetFocus(bool focused) OVERRIDE; | 93 virtual void SetFocus(bool focused) OVERRIDE; |
| 94 virtual bool HandleInputEvent(const WebKit::WebInputEvent& event, | 94 virtual bool HandleInputEvent(const blink::WebInputEvent& event, |
| 95 WebCursor::CursorInfo* cursor_info) OVERRIDE; | 95 WebCursor::CursorInfo* cursor_info) OVERRIDE; |
| 96 virtual NPObject* GetPluginScriptableObject() OVERRIDE; | 96 virtual NPObject* GetPluginScriptableObject() OVERRIDE; |
| 97 virtual NPP GetPluginNPP() OVERRIDE; | 97 virtual NPP GetPluginNPP() OVERRIDE; |
| 98 virtual bool GetFormValue(base::string16* value) OVERRIDE; | 98 virtual bool GetFormValue(base::string16* value) OVERRIDE; |
| 99 virtual void DidFinishLoadWithReason(const GURL& url, | 99 virtual void DidFinishLoadWithReason(const GURL& url, |
| 100 NPReason reason, | 100 NPReason reason, |
| 101 int notify_id) OVERRIDE; | 101 int notify_id) OVERRIDE; |
| 102 virtual int GetProcessId() OVERRIDE; | 102 virtual int GetProcessId() OVERRIDE; |
| 103 virtual void SendJavaScriptStream(const GURL& url, | 103 virtual void SendJavaScriptStream(const GURL& url, |
| 104 const std::string& result, | 104 const std::string& result, |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 | 273 |
| 274 // Handles the platform specific details of setting plugin focus. Returns | 274 // Handles the platform specific details of setting plugin focus. Returns |
| 275 // false if the platform cancelled the focus tranfer. | 275 // false if the platform cancelled the focus tranfer. |
| 276 bool PlatformSetPluginHasFocus(bool focused); | 276 bool PlatformSetPluginHasFocus(bool focused); |
| 277 | 277 |
| 278 //----------------------------------------- | 278 //----------------------------------------- |
| 279 // used for windowed and windowless plugins | 279 // used for windowed and windowless plugins |
| 280 | 280 |
| 281 // Does platform-specific event handling. Arguments and return are identical | 281 // Does platform-specific event handling. Arguments and return are identical |
| 282 // to HandleInputEvent. | 282 // to HandleInputEvent. |
| 283 bool PlatformHandleInputEvent(const WebKit::WebInputEvent& event, | 283 bool PlatformHandleInputEvent(const blink::WebInputEvent& event, |
| 284 WebCursor::CursorInfo* cursor_info); | 284 WebCursor::CursorInfo* cursor_info); |
| 285 | 285 |
| 286 // Closes down and destroys our plugin instance. | 286 // Closes down and destroys our plugin instance. |
| 287 void DestroyInstance(); | 287 void DestroyInstance(); |
| 288 | 288 |
| 289 | 289 |
| 290 // used for windowed plugins | 290 // used for windowed plugins |
| 291 // Note: on Mac OS X, the only time the windowed handle is non-zero | 291 // Note: on Mac OS X, the only time the windowed handle is non-zero |
| 292 // is the case of accelerated rendering, which uses a fake window handle to | 292 // is the case of accelerated rendering, which uses a fake window handle to |
| 293 // identify itself back to the browser. It still performs all of its | 293 // identify itself back to the browser. It still performs all of its |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 bool ime_enabled_; | 433 bool ime_enabled_; |
| 434 int keyup_ignore_count_; | 434 int keyup_ignore_count_; |
| 435 | 435 |
| 436 scoped_ptr<ExternalDragTracker> external_drag_tracker_; | 436 scoped_ptr<ExternalDragTracker> external_drag_tracker_; |
| 437 #endif // OS_MACOSX && !USE_AURA | 437 #endif // OS_MACOSX && !USE_AURA |
| 438 | 438 |
| 439 // Called by the message filter hook when the plugin enters a modal loop. | 439 // Called by the message filter hook when the plugin enters a modal loop. |
| 440 void OnModalLoopEntered(); | 440 void OnModalLoopEntered(); |
| 441 | 441 |
| 442 // Returns true if the message passed in corresponds to a user gesture. | 442 // Returns true if the message passed in corresponds to a user gesture. |
| 443 static bool IsUserGesture(const WebKit::WebInputEvent& event); | 443 static bool IsUserGesture(const blink::WebInputEvent& event); |
| 444 | 444 |
| 445 // The url with which the plugin was instantiated. | 445 // The url with which the plugin was instantiated. |
| 446 std::string plugin_url_; | 446 std::string plugin_url_; |
| 447 | 447 |
| 448 #if defined(OS_WIN) | 448 #if defined(OS_WIN) |
| 449 // Indicates the end of a user gesture period. | 449 // Indicates the end of a user gesture period. |
| 450 void OnUserGestureEnd(); | 450 void OnUserGestureEnd(); |
| 451 | 451 |
| 452 // Handle to the message filter hook | 452 // Handle to the message filter hook |
| 453 HHOOK handle_event_message_filter_hook_; | 453 HHOOK handle_event_message_filter_hook_; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 | 491 |
| 492 // True if NPP_New did not return an error. | 492 // True if NPP_New did not return an error. |
| 493 bool creation_succeeded_; | 493 bool creation_succeeded_; |
| 494 | 494 |
| 495 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); | 495 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); |
| 496 }; | 496 }; |
| 497 | 497 |
| 498 } // namespace content | 498 } // namespace content |
| 499 | 499 |
| 500 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 500 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
| OLD | NEW |