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

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

Issue 25503004: 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: Move global map insert/erase behind the 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
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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 enumeration_completion_id_(0), 826 enumeration_completion_id_(0),
827 load_progress_tracker_(new LoadProgressTracker(this)), 827 load_progress_tracker_(new LoadProgressTracker(this)),
828 session_storage_namespace_id_(params->session_storage_namespace_id), 828 session_storage_namespace_id_(params->session_storage_namespace_id),
829 handling_select_range_(false), 829 handling_select_range_(false),
830 next_snapshot_id_(0), 830 next_snapshot_id_(0),
831 allow_partial_swap_(params->allow_partial_swap), 831 allow_partial_swap_(params->allow_partial_swap),
832 context_menu_source_type_(ui::MENU_SOURCE_MOUSE) { 832 context_menu_source_type_(ui::MENU_SOURCE_MOUSE) {
833 } 833 }
834 834
835 void RenderViewImpl::Initialize(RenderViewImplParams* params) { 835 void RenderViewImpl::Initialize(RenderViewImplParams* params) {
836 RenderFrameImpl* main_frame = RenderFrameImpl::Create(
837 this, params->main_frame_routing_id);
838 main_render_frame_.reset(main_frame);
839 routing_id_ = params->routing_id; 836 routing_id_ = params->routing_id;
840 surface_id_ = params->surface_id; 837 surface_id_ = params->surface_id;
841 if (params->opener_id != MSG_ROUTING_NONE && params->is_renderer_created) 838 if (params->opener_id != MSG_ROUTING_NONE && params->is_renderer_created)
842 opener_id_ = params->opener_id; 839 opener_id_ = params->opener_id;
843 840
844 // Ensure we start with a valid next_page_id_ from the browser. 841 // Ensure we start with a valid next_page_id_ from the browser.
845 DCHECK_GE(next_page_id_, 0); 842 DCHECK_GE(next_page_id_, 0);
846 843
847 #if defined(ENABLE_NOTIFICATIONS) 844 #if defined(ENABLE_NOTIFICATIONS)
848 notification_provider_ = new NotificationProvider(this); 845 notification_provider_ = new NotificationProvider(this);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 webview()->settings()->setAcceleratedCompositingForFixedPositionEnabled( 890 webview()->settings()->setAcceleratedCompositingForFixedPositionEnabled(
894 ShouldUseFixedPositionCompositing(device_scale_factor_)); 891 ShouldUseFixedPositionCompositing(device_scale_factor_));
895 webview()->settings()->setAcceleratedCompositingForOverflowScrollEnabled( 892 webview()->settings()->setAcceleratedCompositingForOverflowScrollEnabled(
896 ShouldUseAcceleratedCompositingForOverflowScroll(device_scale_factor_)); 893 ShouldUseAcceleratedCompositingForOverflowScroll(device_scale_factor_));
897 webview()->settings()->setAcceleratedCompositingForTransitionEnabled( 894 webview()->settings()->setAcceleratedCompositingForTransitionEnabled(
898 ShouldUseTransitionCompositing(device_scale_factor_)); 895 ShouldUseTransitionCompositing(device_scale_factor_));
899 webview()->settings()->setAcceleratedCompositingForFixedRootBackgroundEnabled( 896 webview()->settings()->setAcceleratedCompositingForFixedRootBackgroundEnabled(
900 ShouldUseAcceleratedFixedRootBackground(device_scale_factor_)); 897 ShouldUseAcceleratedFixedRootBackground(device_scale_factor_));
901 898
902 ApplyWebPreferences(webkit_preferences_, webview()); 899 ApplyWebPreferences(webkit_preferences_, webview());
903 webview()->initializeMainFrame(main_render_frame_.get()); 900
901 main_render_frame_.reset(
902 RenderFrameImpl::Create(this, params->main_frame_routing_id));
903 // The main frame WebFrame object is closed by
904 // RenderViewImpl::frameDetached().
905 webview()->setMainFrame(WebFrame::create(main_render_frame_.get()));
904 906
905 if (switches::IsTouchDragDropEnabled()) 907 if (switches::IsTouchDragDropEnabled())
906 webview()->settings()->setTouchDragDropEnabled(true); 908 webview()->settings()->setTouchDragDropEnabled(true);
907 909
908 if (switches::IsTouchEditingEnabled()) 910 if (switches::IsTouchEditingEnabled())
909 webview()->settings()->setTouchEditingEnabled(true); 911 webview()->settings()->setTouchEditingEnabled(true);
910 912
911 if (!params->frame_name.empty()) 913 if (!params->frame_name.empty())
912 webview()->mainFrame()->setName(params->frame_name); 914 webview()->mainFrame()->setName(params->frame_name);
913 915
(...skipping 5591 matching lines...) Expand 10 before | Expand all | Expand 10 after
6505 for (size_t i = 0; i < icon_urls.size(); i++) { 6507 for (size_t i = 0; i < icon_urls.size(); i++) {
6506 WebURL url = icon_urls[i].iconURL(); 6508 WebURL url = icon_urls[i].iconURL();
6507 if (!url.isEmpty()) 6509 if (!url.isEmpty())
6508 urls.push_back(FaviconURL(url, 6510 urls.push_back(FaviconURL(url,
6509 ToFaviconType(icon_urls[i].iconType()))); 6511 ToFaviconType(icon_urls[i].iconType())));
6510 } 6512 }
6511 SendUpdateFaviconURL(urls); 6513 SendUpdateFaviconURL(urls);
6512 } 6514 }
6513 6515
6514 } // namespace content 6516 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698