| OLD | NEW |
| (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_DISPLAY_CHROMEOS_TEST_ACTION_LOGGER_UTIL_H_ | |
| 6 #define UI_DISPLAY_CHROMEOS_TEST_ACTION_LOGGER_UTIL_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include <string> | |
| 11 #include <vector> | |
| 12 | |
| 13 #include "ui/display/types/display_constants.h" | |
| 14 | |
| 15 namespace gfx { | |
| 16 class Point; | |
| 17 class Size; | |
| 18 } // namespace gfx | |
| 19 | |
| 20 namespace ui { | |
| 21 | |
| 22 struct GammaRampRGBEntry; | |
| 23 class DisplayMode; | |
| 24 class DisplaySnapshot; | |
| 25 | |
| 26 namespace test { | |
| 27 | |
| 28 // Strings returned by TestNativeDisplayDelegate::GetActionsAndClear() to | |
| 29 // describe various actions that were performed. | |
| 30 const char kInitXRandR[] = "init"; | |
| 31 const char kGrab[] = "grab"; | |
| 32 const char kUngrab[] = "ungrab"; | |
| 33 const char kSync[] = "sync"; | |
| 34 const char kForceDPMS[] = "dpms"; | |
| 35 const char kTakeDisplayControl[] = "take"; | |
| 36 const char kRelinquishDisplayControl[] = "relinquish"; | |
| 37 | |
| 38 // String returned by TestNativeDisplayDelegate::GetActionsAndClear() if no | |
| 39 // actions were requested. | |
| 40 const char kNoActions[] = ""; | |
| 41 | |
| 42 std::string DisplaySnapshotToString(const DisplaySnapshot& output); | |
| 43 | |
| 44 // Returns a string describing a TestNativeDisplayDelegate::SetBackgroundColor() | |
| 45 // call. | |
| 46 std::string GetBackgroundAction(uint32_t color_argb); | |
| 47 | |
| 48 // Returns a string describing a TestNativeDisplayDelegate::AddOutputMode() | |
| 49 // call. | |
| 50 std::string GetAddOutputModeAction(const DisplaySnapshot& output, | |
| 51 const DisplayMode* mode); | |
| 52 | |
| 53 // Returns a string describing a TestNativeDisplayDelegate::Configure() | |
| 54 // call. | |
| 55 std::string GetCrtcAction(const DisplaySnapshot& output, | |
| 56 const DisplayMode* mode, | |
| 57 const gfx::Point& origin); | |
| 58 | |
| 59 // Returns a string describing a TestNativeDisplayDelegate::CreateFramebuffer() | |
| 60 // call. | |
| 61 std::string GetFramebufferAction(const gfx::Size& size, | |
| 62 const DisplaySnapshot* out1, | |
| 63 const DisplaySnapshot* out2); | |
| 64 | |
| 65 // Returns a string describing a TestNativeDisplayDelegate::SetHDCPState() call. | |
| 66 std::string GetSetHDCPStateAction(const DisplaySnapshot& output, | |
| 67 HDCPState state); | |
| 68 | |
| 69 // Returns a string describing a TestNativeDisplayDelegate::SetColorCorrection() | |
| 70 // call; | |
| 71 std::string SetColorCorrectionAction( | |
| 72 const ui::DisplaySnapshot& output, | |
| 73 const std::vector<GammaRampRGBEntry>& degamma_lut, | |
| 74 const std::vector<GammaRampRGBEntry>& gamma_lut, | |
| 75 const std::vector<float>& correction_matrix); | |
| 76 // Joins a sequence of strings describing actions (e.g. kScreenDim) such | |
| 77 // that they can be compared against a string returned by | |
| 78 // ActionLogger::GetActionsAndClear(). The list of actions must be | |
| 79 // terminated by a NULL pointer. | |
| 80 std::string JoinActions(const char* action, ...); | |
| 81 | |
| 82 } // namespace test | |
| 83 } // namespace ui | |
| 84 | |
| 85 #endif // UI_DISPLAY_CHROMEOS_TEST_ACTION_LOGGER_UTIL_H_ | |
| OLD | NEW |