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 "chrome/browser/media/output_protection_proxy.h" | 9 #include "chrome/browser/media/output_protection_proxy.h" |
9 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
10 #include "content/public/browser/render_process_host.h" | 11 #include "content/public/browser/render_process_host.h" |
11 #include "mojo/public/cpp/bindings/strong_binding.h" | 12 #include "mojo/public/cpp/bindings/strong_binding.h" |
12 | 13 |
13 // static | 14 // static |
14 void OutputProtectionImpl::Create( | 15 void OutputProtectionImpl::Create( |
15 content::RenderFrameHost* render_frame_host, | 16 content::RenderFrameHost* render_frame_host, |
16 media::mojom::OutputProtectionRequest request) { | 17 media::mojom::OutputProtectionRequest request) { |
17 DVLOG(2) << __func__; | 18 DVLOG(2) << __func__; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 77 |
77 // Helper function to lazily create the |proxy_| and return it. | 78 // Helper function to lazily create the |proxy_| and return it. |
78 chrome::OutputProtectionProxy* OutputProtectionImpl::GetProxy() { | 79 chrome::OutputProtectionProxy* OutputProtectionImpl::GetProxy() { |
79 if (!proxy_) { | 80 if (!proxy_) { |
80 proxy_ = base::MakeUnique<chrome::OutputProtectionProxy>(render_process_id_, | 81 proxy_ = base::MakeUnique<chrome::OutputProtectionProxy>(render_process_id_, |
81 render_frame_id_); | 82 render_frame_id_); |
82 } | 83 } |
83 | 84 |
84 return proxy_.get(); | 85 return proxy_.get(); |
85 } | 86 } |
OLD | NEW |