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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 // Indicates whether there are any Javascript listeners attached to a | 64 // Indicates whether there are any Javascript listeners attached to a |
65 // provided event_name. | 65 // provided event_name. |
66 bool HasListeners(const std::string& event_name); | 66 bool HasListeners(const std::string& event_name); |
67 // Add a custom event listener to this BrowserPlugin instance. | 67 // Add a custom event listener to this BrowserPlugin instance. |
68 bool AddEventListener(const std::string& event_name, | 68 bool AddEventListener(const std::string& event_name, |
69 v8::Local<v8::Function> function); | 69 v8::Local<v8::Function> function); |
70 // Remove a custom event listener from this BrowserPlugin instance. | 70 // Remove a custom event listener from this BrowserPlugin instance. |
71 bool RemoveEventListener(const std::string& event_name, | 71 bool RemoveEventListener(const std::string& event_name, |
72 v8::Local<v8::Function> function); | 72 v8::Local<v8::Function> function); |
| 73 // Tells the BrowserPlugin to tell the guest to navigate to the previous |
| 74 // navigation entry in the navigation history. |
| 75 void Back(); |
| 76 // Tells the BrowserPlugin to tell the guest to navigate to the next |
| 77 // navigation entry in the navigation history. |
| 78 void Forward(); |
| 79 // Tells the BrowserPlugin to tell the guest to navigate to a position |
| 80 // relative to the current index in its navigation history. |
| 81 void Go(int relativeIndex); |
73 | 82 |
74 // A request from Javascript has been made to stop the loading of the page. | 83 // A request from Javascript has been made to stop the loading of the page. |
75 void Stop(); | 84 void Stop(); |
76 // A request from Javascript has been made to reload the page. | 85 // A request from Javascript has been made to reload the page. |
77 void Reload(); | 86 void Reload(); |
78 | 87 |
79 // WebKit::WebPlugin implementation. | 88 // WebKit::WebPlugin implementation. |
80 virtual WebKit::WebPluginContainer* container() const OVERRIDE; | 89 virtual WebKit::WebPluginContainer* container() const OVERRIDE; |
81 virtual bool initialize(WebKit::WebPluginContainer* container) OVERRIDE; | 90 virtual bool initialize(WebKit::WebPluginContainer* container) OVERRIDE; |
82 virtual void destroy() OVERRIDE; | 91 virtual void destroy() OVERRIDE; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 EventListenerMap event_listener_map_; | 176 EventListenerMap event_listener_map_; |
168 #if defined(OS_WIN) | 177 #if defined(OS_WIN) |
169 base::SharedMemory shared_memory_; | 178 base::SharedMemory shared_memory_; |
170 #endif | 179 #endif |
171 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 180 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
172 }; | 181 }; |
173 | 182 |
174 } // namespace content | 183 } // namespace content |
175 | 184 |
176 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 185 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
OLD | NEW |