OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/media/media_permission_dispatcher_proxy.h" | 5 #include "content/renderer/media/media_permission_dispatcher_proxy.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
9 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/macros.h" |
10 #include "base/thread_task_runner_handle.h" | 13 #include "base/thread_task_runner_handle.h" |
11 #include "url/gurl.h" | 14 #include "url/gurl.h" |
12 | 15 |
13 namespace content { | 16 namespace content { |
14 | 17 |
15 class MediaPermissionDispatcherProxy::Core { | 18 class MediaPermissionDispatcherProxy::Core { |
16 public: | 19 public: |
17 Core(scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 20 Core(scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
18 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 21 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
19 base::WeakPtr<MediaPermissionDispatcher> parent, | 22 base::WeakPtr<MediaPermissionDispatcher> parent, |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 const PermissionStatusCB& permission_status_cb) { | 152 const PermissionStatusCB& permission_status_cb) { |
150 DCHECK(core_->caller_task_runner()->BelongsToCurrentThread()); | 153 DCHECK(core_->caller_task_runner()->BelongsToCurrentThread()); |
151 | 154 |
152 core_->ui_task_runner()->PostTask( | 155 core_->ui_task_runner()->PostTask( |
153 FROM_HERE, | 156 FROM_HERE, |
154 base::Bind(&Core::RequestPermission, core_->GetWeakPtr(), type, | 157 base::Bind(&Core::RequestPermission, core_->GetWeakPtr(), type, |
155 security_origin, RegisterCallback(permission_status_cb))); | 158 security_origin, RegisterCallback(permission_status_cb))); |
156 } | 159 } |
157 | 160 |
158 } // namespace content | 161 } // namespace content |
OLD | NEW |