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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 // Indicates whether there are any Javascript listeners attached to a | 51 // Indicates whether there are any Javascript listeners attached to a |
52 // provided event_name. | 52 // provided event_name. |
53 bool HasListeners(const std::string& event_name); | 53 bool HasListeners(const std::string& event_name); |
54 // Add a custom event listener to this BrowserPlugin instance. | 54 // Add a custom event listener to this BrowserPlugin instance. |
55 bool AddEventListener(const std::string& event_name, | 55 bool AddEventListener(const std::string& event_name, |
56 v8::Local<v8::Function> function); | 56 v8::Local<v8::Function> function); |
57 // Remove a custom event listener from this BrowserPlugin instance. | 57 // Remove a custom event listener from this BrowserPlugin instance. |
58 bool RemoveEventListener(const std::string& event_name, | 58 bool RemoveEventListener(const std::string& event_name, |
59 v8::Local<v8::Function> function); | 59 v8::Local<v8::Function> function); |
| 60 // Tells the BrowserPlugin to tell the guest to navigate to the previous |
| 61 // navigation entry in the navigation history. |
| 62 void Back(); |
| 63 // Tells the BrowserPlugin to tell the guest to navigate to the next |
| 64 // navigation entry in the navigation history. |
| 65 void Forward(); |
| 66 // Tells the BrowserPlugin to tell the guest to navigate to a position |
| 67 // relative to the current index in its navigation history. |
| 68 void Go(int relativeIndex); |
60 | 69 |
61 // WebKit::WebPlugin implementation. | 70 // WebKit::WebPlugin implementation. |
62 virtual WebKit::WebPluginContainer* container() const OVERRIDE; | 71 virtual WebKit::WebPluginContainer* container() const OVERRIDE; |
63 virtual bool initialize(WebKit::WebPluginContainer* container) OVERRIDE; | 72 virtual bool initialize(WebKit::WebPluginContainer* container) OVERRIDE; |
64 virtual void destroy() OVERRIDE; | 73 virtual void destroy() OVERRIDE; |
65 virtual NPObject* scriptableObject() OVERRIDE; | 74 virtual NPObject* scriptableObject() OVERRIDE; |
66 virtual bool supportsKeyboardFocus() const OVERRIDE; | 75 virtual bool supportsKeyboardFocus() const OVERRIDE; |
67 virtual void paint( | 76 virtual void paint( |
68 WebKit::WebCanvas* canvas, | 77 WebKit::WebCanvas* canvas, |
69 const WebKit::WebRect& rect) OVERRIDE; | 78 const WebKit::WebRect& rect) OVERRIDE; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 EventListenerMap event_listener_map_; | 157 EventListenerMap event_listener_map_; |
149 #if defined(OS_WIN) | 158 #if defined(OS_WIN) |
150 base::SharedMemory shared_memory_; | 159 base::SharedMemory shared_memory_; |
151 #endif | 160 #endif |
152 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 161 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
153 }; | 162 }; |
154 | 163 |
155 } // namespace content | 164 } // namespace content |
156 | 165 |
157 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 166 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
OLD | NEW |