| 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 CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ | 5 #ifndef CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ |
| 6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ | 6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "third_party/npapi/bindings/npapi.h" | 13 #include "third_party/npapi/bindings/npapi.h" |
| 14 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
| 15 #include "webkit/common/cursors/webcursor.h" | 15 #include "webkit/common/cursors/webcursor.h" |
| 16 | 16 |
| 17 class GURL; | 17 class GURL; |
| 18 class SkCanvas; | 18 class SkCanvas; |
| 19 struct NPObject; | 19 struct NPObject; |
| 20 | 20 |
| 21 namespace WebKit { | 21 namespace blink { |
| 22 class WebInputEvent; | 22 class WebInputEvent; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace gfx { | 25 namespace gfx { |
| 26 class Rect; | 26 class Rect; |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace content { | 29 namespace content { |
| 30 | 30 |
| 31 class WebPluginResourceClient; | 31 class WebPluginResourceClient; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // windowless plugins. | 66 // windowless plugins. |
| 67 virtual void Paint(SkCanvas* canvas, const gfx::Rect& rect) = 0; | 67 virtual void Paint(SkCanvas* canvas, const gfx::Rect& rect) = 0; |
| 68 | 68 |
| 69 // Informs the plugin that it has gained or lost focus. This is only called in | 69 // Informs the plugin that it has gained or lost focus. This is only called in |
| 70 // windowless mode. | 70 // windowless mode. |
| 71 virtual void SetFocus(bool focused) = 0; | 71 virtual void SetFocus(bool focused) = 0; |
| 72 | 72 |
| 73 // For windowless plugins, gives them a user event like mouse/keyboard. | 73 // For windowless plugins, gives them a user event like mouse/keyboard. |
| 74 // Returns whether the event was handled. This is only called in windowsless | 74 // Returns whether the event was handled. This is only called in windowsless |
| 75 // mode. See NPAPI NPP_HandleEvent for more information. | 75 // mode. See NPAPI NPP_HandleEvent for more information. |
| 76 virtual bool HandleInputEvent(const WebKit::WebInputEvent& event, | 76 virtual bool HandleInputEvent(const blink::WebInputEvent& event, |
| 77 WebCursor::CursorInfo* cursor) = 0; | 77 WebCursor::CursorInfo* cursor) = 0; |
| 78 | 78 |
| 79 // Gets the NPObject associated with the plugin for scripting. | 79 // Gets the NPObject associated with the plugin for scripting. |
| 80 virtual NPObject* GetPluginScriptableObject() = 0; | 80 virtual NPObject* GetPluginScriptableObject() = 0; |
| 81 | 81 |
| 82 // Gets the NPP instance uniquely identifying the plugin for its lifetime. | 82 // Gets the NPP instance uniquely identifying the plugin for its lifetime. |
| 83 virtual struct _NPP* GetPluginNPP() = 0; | 83 virtual struct _NPP* GetPluginNPP() = 0; |
| 84 | 84 |
| 85 // Gets the form value associated with the plugin instance. | 85 // Gets the form value associated with the plugin instance. |
| 86 // Returns false if the value is not available. | 86 // Returns false if the value is not available. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 bool notify_redirects, | 142 bool notify_redirects, |
| 143 bool is_plugin_src_load, | 143 bool is_plugin_src_load, |
| 144 int origin_pid, | 144 int origin_pid, |
| 145 int render_view_id) = 0; | 145 int render_view_id) = 0; |
| 146 | 146 |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 } // namespace content | 149 } // namespace content |
| 150 | 150 |
| 151 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ | 151 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ |
| OLD | NEW |