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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 | 267 |
268 RenderViewHostDelegate* RenderViewHostImpl::GetDelegate() const { | 268 RenderViewHostDelegate* RenderViewHostImpl::GetDelegate() const { |
269 return delegate_; | 269 return delegate_; |
270 } | 270 } |
271 | 271 |
272 SiteInstanceImpl* RenderViewHostImpl::GetSiteInstance() const { | 272 SiteInstanceImpl* RenderViewHostImpl::GetSiteInstance() const { |
273 return instance_.get(); | 273 return instance_.get(); |
274 } | 274 } |
275 | 275 |
276 bool RenderViewHostImpl::CreateRenderView( | 276 bool RenderViewHostImpl::CreateRenderView( |
277 int opener_route_id, | 277 int opener_frame_route_id, |
278 int proxy_route_id, | 278 int proxy_route_id, |
279 int32 max_page_id, | 279 int32 max_page_id, |
280 const FrameReplicationState& replicated_frame_state, | 280 const FrameReplicationState& replicated_frame_state, |
281 bool window_was_created_with_opener) { | 281 bool window_was_created_with_opener) { |
282 TRACE_EVENT0("renderer_host,navigation", | 282 TRACE_EVENT0("renderer_host,navigation", |
283 "RenderViewHostImpl::CreateRenderView"); | 283 "RenderViewHostImpl::CreateRenderView"); |
284 DCHECK(!IsRenderViewLive()) << "Creating view twice"; | 284 DCHECK(!IsRenderViewLive()) << "Creating view twice"; |
285 | 285 |
286 // The process may (if we're sharing a process with another host that already | 286 // The process may (if we're sharing a process with another host that already |
287 // initialized it) or may not (we have our own process or the old process | 287 // initialized it) or may not (we have our own process or the old process |
(...skipping 21 matching lines...) Expand all Loading... |
309 #if defined(OS_WIN) | 309 #if defined(OS_WIN) |
310 GetWindowsSpecificPrefs(¶ms.renderer_preferences); | 310 GetWindowsSpecificPrefs(¶ms.renderer_preferences); |
311 #endif | 311 #endif |
312 params.web_preferences = GetWebkitPreferences(); | 312 params.web_preferences = GetWebkitPreferences(); |
313 params.view_id = GetRoutingID(); | 313 params.view_id = GetRoutingID(); |
314 params.main_frame_routing_id = main_frame_routing_id_; | 314 params.main_frame_routing_id = main_frame_routing_id_; |
315 params.surface_id = surface_id(); | 315 params.surface_id = surface_id(); |
316 params.session_storage_namespace_id = | 316 params.session_storage_namespace_id = |
317 delegate_->GetSessionStorageNamespace(instance_.get())->id(); | 317 delegate_->GetSessionStorageNamespace(instance_.get())->id(); |
318 // Ensure the RenderView sets its opener correctly. | 318 // Ensure the RenderView sets its opener correctly. |
319 params.opener_route_id = opener_route_id; | 319 params.opener_frame_route_id = opener_frame_route_id; |
320 params.swapped_out = !is_active_; | 320 params.swapped_out = !is_active_; |
321 params.replicated_frame_state = replicated_frame_state; | 321 params.replicated_frame_state = replicated_frame_state; |
322 params.proxy_routing_id = proxy_route_id; | 322 params.proxy_routing_id = proxy_route_id; |
323 params.hidden = is_hidden(); | 323 params.hidden = is_hidden(); |
324 params.never_visible = delegate_->IsNeverVisible(); | 324 params.never_visible = delegate_->IsNeverVisible(); |
325 params.window_was_created_with_opener = window_was_created_with_opener; | 325 params.window_was_created_with_opener = window_was_created_with_opener; |
326 params.next_page_id = next_page_id; | 326 params.next_page_id = next_page_id; |
327 params.enable_auto_resize = auto_resize_enabled(); | 327 params.enable_auto_resize = auto_resize_enabled(); |
328 params.min_size = min_size_for_auto_resize(); | 328 params.min_size = min_size_for_auto_resize(); |
329 params.max_size = max_size_for_auto_resize(); | 329 params.max_size = max_size_for_auto_resize(); |
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 if (!policy->CanReadFile(GetProcess()->GetID(), file)) | 1428 if (!policy->CanReadFile(GetProcess()->GetID(), file)) |
1429 policy->GrantReadFile(GetProcess()->GetID(), file); | 1429 policy->GrantReadFile(GetProcess()->GetID(), file); |
1430 } | 1430 } |
1431 } | 1431 } |
1432 | 1432 |
1433 void RenderViewHostImpl::SelectWordAroundCaret() { | 1433 void RenderViewHostImpl::SelectWordAroundCaret() { |
1434 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1434 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
1435 } | 1435 } |
1436 | 1436 |
1437 } // namespace content | 1437 } // namespace content |
OLD | NEW |