summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authordnicoara <dnicoara@chromium.org>2015-04-23 13:23:13 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-23 20:23:22 +0000
commitf6f2ab81abb91a355ff11bdb08779331aa80e301 (patch)
tree2698b580f2f4f9e5538b06ea1ba6a6f3bd9893a2 /ui
parenta0804e2196ecc3ce4be9059f1b69b3301e66183c (diff)
downloadchromium_src-f6f2ab81abb91a355ff11bdb08779331aa80e301.zip
chromium_src-f6f2ab81abb91a355ff11bdb08779331aa80e301.tar.gz
chromium_src-f6f2ab81abb91a355ff11bdb08779331aa80e301.tar.bz2
Remove non-async content protection entry points in NativeDisplayDelegate
Now that all the asynchronous content protection is implemented, remove the old entry points. BUG=442317 Review URL: https://codereview.chromium.org/1010743006 Cr-Commit-Position: refs/heads/master@{#326627}
Diffstat (limited to 'ui')
-rw-r--r--ui/display/chromeos/test/test_native_display_delegate.cc12
-rw-r--r--ui/display/chromeos/test/test_native_display_delegate.h2
-rw-r--r--ui/display/chromeos/x11/native_display_delegate_x11.h6
-rw-r--r--ui/display/types/native_display_delegate.h8
-rw-r--r--ui/ozone/common/native_display_delegate_ozone.cc12
-rw-r--r--ui/ozone/common/native_display_delegate_ozone.h2
-rw-r--r--ui/ozone/platform/drm/host/drm_native_display_delegate.cc12
-rw-r--r--ui/ozone/platform/drm/host/drm_native_display_delegate.h2
8 files changed, 8 insertions, 48 deletions
diff --git a/ui/display/chromeos/test/test_native_display_delegate.cc b/ui/display/chromeos/test/test_native_display_delegate.cc
index 5533961..f1b0101 100644
--- a/ui/display/chromeos/test/test_native_display_delegate.cc
+++ b/ui/display/chromeos/test/test_native_display_delegate.cc
@@ -106,24 +106,12 @@ void TestNativeDisplayDelegate::CreateFrameBuffer(const gfx::Size& size) {
outputs_.size() >= 2 ? outputs_[1] : NULL));
}
-bool TestNativeDisplayDelegate::GetHDCPState(const DisplaySnapshot& output,
- HDCPState* state) {
- *state = hdcp_state_;
- return get_hdcp_expectation_;
-}
-
void TestNativeDisplayDelegate::GetHDCPState(
const DisplaySnapshot& output,
const GetHDCPStateCallback& callback) {
callback.Run(get_hdcp_expectation_, hdcp_state_);
}
-bool TestNativeDisplayDelegate::SetHDCPState(const DisplaySnapshot& output,
- HDCPState state) {
- log_->AppendAction(GetSetHDCPStateAction(output, state));
- return set_hdcp_expectation_;
-}
-
void TestNativeDisplayDelegate::SetHDCPState(
const DisplaySnapshot& output,
HDCPState state,
diff --git a/ui/display/chromeos/test/test_native_display_delegate.h b/ui/display/chromeos/test/test_native_display_delegate.h
index a3ed4c6..f9e1767 100644
--- a/ui/display/chromeos/test/test_native_display_delegate.h
+++ b/ui/display/chromeos/test/test_native_display_delegate.h
@@ -63,8 +63,6 @@ class TestNativeDisplayDelegate : public NativeDisplayDelegate {
const gfx::Point& origin,
const ConfigureCallback& callback) override;
void CreateFrameBuffer(const gfx::Size& size) override;
- bool GetHDCPState(const DisplaySnapshot& output, HDCPState* state) override;
- bool SetHDCPState(const DisplaySnapshot& output, HDCPState state) override;
void GetHDCPState(const DisplaySnapshot& output,
const GetHDCPStateCallback& callback) override;
void SetHDCPState(const DisplaySnapshot& output,
diff --git a/ui/display/chromeos/x11/native_display_delegate_x11.h b/ui/display/chromeos/x11/native_display_delegate_x11.h
index 036a121..5d49435 100644
--- a/ui/display/chromeos/x11/native_display_delegate_x11.h
+++ b/ui/display/chromeos/x11/native_display_delegate_x11.h
@@ -86,8 +86,6 @@ class DISPLAY_EXPORT NativeDisplayDelegateX11 : public NativeDisplayDelegate {
const gfx::Point& origin,
const ConfigureCallback& callback) override;
void CreateFrameBuffer(const gfx::Size& size) override;
- bool GetHDCPState(const DisplaySnapshot& output, HDCPState* state) override;
- bool SetHDCPState(const DisplaySnapshot& output, HDCPState state) override;
void GetHDCPState(const DisplaySnapshot& output,
const GetHDCPStateCallback& callback) override;
void SetHDCPState(const DisplaySnapshot& output,
@@ -124,6 +122,10 @@ class DISPLAY_EXPORT NativeDisplayDelegateX11 : public NativeDisplayDelegate {
bool ConfigureCrtc(RRCrtc crtc, RRMode mode, RROutput output, int x, int y);
+ // Helper functions that perform the actual HDCP requests.
+ bool GetHDCPState(const DisplaySnapshot& output, HDCPState* state);
+ bool SetHDCPState(const DisplaySnapshot& output, HDCPState state);
+
// Returns whether |id| is configured to preserve aspect when scaling.
bool IsOutputAspectPreservingScaling(RROutput id);
diff --git a/ui/display/types/native_display_delegate.h b/ui/display/types/native_display_delegate.h
index aff8feb..98aef26 100644
--- a/ui/display/types/native_display_delegate.h
+++ b/ui/display/types/native_display_delegate.h
@@ -32,6 +32,10 @@ typedef base::Callback<void(bool)> SetHDCPStateCallback;
// Interface for classes that perform display configuration actions on behalf
// of DisplayConfigurator.
+// Implementations may perform calls asynchronously. In the case of functions
+// taking callbacks, the callbacks may be called asynchronously when the results
+// are available. The implementations must provide a strong guarantee that the
+// callbacks are always called.
class DISPLAY_TYPES_EXPORT NativeDisplayDelegate {
public:
virtual ~NativeDisplayDelegate() {}
@@ -81,14 +85,10 @@ class DISPLAY_TYPES_EXPORT NativeDisplayDelegate {
virtual void CreateFrameBuffer(const gfx::Size& size) = 0;
// Gets HDCP state of output.
- virtual bool GetHDCPState(const ui::DisplaySnapshot& output,
- ui::HDCPState* state) = 0;
virtual void GetHDCPState(const ui::DisplaySnapshot& output,
const GetHDCPStateCallback& callback) = 0;
// Sets HDCP state of output.
- virtual bool SetHDCPState(const ui::DisplaySnapshot& output,
- ui::HDCPState state) = 0;
virtual void SetHDCPState(const ui::DisplaySnapshot& output,
ui::HDCPState state,
const SetHDCPStateCallback& callback) = 0;
diff --git a/ui/ozone/common/native_display_delegate_ozone.cc b/ui/ozone/common/native_display_delegate_ozone.cc
index 0aa8e33..d85b641 100644
--- a/ui/ozone/common/native_display_delegate_ozone.cc
+++ b/ui/ozone/common/native_display_delegate_ozone.cc
@@ -76,18 +76,6 @@ void NativeDisplayDelegateOzone::CreateFrameBuffer(const gfx::Size& size) {
NOTIMPLEMENTED();
}
-bool NativeDisplayDelegateOzone::GetHDCPState(const DisplaySnapshot& output,
- HDCPState* state) {
- NOTIMPLEMENTED();
- return false;
-}
-
-bool NativeDisplayDelegateOzone::SetHDCPState(const DisplaySnapshot& output,
- HDCPState state) {
- NOTIMPLEMENTED();
- return false;
-}
-
void NativeDisplayDelegateOzone::GetHDCPState(
const ui::DisplaySnapshot& output,
const GetHDCPStateCallback& callback) {
diff --git a/ui/ozone/common/native_display_delegate_ozone.h b/ui/ozone/common/native_display_delegate_ozone.h
index a9e17dd..74c8785 100644
--- a/ui/ozone/common/native_display_delegate_ozone.h
+++ b/ui/ozone/common/native_display_delegate_ozone.h
@@ -33,8 +33,6 @@ class NativeDisplayDelegateOzone : public NativeDisplayDelegate {
const gfx::Point& origin,
const ConfigureCallback& callback) override;
void CreateFrameBuffer(const gfx::Size& size) override;
- bool GetHDCPState(const DisplaySnapshot& output, HDCPState* state) override;
- bool SetHDCPState(const DisplaySnapshot& output, HDCPState state) override;
void GetHDCPState(const ui::DisplaySnapshot& output,
const GetHDCPStateCallback& callback) override;
void SetHDCPState(const ui::DisplaySnapshot& output,
diff --git a/ui/ozone/platform/drm/host/drm_native_display_delegate.cc b/ui/ozone/platform/drm/host/drm_native_display_delegate.cc
index 9eb76e0..709ade8 100644
--- a/ui/ozone/platform/drm/host/drm_native_display_delegate.cc
+++ b/ui/ozone/platform/drm/host/drm_native_display_delegate.cc
@@ -184,18 +184,6 @@ void DrmNativeDisplayDelegate::Configure(const DisplaySnapshot& output,
void DrmNativeDisplayDelegate::CreateFrameBuffer(const gfx::Size& size) {
}
-bool DrmNativeDisplayDelegate::GetHDCPState(const DisplaySnapshot& output,
- HDCPState* state) {
- NOTIMPLEMENTED();
- return false;
-}
-
-bool DrmNativeDisplayDelegate::SetHDCPState(const DisplaySnapshot& output,
- HDCPState state) {
- NOTIMPLEMENTED();
- return false;
-}
-
void DrmNativeDisplayDelegate::GetHDCPState(
const DisplaySnapshot& output,
const GetHDCPStateCallback& callback) {
diff --git a/ui/ozone/platform/drm/host/drm_native_display_delegate.h b/ui/ozone/platform/drm/host/drm_native_display_delegate.h
index b6d6063..d28ea68 100644
--- a/ui/ozone/platform/drm/host/drm_native_display_delegate.h
+++ b/ui/ozone/platform/drm/host/drm_native_display_delegate.h
@@ -50,8 +50,6 @@ class DrmNativeDisplayDelegate : public NativeDisplayDelegate,
const gfx::Point& origin,
const ConfigureCallback& callback) override;
void CreateFrameBuffer(const gfx::Size& size) override;
- bool GetHDCPState(const DisplaySnapshot& output, HDCPState* state) override;
- bool SetHDCPState(const DisplaySnapshot& output, HDCPState state) override;
void GetHDCPState(const DisplaySnapshot& output,
const GetHDCPStateCallback& callback) override;
void SetHDCPState(const DisplaySnapshot& output,