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

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

Issue 1470823002: Enable builtin Mojo JS modules in layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@usb-testing
Patch Set: oops, clumsy Created 4 years, 11 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
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_view_impl.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 TRACE_EVENT_CATEGORY_GROUP_ENABLED("navigation", &is_tracing); 1045 TRACE_EVENT_CATEGORY_GROUP_ENABLED("navigation", &is_tracing);
1046 if (is_tracing) { 1046 if (is_tracing) {
1047 int parent_id = GetRoutingIdForFrameOrProxy(frame_->parent()); 1047 int parent_id = GetRoutingIdForFrameOrProxy(frame_->parent());
1048 TRACE_EVENT2("navigation", "RenderFrameImpl::Initialize", 1048 TRACE_EVENT2("navigation", "RenderFrameImpl::Initialize",
1049 "id", routing_id_, 1049 "id", routing_id_,
1050 "parent", parent_id); 1050 "parent", parent_id);
1051 } 1051 }
1052 1052
1053 if (IsMainFrame() && 1053 if (IsMainFrame() &&
1054 RenderProcess::current()->GetEnabledBindings() & BINDINGS_POLICY_WEB_UI) { 1054 RenderProcess::current()->GetEnabledBindings() & BINDINGS_POLICY_WEB_UI) {
1055 EnableMojoBindings(); 1055 EnableMojoBindings(false /* for_layout_tests */);
1056 } 1056 }
1057 1057
1058 #if defined(ENABLE_PLUGINS) 1058 #if defined(ENABLE_PLUGINS)
1059 new PepperBrowserConnection(this); 1059 new PepperBrowserConnection(this);
1060 #endif 1060 #endif
1061 new SharedWorkerRepository(this); 1061 new SharedWorkerRepository(this);
1062 1062
1063 if (IsLocalRoot() && !is_swapped_out_) { 1063 if (IsLocalRoot() && !is_swapped_out_) {
1064 // DevToolsAgent is a RenderFrameObserver, and will destruct itself 1064 // DevToolsAgent is a RenderFrameObserver, and will destruct itself
1065 // when |this| is deleted. 1065 // when |this| is deleted.
(...skipping 4653 matching lines...) Expand 10 before | Expand all | Expand 10 after
5719 5719
5720 void RenderFrameImpl::SendUpdateState() { 5720 void RenderFrameImpl::SendUpdateState() {
5721 DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries()); 5721 DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries());
5722 if (current_history_item_.isNull()) 5722 if (current_history_item_.isNull())
5723 return; 5723 return;
5724 5724
5725 Send(new FrameHostMsg_UpdateState( 5725 Send(new FrameHostMsg_UpdateState(
5726 routing_id_, SingleHistoryItemToPageState(current_history_item_))); 5726 routing_id_, SingleHistoryItemToPageState(current_history_item_)));
5727 } 5727 }
5728 5728
5729 void RenderFrameImpl::EnableMojoBindings() { 5729 void RenderFrameImpl::EnableMojoBindings(bool for_layout_tests) {
5730 // If an MojoBindingsController already exists for this RenderFrameImpl, avoid 5730 // If an MojoBindingsController already exists for this RenderFrameImpl, avoid
5731 // creating another one. It is not kept as a member, as it deletes itself when 5731 // creating another one. It is not kept as a member, as it deletes itself when
5732 // the frame is destroyed. 5732 // the frame is destroyed.
5733 if (!RenderFrameObserverTracker<MojoBindingsController>::Get(this)) 5733 if (!RenderFrameObserverTracker<MojoBindingsController>::Get(this))
5734 new MojoBindingsController(this); 5734 new MojoBindingsController(this, for_layout_tests);
5735 } 5735 }
5736 5736
5737 void RenderFrameImpl::SendFailedProvisionalLoad( 5737 void RenderFrameImpl::SendFailedProvisionalLoad(
5738 const blink::WebURLRequest& request, 5738 const blink::WebURLRequest& request,
5739 const blink::WebURLError& error, 5739 const blink::WebURLError& error,
5740 blink::WebLocalFrame* frame) { 5740 blink::WebLocalFrame* frame) {
5741 bool show_repost_interstitial = 5741 bool show_repost_interstitial =
5742 (error.reason == net::ERR_CACHE_MISS && 5742 (error.reason == net::ERR_CACHE_MISS &&
5743 base::EqualsASCII(base::StringPiece16(request.httpMethod()), "POST")); 5743 base::EqualsASCII(base::StringPiece16(request.httpMethod()), "POST"));
5744 5744
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
6049 int match_count, 6049 int match_count,
6050 int ordinal, 6050 int ordinal,
6051 const WebRect& selection_rect, 6051 const WebRect& selection_rect,
6052 bool final_status_update) { 6052 bool final_status_update) {
6053 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6053 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6054 selection_rect, ordinal, 6054 selection_rect, ordinal,
6055 final_status_update)); 6055 final_status_update));
6056 } 6056 }
6057 6057
6058 } // namespace content 6058 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698