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

Side by Side Diff: headless/lib/browser/headless_web_contents_impl.cc

Issue 2420253002: Rename shell namespace to service_manager (Closed)
Patch Set: . Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "headless/lib/browser/headless_web_contents_impl.h" 5 #include "headless/lib/browser/headless_web_contents_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 web_contents_->Close(); 147 web_contents_->Close();
148 } 148 }
149 149
150 void HeadlessWebContentsImpl::RenderFrameCreated( 150 void HeadlessWebContentsImpl::RenderFrameCreated(
151 content::RenderFrameHost* render_frame_host) { 151 content::RenderFrameHost* render_frame_host) {
152 if (!mojo_services_.empty()) { 152 if (!mojo_services_.empty()) {
153 render_frame_host->GetRenderViewHost()->AllowBindings( 153 render_frame_host->GetRenderViewHost()->AllowBindings(
154 content::BINDINGS_POLICY_HEADLESS); 154 content::BINDINGS_POLICY_HEADLESS);
155 } 155 }
156 156
157 shell::InterfaceRegistry* interface_registry = 157 service_manager::InterfaceRegistry* interface_registry =
158 render_frame_host->GetInterfaceRegistry(); 158 render_frame_host->GetInterfaceRegistry();
159 159
160 for (const MojoService& service : mojo_services_) { 160 for (const MojoService& service : mojo_services_) {
161 interface_registry->AddInterface(service.service_name, 161 interface_registry->AddInterface(service.service_name,
162 service.service_factory, 162 service.service_factory,
163 browser()->BrowserMainThread()); 163 browser()->BrowserMainThread());
164 } 164 }
165 } 165 }
166 166
167 bool HeadlessWebContentsImpl::OpenURL(const GURL& url) { 167 bool HeadlessWebContentsImpl::OpenURL(const GURL& url) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 HeadlessWebContents::Builder::MojoService::MojoService() {} 257 HeadlessWebContents::Builder::MojoService::MojoService() {}
258 258
259 HeadlessWebContents::Builder::MojoService::MojoService( 259 HeadlessWebContents::Builder::MojoService::MojoService(
260 const std::string& service_name, 260 const std::string& service_name,
261 const base::Callback<void(mojo::ScopedMessagePipeHandle)>& service_factory) 261 const base::Callback<void(mojo::ScopedMessagePipeHandle)>& service_factory)
262 : service_name(service_name), service_factory(service_factory) {} 262 : service_name(service_name), service_factory(service_factory) {}
263 263
264 HeadlessWebContents::Builder::MojoService::~MojoService() {} 264 HeadlessWebContents::Builder::MojoService::~MojoService() {}
265 265
266 } // namespace headless 266 } // namespace headless
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698