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

Unified Diff: ui/ozone/platform/drm/host/drm_display_host.h

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header Created 5 years, 4 months 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/ozone/platform/drm/host/drm_device_handle.cc ('k') | ui/ozone/platform/drm/host/drm_display_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/host/drm_display_host.h
diff --git a/ui/ozone/platform/drm/host/drm_display_host.h b/ui/ozone/platform/drm/host/drm_display_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..b6c09bfaebc844bfa93598ac62a989c70b2f1d87
--- /dev/null
+++ b/ui/ozone/platform/drm/host/drm_display_host.h
@@ -0,0 +1,67 @@
+// 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_OZONE_PLATFORM_DRM_HOST_DRM_DISPLAY_HOST_H_
+#define UI_OZONE_PLATFORM_DRM_HOST_DRM_DISPLAY_HOST_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "ui/display/types/display_constants.h"
+#include "ui/display/types/native_display_delegate.h"
+#include "ui/ozone/platform/drm/host/channel_observer.h"
+
+namespace ui {
+
+struct DisplaySnapshot_Params;
+class DisplaySnapshot;
+class DrmGpuPlatformSupportHost;
+
+class DrmDisplayHost : public ChannelObserver {
+ public:
+ DrmDisplayHost(DrmGpuPlatformSupportHost* sender,
+ const DisplaySnapshot_Params& params,
+ bool is_dummy);
+ ~DrmDisplayHost() override;
+
+ DisplaySnapshot* snapshot() const { return snapshot_.get(); }
+
+ void UpdateDisplaySnapshot(const DisplaySnapshot_Params& params);
+ void Configure(const DisplayMode* mode,
+ const gfx::Point& origin,
+ const ConfigureCallback& callback);
+ void GetHDCPState(const GetHDCPStateCallback& callback);
+ void SetHDCPState(HDCPState state, const SetHDCPStateCallback& callback);
+ void SetGammaRamp(const std::vector<GammaRampRGBEntry>& lut);
+
+ // Called when the IPC from the GPU process arrives to answer the above
+ // commands.
+ void OnDisplayConfigured(bool status);
+ void OnHDCPStateReceived(bool status, HDCPState state);
+ void OnHDCPStateUpdated(bool status);
+
+ // ChannelObserver:
+ void OnChannelEstablished() override;
+ void OnChannelDestroyed() override;
+
+ private:
+ // Calls all the callbacks with failure.
+ void ClearCallbacks();
+
+ DrmGpuPlatformSupportHost* sender_; // Not owned.
+
+ scoped_ptr<DisplaySnapshot> snapshot_;
+
+ // Used during startup to signify that any display configuration should be
+ // synchronous and succeed.
+ bool is_dummy_;
+
+ ConfigureCallback configure_callback_;
+ GetHDCPStateCallback get_hdcp_callback_;
+ SetHDCPStateCallback set_hdcp_callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(DrmDisplayHost);
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PLATFORM_DRM_HOST_DRM_DISPLAY_HOST_H_
« no previous file with comments | « ui/ozone/platform/drm/host/drm_device_handle.cc ('k') | ui/ozone/platform/drm/host/drm_display_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698