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

Unified Diff: ui/gfx/display.h

Issue 10826198: Use persistent ID/names for displays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove persistent_id() and change id() to int64 Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: ui/gfx/display.h
diff --git a/ui/gfx/display.h b/ui/gfx/display.h
index 1cbb9afefd676df56372840eb978952ce665eb40..d75691d0058184e3ac4f707441fca7cb21925486 100644
--- a/ui/gfx/display.h
+++ b/ui/gfx/display.h
@@ -22,16 +22,20 @@ class UI_EXPORT Display {
// "--force-device-scale-factor".
static float GetForcedDeviceScaleFactor();
+ // Returns 64-bit persistent ID for the specified manufacturer's ID and
+ // serial#.
+ static int64 GetID(uint16 manufacturer_id, uint32 serial_number);
+
// Creates a display with invalid id(-1) as default.
Display();
- explicit Display(int id);
- Display(int id, const Rect& bounds);
+ explicit Display(int64 id);
+ Display(int64 id, const Rect& bounds);
~Display();
// Sets/Gets unique identifier associated with the display.
// -1 means invalid display and it doesn't not exit.
- int id() const { return id_; }
- void set_id(int id) { id_ = id; }
+ int64 id() const { return id_; }
+ void set_id(int64 id) { id_ = id; }
// Gets/Sets the display's bounds in gfx::Screen's coordinates.
const Rect& bounds() const { return bounds_; }
@@ -84,7 +88,7 @@ class UI_EXPORT Display {
std::string ToString() const;
private:
- int id_;
+ int64 id_;
Rect bounds_;
Rect work_area_;
#if defined(USE_AURA)
« ui/base/x/x11_util.cc ('K') | « ui/base/x/x11_util.cc ('k') | ui/gfx/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698