Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / ui / display / util / edid_parser.h
blob447a0c80ba327f386ba1d992ce4c5a01f4d83e29
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.
5 #ifndef UI_DISPLAY_UTIL_EDID_PARSER_H_
6 #define UI_DISPLAY_UTIL_EDID_PARSER_H_
8 #include <stdint.h>
10 #include <string>
11 #include <vector>
13 #include "ui/display/util/display_util_export.h"
15 namespace gfx {
16 class Size;
19 // EDID (Extended Display Identification Data) is a format for monitor
20 // metadata. This provides a parser for the data.
22 namespace ui {
24 // Generates the display id for the pair of |edid| and |index|, and store in
25 // |display_id_out|. Returns true if the display id is successfully generated,
26 // or false otherwise.
27 DISPLAY_UTIL_EXPORT bool GetDisplayIdFromEDID(const std::vector<uint8_t>& edid,
28 uint8_t index,
29 int64_t* display_id_out);
31 // Parses |edid| as EDID data and stores extracted data into |manufacturer_id|,
32 // |human_readable_name|, |active_pixel_out| and |physical_display_size_out|,
33 // then returns true. nullptr can be passed for unwanted output parameters.
34 // Some devices (especially internal displays) may not have the field for
35 // |human_readable_name|, and it will return true in that case.
36 DISPLAY_UTIL_EXPORT bool ParseOutputDeviceData(
37 const std::vector<uint8_t>& edid,
38 uint16_t* manufacturer_id,
39 std::string* human_readable_name,
40 gfx::Size* active_pixel_out,
41 gfx::Size* physical_display_size_out);
43 DISPLAY_UTIL_EXPORT bool ParseOutputOverscanFlag(
44 const std::vector<uint8_t>& edid,
45 bool* flag);
47 } // namespace ui
49 #endif // UI_DISPLAY_UTIL_EDID_PARSER_H_