| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ |
| 6 #define CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ | 6 #define CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // handling via PermissionQueueController. | 21 // handling via PermissionQueueController. |
| 22 class ProtectedMediaIdentifierPermissionContext | 22 class ProtectedMediaIdentifierPermissionContext |
| 23 : public base::RefCountedThreadSafe< | 23 : public base::RefCountedThreadSafe< |
| 24 ProtectedMediaIdentifierPermissionContext> { | 24 ProtectedMediaIdentifierPermissionContext> { |
| 25 public: | 25 public: |
| 26 explicit ProtectedMediaIdentifierPermissionContext(Profile* profile); | 26 explicit ProtectedMediaIdentifierPermissionContext(Profile* profile); |
| 27 | 27 |
| 28 void RequestProtectedMediaIdentifierPermission( | 28 void RequestProtectedMediaIdentifierPermission( |
| 29 int render_process_id, | 29 int render_process_id, |
| 30 int render_view_id, | 30 int render_view_id, |
| 31 int bridge_id, |
| 31 const GURL& requesting_frame, | 32 const GURL& requesting_frame, |
| 32 const base::Callback<void(bool)>& callback); | 33 const base::Callback<void(bool)>& callback); |
| 33 void CancelProtectedMediaIdentifierPermissionRequest( | 34 void CancelProtectedMediaIdentifierPermissionRequest( |
| 34 int render_process_id, | 35 int render_process_id, |
| 35 int render_view_id, | 36 int render_view_id, |
| 37 int bridge_id, |
| 36 const GURL& requesting_frame); | 38 const GURL& requesting_frame); |
| 37 | 39 |
| 38 // Called on the UI thread when the profile is about to be destroyed. | 40 // Called on the UI thread when the profile is about to be destroyed. |
| 39 void ShutdownOnUIThread(); | 41 void ShutdownOnUIThread(); |
| 40 | 42 |
| 41 private: | 43 private: |
| 42 friend class base::RefCountedThreadSafe< | 44 friend class base::RefCountedThreadSafe< |
| 43 ProtectedMediaIdentifierPermissionContext>; | 45 ProtectedMediaIdentifierPermissionContext>; |
| 44 ~ProtectedMediaIdentifierPermissionContext(); | 46 ~ProtectedMediaIdentifierPermissionContext(); |
| 45 | 47 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 88 |
| 87 // These must only be accessed from the UI thread. | 89 // These must only be accessed from the UI thread. |
| 88 Profile* const profile_; | 90 Profile* const profile_; |
| 89 bool shutting_down_; | 91 bool shutting_down_; |
| 90 scoped_ptr<PermissionQueueController> permission_queue_controller_; | 92 scoped_ptr<PermissionQueueController> permission_queue_controller_; |
| 91 | 93 |
| 92 DISALLOW_COPY_AND_ASSIGN(ProtectedMediaIdentifierPermissionContext); | 94 DISALLOW_COPY_AND_ASSIGN(ProtectedMediaIdentifierPermissionContext); |
| 93 }; | 95 }; |
| 94 | 96 |
| 95 #endif // CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ | 97 #endif // CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ |
| OLD | NEW |