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

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

Issue 1474563002: Make CapabilityFilter non-nullable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years 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 | « no previous file | content/test/data/web_ui_mojo_shell_test.js » ('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 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 5368 matching lines...) Expand 10 before | Expand all | Expand 10 after
5379 } 5379 }
5380 } 5380 }
5381 5381
5382 mojo::ServiceProviderPtr RenderFrameImpl::ConnectToApplication( 5382 mojo::ServiceProviderPtr RenderFrameImpl::ConnectToApplication(
5383 const GURL& url) { 5383 const GURL& url) {
5384 if (!mojo_shell_) 5384 if (!mojo_shell_)
5385 GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&mojo_shell_)); 5385 GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&mojo_shell_));
5386 mojo::ServiceProviderPtr service_provider; 5386 mojo::ServiceProviderPtr service_provider;
5387 mojo::URLRequestPtr request(mojo::URLRequest::New()); 5387 mojo::URLRequestPtr request(mojo::URLRequest::New());
5388 request->url = mojo::String::From(url); 5388 request->url = mojo::String::From(url);
5389 mojo::CapabilityFilterPtr filter(mojo::CapabilityFilter::New());
5390 mojo::Array<mojo::String> all_interfaces;
5391 all_interfaces.push_back("*");
5392 filter->filter.insert("*", all_interfaces.Pass());
5389 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), 5393 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider),
5390 nullptr, nullptr, 5394 nullptr, filter.Pass(),
5391 base::Bind(&OnGotContentHandlerID)); 5395 base::Bind(&OnGotContentHandlerID));
5392 return service_provider.Pass(); 5396 return service_provider.Pass();
5393 } 5397 }
5394 5398
5395 media::RendererWebMediaPlayerDelegate* 5399 media::RendererWebMediaPlayerDelegate*
5396 RenderFrameImpl::GetWebMediaPlayerDelegate() { 5400 RenderFrameImpl::GetWebMediaPlayerDelegate() {
5397 if (!media_player_delegate_) 5401 if (!media_player_delegate_)
5398 media_player_delegate_ = new media::RendererWebMediaPlayerDelegate(this); 5402 media_player_delegate_ = new media::RendererWebMediaPlayerDelegate(this);
5399 return media_player_delegate_; 5403 return media_player_delegate_;
5400 } 5404 }
5401 5405
5402 void RenderFrameImpl::checkIfAudioSinkExistsAndIsAuthorized( 5406 void RenderFrameImpl::checkIfAudioSinkExistsAndIsAuthorized(
5403 const blink::WebString& sink_id, 5407 const blink::WebString& sink_id,
5404 const blink::WebSecurityOrigin& security_origin, 5408 const blink::WebSecurityOrigin& security_origin,
5405 blink::WebSetSinkIdCallbacks* web_callbacks) { 5409 blink::WebSetSinkIdCallbacks* web_callbacks) {
5406 media::SwitchOutputDeviceCB callback = 5410 media::SwitchOutputDeviceCB callback =
5407 media::ConvertToSwitchOutputDeviceCB(web_callbacks); 5411 media::ConvertToSwitchOutputDeviceCB(web_callbacks);
5408 scoped_refptr<media::AudioOutputDevice> device = 5412 scoped_refptr<media::AudioOutputDevice> device =
5409 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), 5413 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(),
5410 security_origin); 5414 security_origin);
5411 media::OutputDeviceStatus status = device->GetDeviceStatus(); 5415 media::OutputDeviceStatus status = device->GetDeviceStatus();
5412 device->Stop(); 5416 device->Stop();
5413 callback.Run(status); 5417 callback.Run(status);
5414 } 5418 }
5415 5419
5416 } // namespace content 5420 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/test/data/web_ui_mojo_shell_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698