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_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/Source/WebKit/chromium/public/WebPlugin.h" | 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 // its damage buffer. | 40 // its damage buffer. |
41 void UpdateRect(int message_id, | 41 void UpdateRect(int message_id, |
42 const BrowserPluginMsg_UpdateRect_Params& params); | 42 const BrowserPluginMsg_UpdateRect_Params& params); |
43 // Inform the BrowserPlugin that its guest has crashed. | 43 // Inform the BrowserPlugin that its guest has crashed. |
44 void GuestCrashed(); | 44 void GuestCrashed(); |
45 // Informs the BrowserPlugin that the guest has navigated to a new URL. | 45 // Informs the BrowserPlugin that the guest has navigated to a new URL. |
46 void DidNavigate(const GURL& url); | 46 void DidNavigate(const GURL& url); |
47 // Tells the BrowserPlugin to advance the focus to the next (or previous) | 47 // Tells the BrowserPlugin to advance the focus to the next (or previous) |
48 // element. | 48 // element. |
49 void AdvanceFocus(bool reverse); | 49 void AdvanceFocus(bool reverse); |
| 50 // Tell the BrowserPlugin to post a message to its guest. |
| 51 void PostMessage(const string16& message, |
| 52 const string16& target_origin); |
| 53 // Inform the BrowserPlugin of a message posted from its guest. |
| 54 void ReceiveMessage(int source_routing_id, |
| 55 const string16& source_origin, |
| 56 const string16& data); |
50 | 57 |
51 // Indicates whether there are any Javascript listeners attached to a | 58 // Indicates whether there are any Javascript listeners attached to a |
52 // provided event_name. | 59 // provided event_name. |
53 bool HasListeners(const std::string& event_name); | 60 bool HasListeners(const std::string& event_name); |
54 // Add a custom event listener to this BrowserPlugin instance. | 61 // Add a custom event listener to this BrowserPlugin instance. |
55 bool AddEventListener(const std::string& event_name, | 62 bool AddEventListener(const std::string& event_name, |
56 v8::Local<v8::Function> function); | 63 v8::Local<v8::Function> function); |
57 // Remove a custom event listener from this BrowserPlugin instance. | 64 // Remove a custom event listener from this BrowserPlugin instance. |
58 bool RemoveEventListener(const std::string& event_name, | 65 bool RemoveEventListener(const std::string& event_name, |
59 v8::Local<v8::Function> function); | 66 v8::Local<v8::Function> function); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 EventListenerMap event_listener_map_; | 155 EventListenerMap event_listener_map_; |
149 #if defined(OS_WIN) | 156 #if defined(OS_WIN) |
150 base::SharedMemory shared_memory_; | 157 base::SharedMemory shared_memory_; |
151 #endif | 158 #endif |
152 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 159 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
153 }; | 160 }; |
154 | 161 |
155 } // namespace content | 162 } // namespace content |
156 | 163 |
157 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 164 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
OLD | NEW |