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

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

Issue 2902953003: Revert of Allow headless TabSocket in isolated worlds & remove obsolete logic (Closed)
Patch Set: Created 3 years, 7 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/mojo_bindings_controller.h ('k') | content/renderer/render_frame_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/mojo_context_state.h" 5 #include "content/renderer/mojo_context_state.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 return source_iter->second; 108 return source_iter->second;
109 } 109 }
110 110
111 std::string GetModulePrefixForBindingsType(MojoBindingsType bindings_type, 111 std::string GetModulePrefixForBindingsType(MojoBindingsType bindings_type,
112 blink::WebLocalFrame* frame) { 112 blink::WebLocalFrame* frame) {
113 switch (bindings_type) { 113 switch (bindings_type) {
114 case MojoBindingsType::FOR_WEB_UI: 114 case MojoBindingsType::FOR_WEB_UI:
115 return frame->GetSecurityOrigin().ToString().Utf8() + "/"; 115 return frame->GetSecurityOrigin().ToString().Utf8() + "/";
116 case MojoBindingsType::FOR_LAYOUT_TESTS: 116 case MojoBindingsType::FOR_LAYOUT_TESTS:
117 return "layout-test-mojom://"; 117 return "layout-test-mojom://";
118 case MojoBindingsType::FOR_HEADLESS:
119 return "headless-mojom://";
118 } 120 }
119 NOTREACHED(); 121 NOTREACHED();
120 return ""; 122 return "";
121 } 123 }
122 124
123 } // namespace 125 } // namespace
124 126
125 MojoContextState::MojoContextState(blink::WebLocalFrame* frame, 127 MojoContextState::MojoContextState(blink::WebLocalFrame* frame,
126 v8::Local<v8::Context> context, 128 v8::Local<v8::Context> context,
127 MojoBindingsType bindings_type) 129 MojoBindingsType bindings_type)
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 const std::vector<std::string>& dependencies) { 233 const std::vector<std::string>& dependencies) {
232 FetchModules(dependencies); 234 FetchModules(dependencies);
233 235
234 gin::ContextHolder* context_holder = runner_->GetContextHolder(); 236 gin::ContextHolder* context_holder = runner_->GetContextHolder();
235 gin::ModuleRegistry* registry = gin::ModuleRegistry::From( 237 gin::ModuleRegistry* registry = gin::ModuleRegistry::From(
236 context_holder->context()); 238 context_holder->context());
237 registry->AttemptToLoadMoreModules(context_holder->isolate()); 239 registry->AttemptToLoadMoreModules(context_holder->isolate());
238 } 240 }
239 241
240 } // namespace content 242 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/mojo_bindings_controller.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698