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

Side by Side Diff: ui/ozone/common/native_display_delegate_ozone.h

Issue 796263002: Remove synchronous GetDisplays() and Configure() from NativeDisplayDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@async-refactor5
Patch Set: Removed deprecated calls from TestNativeDisplayDelegate and update the ExternalControl test Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_OZONE_COMMON_NATIVE_DISPLAY_DELEGATE_OZONE_H_ 5 #ifndef UI_OZONE_COMMON_NATIVE_DISPLAY_DELEGATE_OZONE_H_
6 #define UI_OZONE_COMMON_NATIVE_DISPLAY_DELEGATE_OZONE_H_ 6 #define UI_OZONE_COMMON_NATIVE_DISPLAY_DELEGATE_OZONE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "ui/display/types/native_display_delegate.h" 10 #include "ui/display/types/native_display_delegate.h"
11 11
12 namespace ui { 12 namespace ui {
13 13
14 class NativeDisplayDelegateOzone : public NativeDisplayDelegate { 14 class NativeDisplayDelegateOzone : public NativeDisplayDelegate {
15 public: 15 public:
16 NativeDisplayDelegateOzone(); 16 NativeDisplayDelegateOzone();
17 ~NativeDisplayDelegateOzone() override; 17 ~NativeDisplayDelegateOzone() override;
18 18
19 // NativeDisplayDelegate overrides: 19 // NativeDisplayDelegate overrides:
20 void Initialize() override; 20 void Initialize() override;
21 void GrabServer() override; 21 void GrabServer() override;
22 void UngrabServer() override; 22 void UngrabServer() override;
23 bool TakeDisplayControl() override; 23 bool TakeDisplayControl() override;
24 bool RelinquishDisplayControl() override; 24 bool RelinquishDisplayControl() override;
25 void SyncWithServer() override; 25 void SyncWithServer() override;
26 void SetBackgroundColor(uint32_t color_argb) override; 26 void SetBackgroundColor(uint32_t color_argb) override;
27 void ForceDPMSOn() override; 27 void ForceDPMSOn() override;
28 std::vector<ui::DisplaySnapshot*> GetDisplays() override;
29 void GetDisplays(const GetDisplaysCallback& callback) override; 28 void GetDisplays(const GetDisplaysCallback& callback) override;
30 void AddMode(const ui::DisplaySnapshot& output, 29 void AddMode(const ui::DisplaySnapshot& output,
31 const ui::DisplayMode* mode) override; 30 const ui::DisplayMode* mode) override;
32 bool Configure(const ui::DisplaySnapshot& output,
33 const ui::DisplayMode* mode,
34 const gfx::Point& origin) override;
35 void Configure(const ui::DisplaySnapshot& output, 31 void Configure(const ui::DisplaySnapshot& output,
36 const ui::DisplayMode* mode, 32 const ui::DisplayMode* mode,
37 const gfx::Point& origin, 33 const gfx::Point& origin,
38 const ConfigureCallback& callback) override; 34 const ConfigureCallback& callback) override;
39 void CreateFrameBuffer(const gfx::Size& size) override; 35 void CreateFrameBuffer(const gfx::Size& size) override;
40 bool GetHDCPState(const ui::DisplaySnapshot& output, 36 bool GetHDCPState(const ui::DisplaySnapshot& output,
41 ui::HDCPState* state) override; 37 ui::HDCPState* state) override;
42 bool SetHDCPState(const ui::DisplaySnapshot& output, 38 bool SetHDCPState(const ui::DisplaySnapshot& output,
43 ui::HDCPState state) override; 39 ui::HDCPState state) override;
44 std::vector<ui::ColorCalibrationProfile> GetAvailableColorCalibrationProfiles( 40 std::vector<ui::ColorCalibrationProfile> GetAvailableColorCalibrationProfiles(
45 const ui::DisplaySnapshot& output) override; 41 const ui::DisplaySnapshot& output) override;
46 bool SetColorCalibrationProfile( 42 bool SetColorCalibrationProfile(
47 const ui::DisplaySnapshot& output, 43 const ui::DisplaySnapshot& output,
48 ui::ColorCalibrationProfile new_profile) override; 44 ui::ColorCalibrationProfile new_profile) override;
49 void AddObserver(NativeDisplayObserver* observer) override; 45 void AddObserver(NativeDisplayObserver* observer) override;
50 void RemoveObserver(NativeDisplayObserver* observer) override; 46 void RemoveObserver(NativeDisplayObserver* observer) override;
51 47
52 private: 48 private:
53 ScopedVector<DisplaySnapshot> displays_; 49 ScopedVector<DisplaySnapshot> displays_;
54 50
55 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateOzone); 51 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateOzone);
56 }; 52 };
57 53
58 } // namespace ui 54 } // namespace ui
59 55
60 #endif // UI_OZONE_COMMON_NATIVE_DISPLAY_DELEGATE_OZONE_H_ 56 #endif // UI_OZONE_COMMON_NATIVE_DISPLAY_DELEGATE_OZONE_H_
OLDNEW
« no previous file with comments | « ui/display/types/native_display_delegate.h ('k') | ui/ozone/common/native_display_delegate_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698