OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
Charlie Reis
2013/02/28 02:12:03
2013 for new files.
Fady Samuel
2013/02/28 22:56:21
Done.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | |
6 #define CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | |
7 | |
8 #include <map> | |
9 #include <string> | |
10 | |
11 #include "content/common/content_export.h" | |
12 #include "content/public/renderer/render_view.h" | |
13 #include "ipc/ipc_sender.h" | |
14 | |
15 namespace base { | |
16 class Value; | |
17 } // namespace base | |
18 | |
19 namespace WebKit { | |
20 class WebPluginContainer; | |
21 } // namespace WebKit | |
22 | |
23 namespace content { | |
24 | |
25 class BrowserPluginMethodBinding; | |
26 class BrowserPluginPropertyBinding; | |
27 | |
28 class CONTENT_EXPORT BrowserPlugin : public IPC::Sender { | |
Charlie Reis
2013/02/28 02:12:03
Please add class-level documentation for this conc
Fady Samuel
2013/02/28 22:56:21
Done.
| |
29 public: | |
30 virtual ~BrowserPlugin() {} | |
31 | |
32 // Adds a method binding to the BrowserPlugin. The BrowserPlugin takes | |
33 // ownership of the method binding. The method binding will be destroyed when | |
34 // the BrowserPlugin is destroyed, prior to cleaning up any | |
35 // BrowserPluginObservers. | |
36 virtual void AddMethodBinding(BrowserPluginMethodBinding* method_binding) = 0; | |
37 | |
38 // Adds a property binding to the BrowserPlugin. The BrowserPlugin takes | |
39 // ownership of the property binding. The binding will be destroyed when | |
40 // the BrowserPlugin is destroyed, prior to cleaning up any | |
41 // BrowserPluginObservers. | |
42 virtual void AddPropertyBinding( | |
43 BrowserPluginPropertyBinding* property_binding) = 0; | |
44 | |
45 // Returns the embedding RenderView of the BrowserPlugin. | |
46 virtual RenderView* GetRenderView() const = 0; | |
Charlie Reis
2013/02/28 02:12:03
GetRenderView and GetContainer seem like a differe
Fady Samuel
2013/02/28 22:56:21
Done.
| |
47 | |
48 // Returns the container of the BrowserPlugin. | |
49 virtual WebKit::WebPluginContainer* GetContainer() const = 0; | |
50 | |
51 // Triggers the event-listeners for |event_name|. Note that the function | |
52 // frees all the values in |props|. | |
53 virtual void TriggerEvent( | |
54 const std::string& event_name, | |
55 std::map<std::string, base::Value*>* props) = 0; | |
56 | |
57 // Updates the DOM attribute called |attribute_name| with the value | |
58 // |attribute_value|. | |
59 virtual void UpdateDOMAttribute(const std::string& attribute_name, | |
60 const std::string& attribue_value) = 0; | |
61 | |
62 // Removes the attribute |attribute_name| from the BrowserPlugin object. | |
63 virtual void RemoveDOMAttribute(const std::string& attribute_name) = 0; | |
64 | |
65 // Gets Browser Plugin's DOM Node attribute |attribute_name|'s value. | |
66 virtual std::string GetDOMAttributeValue( | |
67 const std::string& attribute_name) const = 0; | |
68 | |
69 // Checks if the attribute |attribute_name| exists in the DOM. | |
70 virtual bool HasDOMAttribute(const std::string& attribute_name) const = 0; | |
71 | |
72 // Indicates whether the BrowserPlugin has navigated within its lifetime. | |
73 virtual bool HasNavigated() const = 0; | |
74 }; | |
75 | |
76 } // namespace content | |
77 | |
78 #endif // CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | |
OLD | NEW |