Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 1142123002: Remove swapped-out usage in --site-per-process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix DisownOpener. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 10 matching lines...) Expand all
21 #include "base/strings/utf_string_conversions.h" 21 #include "base/strings/utf_string_conversions.h"
22 #include "base/sys_info.h" 22 #include "base/sys_info.h"
23 #include "base/time/time.h" 23 #include "base/time/time.h"
24 #include "base/trace_event/trace_event.h" 24 #include "base/trace_event/trace_event.h"
25 #include "base/values.h" 25 #include "base/values.h"
26 #include "cc/base/switches.h" 26 #include "cc/base/switches.h"
27 #include "content/browser/bad_message.h" 27 #include "content/browser/bad_message.h"
28 #include "content/browser/child_process_security_policy_impl.h" 28 #include "content/browser/child_process_security_policy_impl.h"
29 #include "content/browser/dom_storage/session_storage_namespace_impl.h" 29 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
30 #include "content/browser/frame_host/frame_tree.h" 30 #include "content/browser/frame_host/frame_tree.h"
31 #include "content/browser/frame_host/render_frame_proxy_host.h"
31 #include "content/browser/gpu/compositor_util.h" 32 #include "content/browser/gpu/compositor_util.h"
32 #include "content/browser/gpu/gpu_data_manager_impl.h" 33 #include "content/browser/gpu/gpu_data_manager_impl.h"
33 #include "content/browser/gpu/gpu_process_host.h" 34 #include "content/browser/gpu/gpu_process_host.h"
34 #include "content/browser/gpu/gpu_surface_tracker.h" 35 #include "content/browser/gpu/gpu_surface_tracker.h"
35 #include "content/browser/host_zoom_map_impl.h" 36 #include "content/browser/host_zoom_map_impl.h"
36 #include "content/browser/loader/resource_dispatcher_host_impl.h" 37 #include "content/browser/loader/resource_dispatcher_host_impl.h"
37 #include "content/browser/renderer_host/dip_util.h" 38 #include "content/browser/renderer_host/dip_util.h"
38 #include "content/browser/renderer_host/media/audio_renderer_host.h" 39 #include "content/browser/renderer_host/media/audio_renderer_host.h"
39 #include "content/browser/renderer_host/render_process_host_impl.h" 40 #include "content/browser/renderer_host/render_process_host_impl.h"
40 #include "content/browser/renderer_host/render_view_host_delegate.h" 41 #include "content/browser/renderer_host/render_view_host_delegate.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 params.proxy_routing_id = proxy_route_id; 323 params.proxy_routing_id = proxy_route_id;
323 params.hidden = is_hidden(); 324 params.hidden = is_hidden();
324 params.never_visible = delegate_->IsNeverVisible(); 325 params.never_visible = delegate_->IsNeverVisible();
325 params.window_was_created_with_opener = window_was_created_with_opener; 326 params.window_was_created_with_opener = window_was_created_with_opener;
326 params.next_page_id = next_page_id; 327 params.next_page_id = next_page_id;
327 params.enable_auto_resize = auto_resize_enabled(); 328 params.enable_auto_resize = auto_resize_enabled();
328 params.min_size = min_size_for_auto_resize(); 329 params.min_size = min_size_for_auto_resize();
329 params.max_size = max_size_for_auto_resize(); 330 params.max_size = max_size_for_auto_resize();
330 GetResizeParams(&params.initial_size); 331 GetResizeParams(&params.initial_size);
331 if (!is_active_) { 332 if (!is_active_) {
332 params.replicated_frame_state = 333 if (main_frame_routing_id_ != MSG_ROUTING_NONE) {
333 static_cast<RenderFrameHostImpl*>(GetMainFrame())->frame_tree_node() 334 params.replicated_frame_state =
Charlie Reis 2015/06/04 00:02:11 Maybe we should just pass in the FrameReplicationS
nasko 2015/06/04 16:45:08 Done.
334 ->current_replication_state(); 335 static_cast<RenderFrameHostImpl*>(GetMainFrame())->frame_tree_node()
336 ->current_replication_state();
337 } else {
338 CHECK_NE(params.proxy_routing_id, MSG_ROUTING_NONE);
339 params.replicated_frame_state =
340 RenderFrameProxyHost::FromID(GetProcess()->GetID(), proxy_route_id)
341 ->frame_tree_node()->current_replication_state();
342 }
335 } 343 }
336 344
337 if (!Send(new ViewMsg_New(params))) 345 if (!Send(new ViewMsg_New(params)))
338 return false; 346 return false;
339 SetInitialRenderSizeParams(params.initial_size); 347 SetInitialRenderSizeParams(params.initial_size);
340 348
341 // If the RWHV has not yet been set, the surface ID namespace will get 349 // If the RWHV has not yet been set, the surface ID namespace will get
342 // passed down by the call to SetView(). 350 // passed down by the call to SetView().
343 if (view_) { 351 if (view_) {
344 Send(new ViewMsg_SetSurfaceIdNamespace(GetRoutingID(), 352 Send(new ViewMsg_SetSurfaceIdNamespace(GetRoutingID(),
345 view_->GetSurfaceIdNamespace())); 353 view_->GetSurfaceIdNamespace()));
346 } 354 }
347 355
348 // If it's enabled, tell the renderer to set up the Javascript bindings for 356 // If it's enabled, tell the renderer to set up the Javascript bindings for
349 // sending messages back to the browser. 357 // sending messages back to the browser.
350 if (GetProcess()->IsIsolatedGuest()) 358 if (GetProcess()->IsIsolatedGuest())
351 DCHECK_EQ(0, enabled_bindings_); 359 DCHECK_EQ(0, enabled_bindings_);
352 Send(new ViewMsg_AllowBindings(GetRoutingID(), enabled_bindings_)); 360 Send(new ViewMsg_AllowBindings(GetRoutingID(), enabled_bindings_));
353 // Let our delegate know that we created a RenderView. 361 // Let our delegate know that we created a RenderView.
354 delegate_->RenderViewCreated(this); 362 delegate_->RenderViewCreated(this);
355 363
356 // Since this method creates the main RenderFrame in the renderer process, 364 // Since this method creates the main RenderFrame in the renderer process,
Charlie Reis 2015/06/04 00:02:11 can create
nasko 2015/06/04 14:57:13 Done.
357 // set the proper state on its corresponding RenderFrameHost. 365 // set the proper state on its corresponding RenderFrameHost.
358 RenderFrameHostImpl::FromID(GetProcess()->GetID(), main_frame_routing_id_) 366 if (main_frame_routing_id_ != MSG_ROUTING_NONE) {
359 ->SetRenderFrameCreated(true); 367 RenderFrameHostImpl::FromID(GetProcess()->GetID(), main_frame_routing_id_)
368 ->SetRenderFrameCreated(true);
369 }
360 370
361 return true; 371 return true;
362 } 372 }
363 373
364 bool RenderViewHostImpl::IsRenderViewLive() const { 374 bool RenderViewHostImpl::IsRenderViewLive() const {
365 return GetProcess()->HasConnection() && renderer_initialized(); 375 return GetProcess()->HasConnection() && renderer_initialized();
366 } 376 }
367 377
368 void RenderViewHostImpl::SyncRendererPrefs() { 378 void RenderViewHostImpl::SyncRendererPrefs() {
369 RendererPreferences renderer_preferences = 379 RendererPreferences renderer_preferences =
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1432 if (!policy->CanReadFile(GetProcess()->GetID(), file)) 1442 if (!policy->CanReadFile(GetProcess()->GetID(), file))
1433 policy->GrantReadFile(GetProcess()->GetID(), file); 1443 policy->GrantReadFile(GetProcess()->GetID(), file);
1434 } 1444 }
1435 } 1445 }
1436 1446
1437 void RenderViewHostImpl::SelectWordAroundCaret() { 1447 void RenderViewHostImpl::SelectWordAroundCaret() {
1438 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1448 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1439 } 1449 }
1440 1450
1441 } // namespace content 1451 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698