| Index: chrome/browser/chromeos/display/output_protection_delegate.h
|
| diff --git a/chrome/browser/chromeos/display/output_protection_delegate.h b/chrome/browser/chromeos/display/output_protection_delegate.h
|
| index 2300c8fa538a57b8937b5b6fcf7c9314a875fc60..bbeb7ee911bb616a7e0e0fc801afa4c9558d4b08 100644
|
| --- a/chrome/browser/chromeos/display/output_protection_delegate.h
|
| +++ b/chrome/browser/chromeos/display/output_protection_delegate.h
|
| @@ -7,10 +7,12 @@
|
|
|
| #include <stdint.h>
|
|
|
| +#include <memory>
|
| +
|
| +#include "base/macros.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/aura/window_observer.h"
|
| -#include "ui/display/manager/chromeos/display_configurator.h"
|
|
|
| namespace chromeos {
|
|
|
| @@ -36,14 +38,23 @@ class OutputProtectionDelegate : public aura::WindowObserver {
|
| void EnableProtection(uint32_t desired_method_mask,
|
| const EnableProtectionCallback& callback);
|
|
|
| - private:
|
| - display::DisplayConfigurator::ContentProtectionClientId GetClientId();
|
| + // Display content protection controller interface.
|
| + class Controller {
|
| + public:
|
| + Controller();
|
| + virtual ~Controller();
|
| + virtual void QueryStatus(int64_t display_id,
|
| + const QueryStatusCallback& callback) = 0;
|
| + virtual void EnableProtection(int64_t display_id,
|
| + uint32_t desired_method_mask,
|
| + const EnableProtectionCallback& callback) = 0;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(Controller);
|
| + };
|
|
|
| - void QueryStatusComplete(
|
| - const QueryStatusCallback& callback,
|
| - const display::DisplayConfigurator::QueryProtectionResponse& response);
|
| - void EnableProtectionComplete(const EnableProtectionCallback& callback,
|
| - bool success);
|
| + private:
|
| + bool InitializeControllerIfNecessary();
|
|
|
| // Used to lookup the WebContents associated with the render frame.
|
| int render_process_id_;
|
| @@ -52,8 +63,6 @@ class OutputProtectionDelegate : public aura::WindowObserver {
|
| // Native window being observed.
|
| aura::Window* window_;
|
|
|
| - display::DisplayConfigurator::ContentProtectionClientId client_id_;
|
| -
|
| // The display id which the renderer currently uses.
|
| int64_t display_id_;
|
|
|
| @@ -61,7 +70,12 @@ class OutputProtectionDelegate : public aura::WindowObserver {
|
| // renderer changes display.
|
| uint32_t desired_method_mask_;
|
|
|
| + // The display content protection controller.
|
| + std::unique_ptr<Controller> controller_;
|
| +
|
| base::WeakPtrFactory<OutputProtectionDelegate> weak_ptr_factory_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(OutputProtectionDelegate);
|
| };
|
|
|
| } // namespace chromeos
|
|
|