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

Side by Side Diff: ui/display/chromeos/test/test_native_display_delegate.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_DISPLAY_CHROMEOS_TEST_TEST_NATIVE_DISPLAY_DELEGATE_H_ 5 #ifndef UI_DISPLAY_CHROMEOS_TEST_TEST_NATIVE_DISPLAY_DELEGATE_H_
6 #define UI_DISPLAY_CHROMEOS_TEST_TEST_NATIVE_DISPLAY_DELEGATE_H_ 6 #define UI_DISPLAY_CHROMEOS_TEST_TEST_NATIVE_DISPLAY_DELEGATE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 30 matching lines...) Expand all
41 41
42 // NativeDisplayDelegate overrides: 42 // NativeDisplayDelegate overrides:
43 void Initialize() override; 43 void Initialize() override;
44 void GrabServer() override; 44 void GrabServer() override;
45 void UngrabServer() override; 45 void UngrabServer() override;
46 bool TakeDisplayControl() override; 46 bool TakeDisplayControl() override;
47 bool RelinquishDisplayControl() override; 47 bool RelinquishDisplayControl() override;
48 void SyncWithServer() override; 48 void SyncWithServer() override;
49 void SetBackgroundColor(uint32_t color_argb) override; 49 void SetBackgroundColor(uint32_t color_argb) override;
50 void ForceDPMSOn() override; 50 void ForceDPMSOn() override;
51 std::vector<DisplaySnapshot*> GetDisplays() override;
52 void GetDisplays(const GetDisplaysCallback& callback) override; 51 void GetDisplays(const GetDisplaysCallback& callback) override;
53 void AddMode(const DisplaySnapshot& output, const DisplayMode* mode) override; 52 void AddMode(const DisplaySnapshot& output, const DisplayMode* mode) override;
54 bool Configure(const DisplaySnapshot& output,
55 const DisplayMode* mode,
56 const gfx::Point& origin) override;
57 void Configure(const DisplaySnapshot& output, 53 void Configure(const DisplaySnapshot& output,
58 const DisplayMode* mode, 54 const DisplayMode* mode,
59 const gfx::Point& origin, 55 const gfx::Point& origin,
60 const ConfigureCallback& callback) override; 56 const ConfigureCallback& callback) override;
61 void CreateFrameBuffer(const gfx::Size& size) override; 57 void CreateFrameBuffer(const gfx::Size& size) override;
62 bool GetHDCPState(const DisplaySnapshot& output, HDCPState* state) override; 58 bool GetHDCPState(const DisplaySnapshot& output, HDCPState* state) override;
63 bool SetHDCPState(const DisplaySnapshot& output, HDCPState state) override; 59 bool SetHDCPState(const DisplaySnapshot& output, HDCPState state) override;
64 std::vector<ui::ColorCalibrationProfile> GetAvailableColorCalibrationProfiles( 60 std::vector<ui::ColorCalibrationProfile> GetAvailableColorCalibrationProfiles(
65 const DisplaySnapshot& output) override; 61 const DisplaySnapshot& output) override;
66 bool SetColorCalibrationProfile( 62 bool SetColorCalibrationProfile(
67 const DisplaySnapshot& output, 63 const DisplaySnapshot& output,
68 ui::ColorCalibrationProfile new_profile) override; 64 ui::ColorCalibrationProfile new_profile) override;
69 void AddObserver(NativeDisplayObserver* observer) override; 65 void AddObserver(NativeDisplayObserver* observer) override;
70 void RemoveObserver(NativeDisplayObserver* observer) override; 66 void RemoveObserver(NativeDisplayObserver* observer) override;
71 67
72 private: 68 private:
69 bool Configure(const DisplaySnapshot& output,
70 const DisplayMode* mode,
71 const gfx::Point& origin);
72
73 // Outputs to be returned by GetDisplays(). 73 // Outputs to be returned by GetDisplays().
74 std::vector<DisplaySnapshot*> outputs_; 74 std::vector<DisplaySnapshot*> outputs_;
75 75
76 // |max_configurable_pixels_| represents the maximum number of pixels that 76 // |max_configurable_pixels_| represents the maximum number of pixels that
77 // Configure will support. Tests can use this to force Configure 77 // Configure will support. Tests can use this to force Configure
78 // to fail if attempting to set a resolution that is higher than what 78 // to fail if attempting to set a resolution that is higher than what
79 // a device might support under a given circumstance. 79 // a device might support under a given circumstance.
80 // A value of 0 means that no limit is enforced and Configure will 80 // A value of 0 means that no limit is enforced and Configure will
81 // return success regardless of the resolution. 81 // return success regardless of the resolution.
82 int max_configurable_pixels_; 82 int max_configurable_pixels_;
83 83
84 // Result value of GetHDCPState(). 84 // Result value of GetHDCPState().
85 HDCPState hdcp_state_; 85 HDCPState hdcp_state_;
86 86
87 // If true, the callbacks are posted on the message loop. 87 // If true, the callbacks are posted on the message loop.
88 bool run_async_; 88 bool run_async_;
89 89
90 ActionLogger* log_; // Not owned. 90 ActionLogger* log_; // Not owned.
91 91
92 DISALLOW_COPY_AND_ASSIGN(TestNativeDisplayDelegate); 92 DISALLOW_COPY_AND_ASSIGN(TestNativeDisplayDelegate);
93 }; 93 };
94 94
95 } // namespace test 95 } // namespace test
96 } // namespace ui 96 } // namespace ui
97 97
98 #endif // UI_DISPLAY_CHROMEOS_TEST_TEST_NATIVE_DISPLAY_DELEGATE_H_ 98 #endif // UI_DISPLAY_CHROMEOS_TEST_TEST_NATIVE_DISPLAY_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/display/chromeos/display_configurator_unittest.cc ('k') | ui/display/chromeos/test/test_native_display_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698