Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / display / util / edid_parser.h
blob385abe99f7a1404638d9f4a7145a619aa8e26545
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 and product id for the pair of |edid| and |index|,
25 // and store in |display_id_out| and |product_id_out|. Returns true if the
26 // display id is successfully generated, 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,
30 int64_t* product_id_out);
32 // Parses |edid| as EDID data and stores extracted data into |manufacturer_id|,
33 // |product_code|, |human_readable_name|, |active_pixel_out| and
34 // |physical_display_size_out|, then returns true. nullptr can be passed for
35 // unwanted output parameters. Some devices (especially internal displays) may
36 // not have the field for |human_readable_name|, and it will return true in
37 // that case.
38 DISPLAY_UTIL_EXPORT bool ParseOutputDeviceData(
39 const std::vector<uint8_t>& edid,
40 uint16_t* manufacturer_id,
41 uint16_t* product_code,
42 std::string* human_readable_name,
43 gfx::Size* active_pixel_out,
44 gfx::Size* physical_display_size_out);
46 DISPLAY_UTIL_EXPORT bool ParseOutputOverscanFlag(
47 const std::vector<uint8_t>& edid,
48 bool* flag);
50 } // namespace ui
52 #endif // UI_DISPLAY_UTIL_EDID_PARSER_H_