| 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; | |
| 19 | |
| 20 namespace blink { | 18 namespace blink { |
| 21 class WebElement; | 19 class WebElement; |
| 22 class WebFrame; | 20 class WebFrame; |
| 23 class WebLocalFrame; | 21 class WebLocalFrame; |
| 24 class WebNode; | 22 class WebNode; |
| 25 class WebString; | 23 class WebString; |
| 26 class WebURLRequest; | 24 class WebURLRequest; |
| 27 class WebView; | 25 class WebView; |
| 28 struct WebContextMenuData; | 26 struct WebContextMenuData; |
| 29 } | 27 } |
| 30 | 28 |
| 31 namespace gfx { | 29 namespace gfx { |
| 32 class Size; | 30 class Size; |
| 33 } | 31 } |
| 34 | 32 |
| 35 namespace content { | 33 namespace content { |
| 36 | 34 |
| 37 class RenderFrame; | 35 class RenderFrame; |
| 38 class RenderViewVisitor; | 36 class RenderViewVisitor; |
| 39 struct SSLStatus; | 37 struct SSLStatus; |
| 38 struct WebPreferences; |
| 40 | 39 |
| 41 class CONTENT_EXPORT RenderView : public IPC::Sender { | 40 class CONTENT_EXPORT RenderView : public IPC::Sender { |
| 42 public: | 41 public: |
| 43 // Returns the RenderView containing the given WebView. | 42 // Returns the RenderView containing the given WebView. |
| 44 static RenderView* FromWebView(blink::WebView* webview); | 43 static RenderView* FromWebView(blink::WebView* webview); |
| 45 | 44 |
| 46 // Returns the RenderView for the given routing ID. | 45 // Returns the RenderView for the given routing ID. |
| 47 static RenderView* FromRoutingID(int routing_id); | 46 static RenderView* FromRoutingID(int routing_id); |
| 48 | 47 |
| 49 // Visit all RenderViews with a live WebView (i.e., RenderViews that have | 48 // Visit all RenderViews with a live WebView (i.e., RenderViews that have |
| (...skipping 17 matching lines...) Expand all Loading... |
| 67 // Returns the size of the view. | 66 // Returns the size of the view. |
| 68 virtual gfx::Size GetSize() const = 0; | 67 virtual gfx::Size GetSize() const = 0; |
| 69 | 68 |
| 70 // Gets WebKit related preferences associated with this view. | 69 // Gets WebKit related preferences associated with this view. |
| 71 virtual WebPreferences& GetWebkitPreferences() = 0; | 70 virtual WebPreferences& GetWebkitPreferences() = 0; |
| 72 | 71 |
| 73 // Overrides the WebKit related preferences associated with this view. Note | 72 // Overrides the WebKit related preferences associated with this view. Note |
| 74 // that the browser process may update the preferences at any time. | 73 // that the browser process may update the preferences at any time. |
| 75 virtual void SetWebkitPreferences(const WebPreferences& preferences) = 0; | 74 virtual void SetWebkitPreferences(const WebPreferences& preferences) = 0; |
| 76 | 75 |
| 76 // Applies WebKit related preferences to this view. |
| 77 virtual void ApplyWebPreferences(const WebPreferences& preferences) = 0; |
| 78 |
| 77 // Returns the associated WebView. May return NULL when the view is closing. | 79 // Returns the associated WebView. May return NULL when the view is closing. |
| 78 virtual blink::WebView* GetWebView() = 0; | 80 virtual blink::WebView* GetWebView() = 0; |
| 79 | 81 |
| 80 // Gets the focused element. If no such element exists then | 82 // Gets the focused element. If no such element exists then |
| 81 // the element will be Null. | 83 // the element will be Null. |
| 82 virtual blink::WebElement GetFocusedElement() const = 0; | 84 virtual blink::WebElement GetFocusedElement() 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; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 134 |
| 133 private: | 135 private: |
| 134 // This interface should only be implemented inside content. | 136 // This interface should only be implemented inside content. |
| 135 friend class RenderViewImpl; | 137 friend class RenderViewImpl; |
| 136 RenderView() {} | 138 RenderView() {} |
| 137 }; | 139 }; |
| 138 | 140 |
| 139 } // namespace content | 141 } // namespace content |
| 140 | 142 |
| 141 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ | 143 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
| OLD | NEW |