OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PUBLIC_RENDERER_BROWSER_PLUGIN_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "ipc/ipc_message.h" | |
12 | 11 |
13 namespace gfx { | 12 namespace gfx { |
14 class Size; | 13 class Size; |
15 } | 14 } |
16 | 15 |
17 namespace v8 { | 16 namespace v8 { |
18 class Isolate; | 17 class Isolate; |
19 class Object; | 18 class Object; |
20 template<typename T> class Local; | 19 template<typename T> class Local; |
21 } // namespace v8 | 20 } // namespace v8 |
(...skipping 19 matching lines...) Expand all Loading... |
41 // Called when plugin document receives data. | 40 // Called when plugin document receives data. |
42 virtual void DidReceiveData(const char* data, int data_length) {} | 41 virtual void DidReceiveData(const char* data, int data_length) {} |
43 | 42 |
44 // Sets the instance ID that idenfies the plugin within current render | 43 // Sets the instance ID that idenfies the plugin within current render |
45 // process. | 44 // process. |
46 virtual void SetElementInstanceID(int element_instance_id) {} | 45 virtual void SetElementInstanceID(int element_instance_id) {} |
47 | 46 |
48 // Called when the plugin resizes. | 47 // Called when the plugin resizes. |
49 virtual void DidResizeElement(const gfx::Size& new_size) {} | 48 virtual void DidResizeElement(const gfx::Size& new_size) {} |
50 | 49 |
51 // Called when a message is received. Returns true iff the message was | |
52 // handled. | |
53 virtual bool OnMessageReceived(const IPC::Message& message); | |
54 | |
55 // Return a scriptable object for the plugin. | 50 // Return a scriptable object for the plugin. |
56 virtual v8::Local<v8::Object> V8ScriptableObject(v8::Isolate* isolate); | 51 virtual v8::Local<v8::Object> V8ScriptableObject(v8::Isolate* isolate); |
57 }; | 52 }; |
58 | 53 |
59 } // namespace content | 54 } // namespace content |
60 | 55 |
61 #endif // CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_DELEGATE_H_ | 56 #endif // CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_DELEGATE_H_ |
OLD | NEW |