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

Side by Side Diff: ui/ozone/platform/dri/native_display_delegate_proxy.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_PROXY_H_
6 #define UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_PROXY_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_vector.h"
10 #include "base/observer_list.h"
11 #include "ui/display/types/native_display_delegate.h"
12 #include "ui/events/ozone/device/device_event_observer.h"
13 #include "ui/ozone/public/gpu_platform_support_host.h"
14
15 namespace ui {
16
17 class DeviceManager;
18 class DriGpuPlatformSupportHost;
19
20 struct DisplaySnapshot_Params;
21
22 class NativeDisplayDelegateProxy : public NativeDisplayDelegate,
23 public DeviceEventObserver,
24 public GpuPlatformSupportHost {
25 public:
26 NativeDisplayDelegateProxy(DriGpuPlatformSupportHost* proxy,
27 DeviceManager* device_manager);
28 virtual ~NativeDisplayDelegateProxy();
29
30 // NativeDisplayDelegate overrides:
31 virtual void Initialize() override;
32 virtual void GrabServer() override;
33 virtual void UngrabServer() override;
34 virtual void SyncWithServer() override;
35 virtual void SetBackgroundColor(uint32_t color_argb) override;
36 virtual void ForceDPMSOn() override;
37 virtual std::vector<DisplaySnapshot*> GetDisplays() override;
38 virtual void AddMode(const DisplaySnapshot& output,
39 const DisplayMode* mode) override;
40 virtual bool Configure(const DisplaySnapshot& output,
41 const DisplayMode* mode,
42 const gfx::Point& origin) override;
43 virtual void CreateFrameBuffer(const gfx::Size& size) override;
44 virtual bool GetHDCPState(const DisplaySnapshot& output,
45 HDCPState* state) override;
46 virtual bool SetHDCPState(const DisplaySnapshot& output,
47 HDCPState state) override;
48 virtual std::vector<ColorCalibrationProfile>
49 GetAvailableColorCalibrationProfiles(
50 const DisplaySnapshot& output) override;
51 virtual bool SetColorCalibrationProfile(
52 const DisplaySnapshot& output,
53 ColorCalibrationProfile new_profile) override;
54 virtual void AddObserver(NativeDisplayObserver* observer) override;
55 virtual void RemoveObserver(NativeDisplayObserver* observer) override;
56
57 // DeviceEventObserver overrides:
58 virtual void OnDeviceEvent(const DeviceEvent& event) override;
59
60 // GpuPlatformSupportHost:
61 virtual void OnChannelEstablished(int host_id, IPC::Sender* sender) override;
62 virtual void OnChannelDestroyed(int host_id) override;
63
64 // IPC::Listener overrides:
65 virtual bool OnMessageReceived(const IPC::Message& message) override;
66
67 private:
68 void OnUpdateNativeDisplays(
69 const std::vector<DisplaySnapshot_Params>& displays);
70
71 DriGpuPlatformSupportHost* proxy_; // Not owned.
72 DeviceManager* device_manager_; // Not owned.
73 ScopedVector<DisplaySnapshot> displays_;
74 ObserverList<NativeDisplayObserver> observers_;
75
76 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateProxy);
77 };
78
79 } // namespace ui
80
81 #endif // UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_PROXY_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/native_display_delegate_dri.cc ('k') | ui/ozone/platform/dri/native_display_delegate_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698