| 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 "ui/display/manager/chromeos/query_content_protection_task.h" | 5 #include "ui/display/manager/chromeos/query_content_protection_task.h" |
| 6 | 6 |
| 7 #include "ui/display/manager/chromeos/display_layout_manager.h" | 7 #include "ui/display/manager/chromeos/display_layout_manager.h" |
| 8 #include "ui/display/types/display_snapshot.h" | 8 #include "ui/display/types/display_snapshot.h" |
| 9 #include "ui/display/types/native_display_delegate.h" | 9 #include "ui/display/types/native_display_delegate.h" |
| 10 | 10 |
| 11 namespace ui { | 11 namespace display { |
| 12 | 12 |
| 13 QueryContentProtectionTask::QueryContentProtectionTask( | 13 QueryContentProtectionTask::QueryContentProtectionTask( |
| 14 DisplayLayoutManager* layout_manager, | 14 DisplayLayoutManager* layout_manager, |
| 15 NativeDisplayDelegate* native_display_delegate, | 15 NativeDisplayDelegate* native_display_delegate, |
| 16 int64_t display_id, | 16 int64_t display_id, |
| 17 const ResponseCallback& callback) | 17 const ResponseCallback& callback) |
| 18 : layout_manager_(layout_manager), | 18 : layout_manager_(layout_manager), |
| 19 native_display_delegate_(native_display_delegate), | 19 native_display_delegate_(native_display_delegate), |
| 20 display_id_(display_id), | 20 display_id_(display_id), |
| 21 callback_(callback), | 21 callback_(callback), |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 response_.unfulfilled |= CONTENT_PROTECTION_METHOD_HDCP; | 76 response_.unfulfilled |= CONTENT_PROTECTION_METHOD_HDCP; |
| 77 | 77 |
| 78 pending_requests_--; | 78 pending_requests_--; |
| 79 // Wait for all the requests to finish before invoking the callback. | 79 // Wait for all the requests to finish before invoking the callback. |
| 80 if (pending_requests_ != 0) | 80 if (pending_requests_ != 0) |
| 81 return; | 81 return; |
| 82 | 82 |
| 83 callback_.Run(response_); | 83 callback_.Run(response_); |
| 84 } | 84 } |
| 85 | 85 |
| 86 } // namespace ui | 86 } // namespace display |
| OLD | NEW |