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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 60 |
| 61 // A request from javascript has been made to stop the loading of the page. |
| 62 void Stop(); |
| 63 // A request from javascript has been made to reload the page. |
| 64 void Reload(); |
| 65 |
61 // WebKit::WebPlugin implementation. | 66 // WebKit::WebPlugin implementation. |
62 virtual WebKit::WebPluginContainer* container() const OVERRIDE; | 67 virtual WebKit::WebPluginContainer* container() const OVERRIDE; |
63 virtual bool initialize(WebKit::WebPluginContainer* container) OVERRIDE; | 68 virtual bool initialize(WebKit::WebPluginContainer* container) OVERRIDE; |
64 virtual void destroy() OVERRIDE; | 69 virtual void destroy() OVERRIDE; |
65 virtual NPObject* scriptableObject() OVERRIDE; | 70 virtual NPObject* scriptableObject() OVERRIDE; |
66 virtual bool supportsKeyboardFocus() const OVERRIDE; | 71 virtual bool supportsKeyboardFocus() const OVERRIDE; |
67 virtual void paint( | 72 virtual void paint( |
68 WebKit::WebCanvas* canvas, | 73 WebKit::WebCanvas* canvas, |
69 const WebKit::WebRect& rect) OVERRIDE; | 74 const WebKit::WebRect& rect) OVERRIDE; |
70 virtual void updateGeometry( | 75 virtual void updateGeometry( |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 EventListenerMap event_listener_map_; | 153 EventListenerMap event_listener_map_; |
149 #if defined(OS_WIN) | 154 #if defined(OS_WIN) |
150 base::SharedMemory shared_memory_; | 155 base::SharedMemory shared_memory_; |
151 #endif | 156 #endif |
152 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 157 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
153 }; | 158 }; |
154 | 159 |
155 } // namespace content | 160 } // namespace content |
156 | 161 |
157 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 162 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
OLD | NEW |