This source file includes following definitions.
- SetInfo
- UpdateDisplayUnitInfoForPlatform
#include "chrome/browser/extensions/api/system_display/display_info_provider.h"
#include <gdk/gdk.h>
#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
namespace extensions {
bool DisplayInfoProvider::SetInfo(const std::string& display_id,
const api::system_display::DisplayProperties& info,
std::string* error) {
*error = "Not Implemented";
return false;
}
void DisplayInfoProvider::UpdateDisplayUnitInfoForPlatform(
const gfx::Display& display,
extensions::api::system_display::DisplayUnitInfo* unit) {
GdkScreen* screen = gdk_screen_get_default();
gint monitor_num = static_cast<gint>(display.id());
char* monitor_name = reinterpret_cast<char*>(gdk_screen_get_monitor_plug_name(
screen, monitor_num));
if (monitor_name)
unit->name = std::string(monitor_name);
}
}