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 #include "content/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 return delegate_; | 201 return delegate_; |
202 } | 202 } |
203 | 203 |
204 content::SiteInstance* RenderViewHostImpl::GetSiteInstance() const { | 204 content::SiteInstance* RenderViewHostImpl::GetSiteInstance() const { |
205 return instance_; | 205 return instance_; |
206 } | 206 } |
207 | 207 |
208 bool RenderViewHostImpl::CreateRenderView(const string16& frame_name, | 208 bool RenderViewHostImpl::CreateRenderView(const string16& frame_name, |
209 int opener_route_id, | 209 int opener_route_id, |
210 int32 max_page_id, | 210 int32 max_page_id, |
211 int embedder_process_id) { | 211 int embedder_process_id, |
| 212 int embedder_container_id) { |
212 DCHECK(!IsRenderViewLive()) << "Creating view twice"; | 213 DCHECK(!IsRenderViewLive()) << "Creating view twice"; |
213 | 214 |
214 // The process may (if we're sharing a process with another host that already | 215 // The process may (if we're sharing a process with another host that already |
215 // initialized it) or may not (we have our own process or the old process | 216 // initialized it) or may not (we have our own process or the old process |
216 // crashed) have been initialized. Calling Init multiple times will be | 217 // crashed) have been initialized. Calling Init multiple times will be |
217 // ignored, so this is safe. | 218 // ignored, so this is safe. |
218 if (!GetProcess()->Init()) | 219 if (!GetProcess()->Init()) |
219 return false; | 220 return false; |
220 DCHECK(GetProcess()->HasConnection()); | 221 DCHECK(GetProcess()->HasConnection()); |
221 DCHECK(GetProcess()->GetBrowserContext()); | 222 DCHECK(GetProcess()->GetBrowserContext()); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 #else | 256 #else |
256 params.screen_info = | 257 params.screen_info = |
257 WebKit::WebScreenInfoFactory::screenInfo( | 258 WebKit::WebScreenInfoFactory::screenInfo( |
258 gfx::NativeViewFromId(GetNativeViewId())); | 259 gfx::NativeViewFromId(GetNativeViewId())); |
259 #endif | 260 #endif |
260 | 261 |
261 if (embedder_process_id != -1) { | 262 if (embedder_process_id != -1) { |
262 params.embedder_channel_name = | 263 params.embedder_channel_name = |
263 StringPrintf("%d.r%d", GetProcess()->GetID(), embedder_process_id); | 264 StringPrintf("%d.r%d", GetProcess()->GetID(), embedder_process_id); |
264 } | 265 } |
265 | 266 params.embedder_container_id = embedder_container_id; |
266 params.accessibility_mode = | 267 params.accessibility_mode = |
267 BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser() ? | 268 BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser() ? |
268 AccessibilityModeComplete : | 269 AccessibilityModeComplete : |
269 AccessibilityModeOff; | 270 AccessibilityModeOff; |
270 | 271 |
271 #if defined(OS_WIN) | 272 #if defined(OS_WIN) |
272 // On Windows 8, always enable accessibility for editable text controls | 273 // On Windows 8, always enable accessibility for editable text controls |
273 // so we can show the virtual keyboard when one is enabled. | 274 // so we can show the virtual keyboard when one is enabled. |
274 if (base::win::GetVersion() >= base::win::VERSION_WIN8 && | 275 if (base::win::GetVersion() >= base::win::VERSION_WIN8 && |
275 params.accessibility_mode == AccessibilityModeOff) { | 276 params.accessibility_mode == AccessibilityModeOff) { |
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1841 // can cause navigations to be ignored in OnMsgNavigate. | 1842 // can cause navigations to be ignored in OnMsgNavigate. |
1842 is_waiting_for_beforeunload_ack_ = false; | 1843 is_waiting_for_beforeunload_ack_ = false; |
1843 is_waiting_for_unload_ack_ = false; | 1844 is_waiting_for_unload_ack_ = false; |
1844 } | 1845 } |
1845 | 1846 |
1846 void RenderViewHostImpl::ClearPowerSaveBlockers() { | 1847 void RenderViewHostImpl::ClearPowerSaveBlockers() { |
1847 STLDeleteValues(&power_save_blockers_); | 1848 STLDeleteValues(&power_save_blockers_); |
1848 } | 1849 } |
1849 | 1850 |
1850 } // namespace content | 1851 } // namespace content |
OLD | NEW |