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

Unified Diff: ui/display/chromeos/apply_content_protection_task.h

Issue 2540313002: Split //ui/display and create //ui/display/manager. (Closed)
Patch Set: Cleanup export header. Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/display/chromeos/DEPS ('k') | ui/display/chromeos/apply_content_protection_task.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/chromeos/apply_content_protection_task.h
diff --git a/ui/display/chromeos/apply_content_protection_task.h b/ui/display/chromeos/apply_content_protection_task.h
deleted file mode 100644
index 9d3df157b39f65631f8e0553c09ef76960bd1dff..0000000000000000000000000000000000000000
--- a/ui/display/chromeos/apply_content_protection_task.h
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_DISPLAY_CHROMEOS_APPLY_CONTENT_PROTECTION_TASK_H_
-#define UI_DISPLAY_CHROMEOS_APPLY_CONTENT_PROTECTION_TASK_H_
-
-#include <stddef.h>
-#include <stdint.h>
-
-#include <map>
-#include <vector>
-
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "ui/display/chromeos/display_configurator.h"
-
-namespace ui {
-
-class DisplayLayoutManager;
-class NativeDisplayDelegate;
-
-// In order to apply content protection the task executes in the following
-// manner:
-// 1) Run()
-// a) Query NativeDisplayDelegate for HDCP state on capable displays
-// b) OnHDCPStateUpdate() called for each display as response to (a)
-// 2) ApplyProtections()
-// a) Compute preferred HDCP state for capable displays
-// b) Call into NativeDisplayDelegate to set HDCP state on capable displays
-// c) OnHDCPStateApplied() called for each display as reponse to (b)
-// 3) Call |callback_| to signal end of task.
-//
-// Note, in steps 1a and 2a, if no HDCP capable displays are found or if errors
-// are reported, the task finishes early and skips to step 3.
-class DISPLAY_EXPORT ApplyContentProtectionTask {
- public:
- typedef base::Callback<void(bool)> ResponseCallback;
-
- ApplyContentProtectionTask(
- DisplayLayoutManager* layout_manager,
- NativeDisplayDelegate* native_display_delegate,
- const DisplayConfigurator::ContentProtections& requests,
- const ResponseCallback& callback);
- ~ApplyContentProtectionTask();
-
- void Run();
-
- private:
- // Callback to NatvieDisplayDelegate::GetHDCPState()
- void OnHDCPStateUpdate(int64_t display_id, bool success, HDCPState state);
-
- // Callback to NativeDisplayDelegate::SetHDCPState()
- void OnHDCPStateApplied(bool success);
-
- void ApplyProtections();
-
- uint32_t GetDesiredProtectionMask(int64_t display_id) const;
-
- DisplayLayoutManager* layout_manager_; // Not owned.
-
- NativeDisplayDelegate* native_display_delegate_; // Not owned.
-
- DisplayConfigurator::ContentProtections requests_;
-
- // Callback used to respond once the task finishes.
- ResponseCallback callback_;
-
- // Mapping between display IDs and the HDCP state returned by
- // NativeDisplayDelegate.
- std::map<int64_t, HDCPState> display_hdcp_state_map_;
-
- // Tracks the status of the NativeDisplayDelegate responses. This will be true
- // if all the queries were successful, false otherwise.
- bool query_status_;
-
- // Tracks the number of NativeDisplayDelegate requests sent but not answered
- // yet.
- size_t pending_requests_;
-
- base::WeakPtrFactory<ApplyContentProtectionTask> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(ApplyContentProtectionTask);
-};
-
-} // namespace ui
-
-#endif // UI_DISPLAY_CHROMEOS_APPLY_CONTENT_PROTECTION_TASK_H_
« no previous file with comments | « ui/display/chromeos/DEPS ('k') | ui/display/chromeos/apply_content_protection_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698