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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 23841002: Create a new RenderFrameHost per child frame when --site-per-process is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: custom deleters rock. Created 7 years, 2 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 | Annotate | Revision Log
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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 enumeration_completion_id_(0), 830 enumeration_completion_id_(0),
831 load_progress_tracker_(new LoadProgressTracker(this)), 831 load_progress_tracker_(new LoadProgressTracker(this)),
832 session_storage_namespace_id_(params->session_storage_namespace_id), 832 session_storage_namespace_id_(params->session_storage_namespace_id),
833 handling_select_range_(false), 833 handling_select_range_(false),
834 next_snapshot_id_(0), 834 next_snapshot_id_(0),
835 allow_partial_swap_(params->allow_partial_swap), 835 allow_partial_swap_(params->allow_partial_swap),
836 context_menu_source_type_(ui::MENU_SOURCE_MOUSE) { 836 context_menu_source_type_(ui::MENU_SOURCE_MOUSE) {
837 } 837 }
838 838
839 void RenderViewImpl::Initialize(RenderViewImplParams* params) { 839 void RenderViewImpl::Initialize(RenderViewImplParams* params) {
840 RenderFrameImpl* main_frame = RenderFrameImpl::Create(
841 this, params->main_frame_routing_id);
842 main_render_frame_.reset(main_frame);
843 routing_id_ = params->routing_id; 840 routing_id_ = params->routing_id;
844 surface_id_ = params->surface_id; 841 surface_id_ = params->surface_id;
845 if (params->opener_id != MSG_ROUTING_NONE && params->is_renderer_created) 842 if (params->opener_id != MSG_ROUTING_NONE && params->is_renderer_created)
846 opener_id_ = params->opener_id; 843 opener_id_ = params->opener_id;
847 844
848 // Ensure we start with a valid next_page_id_ from the browser. 845 // Ensure we start with a valid next_page_id_ from the browser.
849 DCHECK_GE(next_page_id_, 0); 846 DCHECK_GE(next_page_id_, 0);
850 847
851 #if defined(ENABLE_NOTIFICATIONS) 848 #if defined(ENABLE_NOTIFICATIONS)
852 notification_provider_ = new NotificationProvider(this); 849 notification_provider_ = new NotificationProvider(this);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 webview()->settings()->setAcceleratedCompositingForFixedPositionEnabled( 894 webview()->settings()->setAcceleratedCompositingForFixedPositionEnabled(
898 ShouldUseFixedPositionCompositing(device_scale_factor_)); 895 ShouldUseFixedPositionCompositing(device_scale_factor_));
899 webview()->settings()->setAcceleratedCompositingForOverflowScrollEnabled( 896 webview()->settings()->setAcceleratedCompositingForOverflowScrollEnabled(
900 ShouldUseAcceleratedCompositingForOverflowScroll(device_scale_factor_)); 897 ShouldUseAcceleratedCompositingForOverflowScroll(device_scale_factor_));
901 webview()->settings()->setAcceleratedCompositingForTransitionEnabled( 898 webview()->settings()->setAcceleratedCompositingForTransitionEnabled(
902 ShouldUseTransitionCompositing(device_scale_factor_)); 899 ShouldUseTransitionCompositing(device_scale_factor_));
903 webview()->settings()->setAcceleratedCompositingForFixedRootBackgroundEnabled( 900 webview()->settings()->setAcceleratedCompositingForFixedRootBackgroundEnabled(
904 ShouldUseAcceleratedFixedRootBackground(device_scale_factor_)); 901 ShouldUseAcceleratedFixedRootBackground(device_scale_factor_));
905 902
906 ApplyWebPreferences(webkit_preferences_, webview()); 903 ApplyWebPreferences(webkit_preferences_, webview());
907 webview()->initializeMainFrame(main_render_frame_.get()); 904 main_render_frame_.reset(
905 RenderFrameImpl::Create(this, params->main_frame_routing_id));
906 main_frame_.reset(WebFrame::create(main_render_frame_.get()));
907 webview()->setMainFrame(main_frame_.get());
908 908
909 if (switches::IsTouchDragDropEnabled()) 909 if (switches::IsTouchDragDropEnabled())
910 webview()->settings()->setTouchDragDropEnabled(true); 910 webview()->settings()->setTouchDragDropEnabled(true);
911 911
912 if (switches::IsTouchEditingEnabled()) 912 if (switches::IsTouchEditingEnabled())
913 webview()->settings()->setTouchEditingEnabled(true); 913 webview()->settings()->setTouchEditingEnabled(true);
914 914
915 if (!params->frame_name.empty()) 915 if (!params->frame_name.empty())
916 webview()->mainFrame()->setName(params->frame_name); 916 webview()->mainFrame()->setName(params->frame_name);
917 917
(...skipping 5588 matching lines...) Expand 10 before | Expand all | Expand 10 after
6506 for (size_t i = 0; i < icon_urls.size(); i++) { 6506 for (size_t i = 0; i < icon_urls.size(); i++) {
6507 WebURL url = icon_urls[i].iconURL(); 6507 WebURL url = icon_urls[i].iconURL();
6508 if (!url.isEmpty()) 6508 if (!url.isEmpty())
6509 urls.push_back(FaviconURL(url, 6509 urls.push_back(FaviconURL(url,
6510 ToFaviconType(icon_urls[i].iconType()))); 6510 ToFaviconType(icon_urls[i].iconType())));
6511 } 6511 }
6512 SendUpdateFaviconURL(urls); 6512 SendUpdateFaviconURL(urls);
6513 } 6513 }
6514 6514
6515 } // namespace content 6515 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698