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

Side by Side Diff: chrome/browser/media/output_protection_impl.h

Issue 2326913003: Privatize StrongBinding lifetime management (Closed)
Patch Set: rebase Created 4 years, 3 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 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 #ifndef CHROME_BROWSER_MEDIA_OUTPUT_PROTECTION_IMPL_H_ 5 #ifndef CHROME_BROWSER_MEDIA_OUTPUT_PROTECTION_IMPL_H_
6 #define CHROME_BROWSER_MEDIA_OUTPUT_PROTECTION_IMPL_H_ 6 #define CHROME_BROWSER_MEDIA_OUTPUT_PROTECTION_IMPL_H_
7 7
8 #include "content/public/browser/render_frame_host.h" 8 #include "content/public/browser/render_frame_host.h"
9 #include "media/mojo/interfaces/output_protection.mojom.h" 9 #include "media/mojo/interfaces/output_protection.mojom.h"
10 #include "mojo/public/cpp/bindings/strong_binding.h"
11 10
12 // Implements media::mojom::OutputProtection to check display links and 11 // Implements media::mojom::OutputProtection to check display links and
13 // their statuses. On all platforms we'll check the network links. On ChromeOS 12 // their statuses. On all platforms we'll check the network links. On ChromeOS
14 // we'll also check the hardware links. Can only be used on the UI thread. 13 // we'll also check the hardware links. Can only be used on the UI thread.
15 class OutputProtectionImpl : public media::mojom::OutputProtection { 14 class OutputProtectionImpl : public media::mojom::OutputProtection {
16 public: 15 public:
17 static void Create( 16 static void Create(
18 content::RenderFrameHost* render_frame_host, 17 content::RenderFrameHost* render_frame_host,
19 mojo::InterfaceRequest<media::mojom::OutputProtection> request); 18 mojo::InterfaceRequest<media::mojom::OutputProtection> request);
20 19
21 OutputProtectionImpl(content::RenderFrameHost* render_frame_host, 20 explicit OutputProtectionImpl(content::RenderFrameHost* render_frame_host);
22 mojo::InterfaceRequest<OutputProtection> request);
23 ~OutputProtectionImpl() final; 21 ~OutputProtectionImpl() final;
24 22
25 // media::mojom::OutputProtection implementation. 23 // media::mojom::OutputProtection implementation.
26 void QueryStatus(const QueryStatusCallback& callback) final; 24 void QueryStatus(const QueryStatusCallback& callback) final;
27 void EnableProtection(uint32_t desired_protection_mask, 25 void EnableProtection(uint32_t desired_protection_mask,
28 const EnableProtectionCallback& callback) final; 26 const EnableProtectionCallback& callback) final;
29 27
30 private: 28 private:
31 mojo::StrongBinding<media::mojom::OutputProtection> binding_;
32
33 content::RenderFrameHost* const render_frame_host_; 29 content::RenderFrameHost* const render_frame_host_;
34 30
35 base::WeakPtrFactory<OutputProtectionImpl> weak_factory_; 31 base::WeakPtrFactory<OutputProtectionImpl> weak_factory_;
36 }; 32 };
37 33
38 #endif // CHROME_BROWSER_MEDIA_OUTPUT_PROTECTION_IMPL_H_ 34 #endif // CHROME_BROWSER_MEDIA_OUTPUT_PROTECTION_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/attestation/platform_verification_impl.cc ('k') | chrome/browser/media/output_protection_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698