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

Side by Side Diff: components/html_viewer/media_factory.cc

Issue 1244233002: Allow trusted brokers to restrict connections for spawned applications to whitelisted applications … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 5 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 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 "components/html_viewer/media_factory.h" 5 #include "components/html_viewer/media_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 return web_encrypted_media_client_.get(); 114 return web_encrypted_media_client_.get();
115 } 115 }
116 116
117 media::interfaces::ServiceFactory* MediaFactory::GetMediaServiceFactory() { 117 media::interfaces::ServiceFactory* MediaFactory::GetMediaServiceFactory() {
118 if (!media_service_factory_) { 118 if (!media_service_factory_) {
119 mojo::ServiceProviderPtr service_provider; 119 mojo::ServiceProviderPtr service_provider;
120 mojo::URLRequestPtr request(mojo::URLRequest::New()); 120 mojo::URLRequestPtr request(mojo::URLRequest::New());
121 request->url = mojo::String::From("mojo:media"); 121 request->url = mojo::String::From("mojo:media");
122 shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), 122 shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider),
123 nullptr); 123 nullptr, nullptr);
124 mojo::ConnectToService(service_provider.get(), &media_service_factory_); 124 mojo::ConnectToService(service_provider.get(), &media_service_factory_);
125 } 125 }
126 126
127 return media_service_factory_.get(); 127 return media_service_factory_.get();
128 } 128 }
129 129
130 media::MediaPermission* MediaFactory::GetMediaPermission() { 130 media::MediaPermission* MediaFactory::GetMediaPermission() {
131 // TODO(xhwang): Replace DefaultMediaPermission with something real when 131 // TODO(xhwang): Replace DefaultMediaPermission with something real when
132 // permissions are supported in html_viewer. 132 // permissions are supported in html_viewer.
133 NOTIMPLEMENTED(); 133 NOTIMPLEMENTED();
(...skipping 29 matching lines...) Expand all
163 scoped_refptr<base::SingleThreadTaskRunner> 163 scoped_refptr<base::SingleThreadTaskRunner>
164 MediaFactory::GetMediaThreadTaskRunner() { 164 MediaFactory::GetMediaThreadTaskRunner() {
165 if (!media_thread_.IsRunning()) 165 if (!media_thread_.IsRunning())
166 media_thread_.Start(); 166 media_thread_.Start();
167 167
168 return media_thread_.task_runner(); 168 return media_thread_.task_runner();
169 } 169 }
170 #endif // !defined(OS_ANDROID) 170 #endif // !defined(OS_ANDROID)
171 171
172 } // namespace html_viewer 172 } // namespace html_viewer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698