OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 class Profile; | 22 class Profile; |
23 class RenderProcessHost; | 23 class RenderProcessHost; |
24 class RenderViewHost; | 24 class RenderViewHost; |
25 class RenderViewHostDelegate; | 25 class RenderViewHostDelegate; |
26 class RenderWidgetHost; | 26 class RenderWidgetHost; |
27 class RenderWidgetHostView; | 27 class RenderWidgetHostView; |
28 class SiteInstance; | 28 class SiteInstance; |
29 class TabContents; | 29 class TabContents; |
30 struct ViewHostMsg_CreateWindow_Params; | 30 struct ViewHostMsg_CreateWindow_Params; |
31 | 31 |
| 32 namespace content { |
| 33 class BrowserContext; |
| 34 } |
| 35 |
32 // Provides helper methods that provide common implementations of some | 36 // Provides helper methods that provide common implementations of some |
33 // RenderViewHostDelegate::View methods. | 37 // RenderViewHostDelegate::View methods. |
34 class RenderViewHostDelegateViewHelper : public NotificationObserver { | 38 class RenderViewHostDelegateViewHelper : public NotificationObserver { |
35 public: | 39 public: |
36 RenderViewHostDelegateViewHelper(); | 40 RenderViewHostDelegateViewHelper(); |
37 virtual ~RenderViewHostDelegateViewHelper(); | 41 virtual ~RenderViewHostDelegateViewHelper(); |
38 | 42 |
39 // Creates a new renderer for window.open. This will either be a | 43 // Creates a new renderer for window.open. This will either be a |
40 // BackgroundContents (if the window_container_type == | 44 // BackgroundContents (if the window_container_type == |
41 // WINDOW_CONTAINER_TYPE_BACKGROUND and permissions allow) or a TabContents. | 45 // WINDOW_CONTAINER_TYPE_BACKGROUND and permissions allow) or a TabContents. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 NotificationRegistrar registrar_; | 118 NotificationRegistrar registrar_; |
115 | 119 |
116 DISALLOW_COPY_AND_ASSIGN(RenderViewHostDelegateViewHelper); | 120 DISALLOW_COPY_AND_ASSIGN(RenderViewHostDelegateViewHelper); |
117 }; | 121 }; |
118 | 122 |
119 | 123 |
120 // Provides helper methods that provide common implementations of some | 124 // Provides helper methods that provide common implementations of some |
121 // RenderViewHostDelegate methods. | 125 // RenderViewHostDelegate methods. |
122 class RenderViewHostDelegateHelper { | 126 class RenderViewHostDelegateHelper { |
123 public: | 127 public: |
124 static WebPreferences GetWebkitPrefs(Profile* profile, bool is_web_ui); | 128 static WebPreferences GetWebkitPrefs(content::BrowserContext* browser_context, |
| 129 bool is_web_ui); |
125 | 130 |
126 static void UpdateInspectorSetting(Profile* profile, | 131 static void UpdateInspectorSetting(content::BrowserContext* browser_context, |
127 const std::string& key, | 132 const std::string& key, |
128 const std::string& value); | 133 const std::string& value); |
129 static void ClearInspectorSettings(Profile* profile); | 134 static void ClearInspectorSettings(content::BrowserContext* browser_context); |
130 | 135 |
131 private: | 136 private: |
132 RenderViewHostDelegateHelper(); | 137 RenderViewHostDelegateHelper(); |
133 | 138 |
134 DISALLOW_COPY_AND_ASSIGN(RenderViewHostDelegateHelper); | 139 DISALLOW_COPY_AND_ASSIGN(RenderViewHostDelegateHelper); |
135 }; | 140 }; |
136 | 141 |
137 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_ | 142 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_ |
OLD | NEW |