OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/media/output_protection_impl.h" | 5 #include "chrome/browser/media/output_protection_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "chrome/browser/media/output_protection_proxy.h" | 9 #include "chrome/browser/media/output_protection_proxy.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
11 #include "content/public/browser/render_process_host.h" | 11 #include "content/public/browser/render_process_host.h" |
12 #include "mojo/public/cpp/bindings/strong_binding.h" | 12 #include "mojo/public/cpp/bindings/strong_binding.h" |
13 | 13 |
14 // static | 14 // static |
15 void OutputProtectionImpl::Create( | 15 void OutputProtectionImpl::Create( |
16 content::RenderFrameHost* render_frame_host, | 16 content::RenderFrameHost* render_frame_host, |
| 17 const service_manager::BindSourceInfo& source_info, |
17 media::mojom::OutputProtectionRequest request) { | 18 media::mojom::OutputProtectionRequest request) { |
18 DVLOG(2) << __func__; | 19 DVLOG(2) << __func__; |
19 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 20 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
20 DCHECK(render_frame_host); | 21 DCHECK(render_frame_host); |
21 mojo::MakeStrongBinding(base::MakeUnique<OutputProtectionImpl>( | 22 mojo::MakeStrongBinding(base::MakeUnique<OutputProtectionImpl>( |
22 render_frame_host->GetProcess()->GetID(), | 23 render_frame_host->GetProcess()->GetID(), |
23 render_frame_host->GetRoutingID()), | 24 render_frame_host->GetRoutingID()), |
24 std::move(request)); | 25 std::move(request)); |
25 } | 26 } |
26 | 27 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 78 |
78 // Helper function to lazily create the |proxy_| and return it. | 79 // Helper function to lazily create the |proxy_| and return it. |
79 chrome::OutputProtectionProxy* OutputProtectionImpl::GetProxy() { | 80 chrome::OutputProtectionProxy* OutputProtectionImpl::GetProxy() { |
80 if (!proxy_) { | 81 if (!proxy_) { |
81 proxy_ = base::MakeUnique<chrome::OutputProtectionProxy>(render_process_id_, | 82 proxy_ = base::MakeUnique<chrome::OutputProtectionProxy>(render_process_id_, |
82 render_frame_id_); | 83 render_frame_id_); |
83 } | 84 } |
84 | 85 |
85 return proxy_.get(); | 86 return proxy_.get(); |
86 } | 87 } |
OLD | NEW |