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

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

Issue 692973005: Pass origin information for remote frame creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test failures for content:// URLs on Android Created 6 years 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
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | no next file » | 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 26 matching lines...) Expand all
37 #include "content/child/child_shared_bitmap_manager.h" 37 #include "content/child/child_shared_bitmap_manager.h"
38 #include "content/child/child_thread.h" 38 #include "content/child/child_thread.h"
39 #include "content/child/npapi/webplugin_delegate_impl.h" 39 #include "content/child/npapi/webplugin_delegate_impl.h"
40 #include "content/child/request_extra_data.h" 40 #include "content/child/request_extra_data.h"
41 #include "content/child/webmessageportchannel_impl.h" 41 #include "content/child/webmessageportchannel_impl.h"
42 #include "content/common/content_constants_internal.h" 42 #include "content/common/content_constants_internal.h"
43 #include "content/common/database_messages.h" 43 #include "content/common/database_messages.h"
44 #include "content/common/dom_storage/dom_storage_types.h" 44 #include "content/common/dom_storage/dom_storage_types.h"
45 #include "content/common/drag_messages.h" 45 #include "content/common/drag_messages.h"
46 #include "content/common/frame_messages.h" 46 #include "content/common/frame_messages.h"
47 #include "content/common/frame_replication_state.h"
47 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 48 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
48 #include "content/common/input_messages.h" 49 #include "content/common/input_messages.h"
49 #include "content/common/pepper_messages.h" 50 #include "content/common/pepper_messages.h"
50 #include "content/common/ssl_status_serialization.h" 51 #include "content/common/ssl_status_serialization.h"
51 #include "content/common/view_messages.h" 52 #include "content/common/view_messages.h"
52 #include "content/public/common/bindings_policy.h" 53 #include "content/public/common/bindings_policy.h"
53 #include "content/public/common/content_client.h" 54 #include "content/public/common/content_client.h"
54 #include "content/public/common/content_constants.h" 55 #include "content/public/common/content_constants.h"
55 #include "content/public/common/content_switches.h" 56 #include "content/public/common/content_switches.h"
56 #include "content/public/common/drop_data.h" 57 #include "content/public/common/drop_data.h"
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 CHECK(params.swapped_out); 767 CHECK(params.swapped_out);
767 proxy = RenderFrameProxy::CreateProxyToReplaceFrame( 768 proxy = RenderFrameProxy::CreateProxyToReplaceFrame(
768 main_render_frame_.get(), params.proxy_routing_id); 769 main_render_frame_.get(), params.proxy_routing_id);
769 main_render_frame_->set_render_frame_proxy(proxy); 770 main_render_frame_->set_render_frame_proxy(proxy);
770 } 771 }
771 772
772 // In --site-per-process, just use the WebRemoteFrame as the main frame. 773 // In --site-per-process, just use the WebRemoteFrame as the main frame.
773 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess) && 774 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess) &&
774 proxy) { 775 proxy) {
775 webview()->setMainFrame(proxy->web_frame()); 776 webview()->setMainFrame(proxy->web_frame());
777 // Initialize the WebRemoteFrame with information replicated from the
778 // browser process.
779 proxy->SetReplicatedState(params.replicated_frame_state);
776 } else { 780 } else {
777 webview()->setMainFrame(main_render_frame_->GetWebFrame()); 781 webview()->setMainFrame(main_render_frame_->GetWebFrame());
778 } 782 }
779 main_render_frame_->Initialize(); 783 main_render_frame_->Initialize();
780 784
781 if (switches::IsTouchDragDropEnabled()) 785 if (switches::IsTouchDragDropEnabled())
782 webview()->settings()->setTouchDragDropEnabled(true); 786 webview()->settings()->setTouchDragDropEnabled(true);
783 787
784 if (switches::IsTouchEditingEnabled()) 788 if (switches::IsTouchEditingEnabled())
785 webview()->settings()->setTouchEditingEnabled(true); 789 webview()->settings()->setTouchEditingEnabled(true);
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 view_params.renderer_preferences = renderer_preferences_; 1677 view_params.renderer_preferences = renderer_preferences_;
1674 view_params.web_preferences = webkit_preferences_; 1678 view_params.web_preferences = webkit_preferences_;
1675 view_params.view_id = routing_id; 1679 view_params.view_id = routing_id;
1676 view_params.main_frame_routing_id = main_frame_routing_id; 1680 view_params.main_frame_routing_id = main_frame_routing_id;
1677 view_params.surface_id = surface_id; 1681 view_params.surface_id = surface_id;
1678 view_params.session_storage_namespace_id = 1682 view_params.session_storage_namespace_id =
1679 cloned_session_storage_namespace_id; 1683 cloned_session_storage_namespace_id;
1680 // WebCore will take care of setting the correct name. 1684 // WebCore will take care of setting the correct name.
1681 view_params.frame_name = base::string16(); 1685 view_params.frame_name = base::string16();
1682 view_params.swapped_out = false; 1686 view_params.swapped_out = false;
1687 view_params.replicated_frame_state = FrameReplicationState();
1683 view_params.proxy_routing_id = MSG_ROUTING_NONE; 1688 view_params.proxy_routing_id = MSG_ROUTING_NONE;
1684 view_params.hidden = (params.disposition == NEW_BACKGROUND_TAB); 1689 view_params.hidden = (params.disposition == NEW_BACKGROUND_TAB);
1685 view_params.never_visible = never_visible; 1690 view_params.never_visible = never_visible;
1686 view_params.next_page_id = 1; 1691 view_params.next_page_id = 1;
1687 view_params.initial_size = initial_size; 1692 view_params.initial_size = initial_size;
1688 view_params.enable_auto_resize = false; 1693 view_params.enable_auto_resize = false;
1689 view_params.min_size = gfx::Size(); 1694 view_params.min_size = gfx::Size();
1690 view_params.max_size = gfx::Size(); 1695 view_params.max_size = gfx::Size();
1691 1696
1692 RenderViewImpl* view = RenderViewImpl::Create(view_params, true); 1697 RenderViewImpl* view = RenderViewImpl::Create(view_params, true);
(...skipping 2503 matching lines...) Expand 10 before | Expand all | Expand 10 after
4196 std::vector<gfx::Size> sizes; 4201 std::vector<gfx::Size> sizes;
4197 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4202 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4198 if (!url.isEmpty()) 4203 if (!url.isEmpty())
4199 urls.push_back( 4204 urls.push_back(
4200 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4205 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4201 } 4206 }
4202 SendUpdateFaviconURL(urls); 4207 SendUpdateFaviconURL(urls);
4203 } 4208 }
4204 4209
4205 } // namespace content 4210 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698