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 |
50 // been closed but not yet destroyed are excluded). | 49 // been closed but not yet destroyed are excluded). |
51 static void ForEach(RenderViewVisitor* visitor); | 50 static void ForEach(RenderViewVisitor* visitor); |
52 | 51 |
| 52 // Applies WebKit related preferences to this view. |
| 53 static void ApplyWebPreferences(const WebPreferences& preferences, |
| 54 blink::WebView* web_view); |
| 55 |
53 // Returns the main RenderFrame. | 56 // Returns the main RenderFrame. |
54 virtual RenderFrame* GetMainRenderFrame() = 0; | 57 virtual RenderFrame* GetMainRenderFrame() = 0; |
55 | 58 |
56 // Get the routing ID of the view. | 59 // Get the routing ID of the view. |
57 virtual int GetRoutingID() const = 0; | 60 virtual int GetRoutingID() const = 0; |
58 | 61 |
59 // Page IDs allow the browser to identify pages in each renderer process for | 62 // Page IDs allow the browser to identify pages in each renderer process for |
60 // keeping back/forward history in sync. | 63 // keeping back/forward history in sync. |
61 // Note that this is NOT updated for every main frame navigation, only for | 64 // Note that this is NOT updated for every main frame navigation, only for |
62 // "regular" navigations that go into session history. In particular, client | 65 // "regular" navigations that go into session history. In particular, client |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 135 |
133 private: | 136 private: |
134 // This interface should only be implemented inside content. | 137 // This interface should only be implemented inside content. |
135 friend class RenderViewImpl; | 138 friend class RenderViewImpl; |
136 RenderView() {} | 139 RenderView() {} |
137 }; | 140 }; |
138 | 141 |
139 } // namespace content | 142 } // namespace content |
140 | 143 |
141 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ | 144 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
OLD | NEW |