| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <list> | 9 #include <list> |
| 10 | 10 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 // Returns true if the window handle passed in is that of the dummy | 101 // Returns true if the window handle passed in is that of the dummy |
| 102 // activation window for windowless plugins. | 102 // activation window for windowless plugins. |
| 103 static bool IsDummyActivationWindow(gfx::NativeWindow window); | 103 static bool IsDummyActivationWindow(gfx::NativeWindow window); |
| 104 | 104 |
| 105 // WebPluginDelegate implementation | 105 // WebPluginDelegate implementation |
| 106 virtual bool Initialize(const GURL& url, | 106 virtual bool Initialize(const GURL& url, |
| 107 const std::vector<std::string>& arg_names, | 107 const std::vector<std::string>& arg_names, |
| 108 const std::vector<std::string>& arg_values, | 108 const std::vector<std::string>& arg_values, |
| 109 WebPlugin* plugin, | 109 WebPlugin* plugin, |
| 110 bool load_manually); | 110 bool load_manually) OVERRIDE; |
| 111 virtual void PluginDestroyed(); | 111 virtual void PluginDestroyed() OVERRIDE; |
| 112 virtual void UpdateGeometry(const gfx::Rect& window_rect, | 112 virtual void UpdateGeometry(const gfx::Rect& window_rect, |
| 113 const gfx::Rect& clip_rect); | 113 const gfx::Rect& clip_rect) OVERRIDE; |
| 114 virtual void Paint(WebKit::WebCanvas* canvas, const gfx::Rect& rect); | 114 virtual void Paint(WebKit::WebCanvas* canvas, const gfx::Rect& rect) OVERRIDE; |
| 115 virtual void SetFocus(bool focused); | 115 virtual void SetFocus(bool focused) OVERRIDE; |
| 116 virtual bool HandleInputEvent(const WebKit::WebInputEvent& event, | 116 virtual bool HandleInputEvent(const WebKit::WebInputEvent& event, |
| 117 WebKit::WebCursorInfo* cursor_info); | 117 WebKit::WebCursorInfo* cursor_info) OVERRIDE; |
| 118 virtual NPObject* GetPluginScriptableObject(); | 118 virtual NPObject* GetPluginScriptableObject() OVERRIDE; |
| 119 virtual bool GetFormValue(string16* value); | 119 virtual bool GetFormValue(string16* value) OVERRIDE; |
| 120 virtual void DidFinishLoadWithReason( | 120 virtual void DidFinishLoadWithReason(const GURL& url, |
| 121 const GURL& url, NPReason reason, int notify_id); | 121 NPReason reason, |
| 122 virtual int GetProcessId(); | 122 int notify_id) OVERRIDE; |
| 123 virtual int GetProcessId() OVERRIDE; |
| 123 virtual void SendJavaScriptStream(const GURL& url, | 124 virtual void SendJavaScriptStream(const GURL& url, |
| 124 const std::string& result, | 125 const std::string& result, |
| 125 bool success, | 126 bool success, |
| 126 int notify_id); | 127 int notify_id) OVERRIDE; |
| 127 virtual void DidReceiveManualResponse(const GURL& url, | 128 virtual void DidReceiveManualResponse(const GURL& url, |
| 128 const std::string& mime_type, | 129 const std::string& mime_type, |
| 129 const std::string& headers, | 130 const std::string& headers, |
| 130 uint32 expected_length, | 131 uint32 expected_length, |
| 131 uint32 last_modified); | 132 uint32 last_modified) OVERRIDE; |
| 132 virtual void DidReceiveManualData(const char* buffer, int length); | 133 virtual void DidReceiveManualData(const char* buffer, int length) OVERRIDE; |
| 133 virtual void DidFinishManualLoading(); | 134 virtual void DidFinishManualLoading() OVERRIDE; |
| 134 virtual void DidManualLoadFail(); | 135 virtual void DidManualLoadFail() OVERRIDE; |
| 135 virtual WebPluginResourceClient* CreateResourceClient( | 136 virtual WebPluginResourceClient* CreateResourceClient( |
| 136 unsigned long resource_id, const GURL& url, int notify_id); | 137 unsigned long resource_id, const GURL& url, int notify_id) OVERRIDE; |
| 137 virtual WebPluginResourceClient* CreateSeekableResourceClient( | 138 virtual WebPluginResourceClient* CreateSeekableResourceClient( |
| 138 unsigned long resource_id, int range_request_id); | 139 unsigned long resource_id, int range_request_id) OVERRIDE; |
| 139 // End of WebPluginDelegate implementation. | 140 // End of WebPluginDelegate implementation. |
| 140 | 141 |
| 141 bool IsWindowless() const { return windowless_ ; } | 142 bool IsWindowless() const { return windowless_ ; } |
| 142 gfx::Rect GetRect() const { return window_rect_; } | 143 gfx::Rect GetRect() const { return window_rect_; } |
| 143 gfx::Rect GetClipRect() const { return clip_rect_; } | 144 gfx::Rect GetClipRect() const { return clip_rect_; } |
| 144 | 145 |
| 145 // Returns the path for the library implementing this plugin. | 146 // Returns the path for the library implementing this plugin. |
| 146 FilePath GetPluginPath(); | 147 FilePath GetPluginPath(); |
| 147 | 148 |
| 148 // Returns a combination of PluginQuirks. | 149 // Returns a combination of PluginQuirks. |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 // True if NPP_New did not return an error. | 555 // True if NPP_New did not return an error. |
| 555 bool creation_succeeded_; | 556 bool creation_succeeded_; |
| 556 | 557 |
| 557 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); | 558 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); |
| 558 }; | 559 }; |
| 559 | 560 |
| 560 } // namespace npapi | 561 } // namespace npapi |
| 561 } // namespace webkit | 562 } // namespace webkit |
| 562 | 563 |
| 563 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 564 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
| OLD | NEW |