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

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

Issue 2873283002: [Reland] Allow headless TabSocket in isolated worlds & remove obsolete logic (Closed)
Patch Set: Fix GN Issue Created 3 years, 6 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://";
120 } 118 }
121 NOTREACHED(); 119 NOTREACHED();
122 return ""; 120 return "";
123 } 121 }
124 122
125 } // namespace 123 } // namespace
126 124
127 MojoContextState::MojoContextState(blink::WebLocalFrame* frame, 125 MojoContextState::MojoContextState(blink::WebLocalFrame* frame,
128 v8::Local<v8::Context> context, 126 v8::Local<v8::Context> context,
129 MojoBindingsType bindings_type) 127 MojoBindingsType bindings_type)
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 const std::vector<std::string>& dependencies) { 231 const std::vector<std::string>& dependencies) {
234 FetchModules(dependencies); 232 FetchModules(dependencies);
235 233
236 gin::ContextHolder* context_holder = runner_->GetContextHolder(); 234 gin::ContextHolder* context_holder = runner_->GetContextHolder();
237 gin::ModuleRegistry* registry = gin::ModuleRegistry::From( 235 gin::ModuleRegistry* registry = gin::ModuleRegistry::From(
238 context_holder->context()); 236 context_holder->context());
239 registry->AttemptToLoadMoreModules(context_holder->isolate()); 237 registry->AttemptToLoadMoreModules(context_holder->isolate());
240 } 238 }
241 239
242 } // namespace content 240 } // 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