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

Side by Side Diff: chrome/browser/extensions/api/system_display/display_info_provider_gtk.cc

Issue 231733005: Delete the GTK+ port of Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remerge to ToT Created 6 years, 8 months 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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 #include "chrome/browser/extensions/api/system_display/display_info_provider.h"
6
7 #include <gdk/gdk.h>
8
9 #include "ui/gfx/display.h"
10 #include "ui/gfx/screen.h"
11
12 namespace extensions {
13
14 bool DisplayInfoProvider::SetInfo(const std::string& display_id,
15 const api::system_display::DisplayProperties& info,
16 std::string* error) {
17 *error = "Not Implemented";
18 return false;
19 }
20
21 void DisplayInfoProvider::UpdateDisplayUnitInfoForPlatform(
22 const gfx::Display& display,
23 extensions::api::system_display::DisplayUnitInfo* unit) {
24 // TODO(Haojian): determine the DPI of the display
25 GdkScreen* screen = gdk_screen_get_default();
26 // The |id| in Display for GTK is the monitor index.
27 gint monitor_num = static_cast<gint>(display.id());
28 char* monitor_name = reinterpret_cast<char*>(gdk_screen_get_monitor_plug_name(
29 screen, monitor_num));
30 if (monitor_name)
31 unit->name = std::string(monitor_name);
32 }
33
34 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698