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_PUBLIC_RENDERER_RENDER_VIEW_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/public/common/top_controls_state.h" | 13 #include "content/public/common/top_controls_state.h" |
14 #include "ipc/ipc_sender.h" | 14 #include "ipc/ipc_sender.h" |
15 #include "third_party/WebKit/public/web/WebPageVisibilityState.h" | 15 #include "third_party/WebKit/public/web/WebPageVisibilityState.h" |
16 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
17 | 17 |
18 struct WebPreferences; | 18 struct WebPreferences; |
19 | 19 |
20 namespace blink { | 20 namespace blink { |
| 21 class WebElement; |
21 class WebFrame; | 22 class WebFrame; |
22 class WebNode; | 23 class WebNode; |
23 class WebString; | 24 class WebString; |
24 class WebURLRequest; | 25 class WebURLRequest; |
25 class WebView; | 26 class WebView; |
26 struct WebContextMenuData; | 27 struct WebContextMenuData; |
27 } | 28 } |
28 | 29 |
29 namespace gfx { | 30 namespace gfx { |
30 class Size; | 31 class Size; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // Gets WebKit related preferences associated with this view. | 69 // Gets WebKit related preferences associated with this view. |
69 virtual WebPreferences& GetWebkitPreferences() = 0; | 70 virtual WebPreferences& GetWebkitPreferences() = 0; |
70 | 71 |
71 // Overrides the WebKit related preferences associated with this view. Note | 72 // Overrides the WebKit related preferences associated with this view. Note |
72 // that the browser process may update the preferences at any time. | 73 // that the browser process may update the preferences at any time. |
73 virtual void SetWebkitPreferences(const WebPreferences& preferences) = 0; | 74 virtual void SetWebkitPreferences(const WebPreferences& preferences) = 0; |
74 | 75 |
75 // Returns the associated WebView. May return NULL when the view is closing. | 76 // Returns the associated WebView. May return NULL when the view is closing. |
76 virtual blink::WebView* GetWebView() = 0; | 77 virtual blink::WebView* GetWebView() = 0; |
77 | 78 |
78 // Gets the focused node. If no such node exists then the node will be isNull. | 79 // Gets the focused element. If no such element exists then |
79 virtual blink::WebNode GetFocusedNode() const = 0; | 80 // the element will be Null. |
| 81 virtual blink::WebElement GetFocusedElement() const = 0; |
80 | 82 |
81 // Gets the node that the context menu was pressed over. | 83 // Gets the node that the context menu was pressed over. |
82 virtual blink::WebNode GetContextMenuNode() const = 0; | 84 virtual blink::WebNode GetContextMenuNode() const = 0; |
83 | 85 |
84 // Returns true if the parameter node is a textfield, text area, a content | 86 // Returns true if the parameter node is a textfield, text area, a content |
85 // editable div, or has an ARIA role of textbox. | 87 // editable div, or has an ARIA role of textbox. |
86 virtual bool IsEditableNode(const blink::WebNode& node) const = 0; | 88 virtual bool IsEditableNode(const blink::WebNode& node) const = 0; |
87 | 89 |
88 // Evaluates a string of JavaScript in a particular frame. | 90 // Evaluates a string of JavaScript in a particular frame. |
89 virtual void EvaluateScript(const base::string16& frame_xpath, | 91 virtual void EvaluateScript(const base::string16& frame_xpath, |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 148 |
147 private: | 149 private: |
148 // This interface should only be implemented inside content. | 150 // This interface should only be implemented inside content. |
149 friend class RenderViewImpl; | 151 friend class RenderViewImpl; |
150 RenderView() {} | 152 RenderView() {} |
151 }; | 153 }; |
152 | 154 |
153 } // namespace content | 155 } // namespace content |
154 | 156 |
155 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ | 157 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
OLD | NEW |