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

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: notify observers regardless of flag 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/test/data/site_isolation/blank.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 enumeration_completion_id_(0), 828 enumeration_completion_id_(0),
829 load_progress_tracker_(new LoadProgressTracker(this)), 829 load_progress_tracker_(new LoadProgressTracker(this)),
830 session_storage_namespace_id_(params->session_storage_namespace_id), 830 session_storage_namespace_id_(params->session_storage_namespace_id),
831 handling_select_range_(false), 831 handling_select_range_(false),
832 next_snapshot_id_(0), 832 next_snapshot_id_(0),
833 allow_partial_swap_(params->allow_partial_swap), 833 allow_partial_swap_(params->allow_partial_swap),
834 context_menu_source_type_(ui::MENU_SOURCE_MOUSE) { 834 context_menu_source_type_(ui::MENU_SOURCE_MOUSE) {
835 } 835 }
836 836
837 void RenderViewImpl::Initialize(RenderViewImplParams* params) { 837 void RenderViewImpl::Initialize(RenderViewImplParams* params) {
838 RenderFrameImpl* main_frame = RenderFrameImpl::Create(
839 this, params->main_frame_routing_id);
840 main_render_frame_.reset(main_frame);
841 routing_id_ = params->routing_id; 838 routing_id_ = params->routing_id;
842 surface_id_ = params->surface_id; 839 surface_id_ = params->surface_id;
843 if (params->opener_id != MSG_ROUTING_NONE && params->is_renderer_created) 840 if (params->opener_id != MSG_ROUTING_NONE && params->is_renderer_created)
844 opener_id_ = params->opener_id; 841 opener_id_ = params->opener_id;
845 842
846 // Ensure we start with a valid next_page_id_ from the browser. 843 // Ensure we start with a valid next_page_id_ from the browser.
847 DCHECK_GE(next_page_id_, 0); 844 DCHECK_GE(next_page_id_, 0);
848 845
849 #if defined(ENABLE_NOTIFICATIONS) 846 #if defined(ENABLE_NOTIFICATIONS)
850 notification_provider_ = new NotificationProvider(this); 847 notification_provider_ = new NotificationProvider(this);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 webview()->settings()->setAcceleratedCompositingForFixedPositionEnabled( 892 webview()->settings()->setAcceleratedCompositingForFixedPositionEnabled(
896 ShouldUseFixedPositionCompositing(device_scale_factor_)); 893 ShouldUseFixedPositionCompositing(device_scale_factor_));
897 webview()->settings()->setAcceleratedCompositingForOverflowScrollEnabled( 894 webview()->settings()->setAcceleratedCompositingForOverflowScrollEnabled(
898 ShouldUseAcceleratedCompositingForOverflowScroll(device_scale_factor_)); 895 ShouldUseAcceleratedCompositingForOverflowScroll(device_scale_factor_));
899 webview()->settings()->setAcceleratedCompositingForTransitionEnabled( 896 webview()->settings()->setAcceleratedCompositingForTransitionEnabled(
900 ShouldUseTransitionCompositing(device_scale_factor_)); 897 ShouldUseTransitionCompositing(device_scale_factor_));
901 webview()->settings()->setAcceleratedCompositingForFixedRootBackgroundEnabled( 898 webview()->settings()->setAcceleratedCompositingForFixedRootBackgroundEnabled(
902 ShouldUseAcceleratedFixedRootBackground(device_scale_factor_)); 899 ShouldUseAcceleratedFixedRootBackground(device_scale_factor_));
903 900
904 ApplyWebPreferences(webkit_preferences_, webview()); 901 ApplyWebPreferences(webkit_preferences_, webview());
905 webview()->initializeMainFrame(main_render_frame_.get()); 902
903 main_render_frame_.reset(
904 RenderFrameImpl::Create(this, params->main_frame_routing_id));
905 // The main frame WebFrame object is closed by
906 // RenderViewImpl::frameDetached().
907 webview()->setMainFrame(WebFrame::create(main_render_frame_.get()));
906 908
907 if (switches::IsTouchDragDropEnabled()) 909 if (switches::IsTouchDragDropEnabled())
908 webview()->settings()->setTouchDragDropEnabled(true); 910 webview()->settings()->setTouchDragDropEnabled(true);
909 911
910 if (switches::IsTouchEditingEnabled()) 912 if (switches::IsTouchEditingEnabled())
911 webview()->settings()->setTouchEditingEnabled(true); 913 webview()->settings()->setTouchEditingEnabled(true);
912 914
913 if (!params->frame_name.empty()) 915 if (!params->frame_name.empty())
914 webview()->mainFrame()->setName(params->frame_name); 916 webview()->mainFrame()->setName(params->frame_name);
915 917
(...skipping 5588 matching lines...) Expand 10 before | Expand all | Expand 10 after
6504 for (size_t i = 0; i < icon_urls.size(); i++) { 6506 for (size_t i = 0; i < icon_urls.size(); i++) {
6505 WebURL url = icon_urls[i].iconURL(); 6507 WebURL url = icon_urls[i].iconURL();
6506 if (!url.isEmpty()) 6508 if (!url.isEmpty())
6507 urls.push_back(FaviconURL(url, 6509 urls.push_back(FaviconURL(url,
6508 ToFaviconType(icon_urls[i].iconType()))); 6510 ToFaviconType(icon_urls[i].iconType())));
6509 } 6511 }
6510 SendUpdateFaviconURL(urls); 6512 SendUpdateFaviconURL(urls);
6511 } 6513 }
6512 6514
6513 } // namespace content 6515 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/test/data/site_isolation/blank.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698