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

Unified Diff: ui/display/manager/display_layout.cc

Issue 2519993002: Move kInvalidDisplayID to display_constants.h. (Closed)
Patch Set: Address comments. Created 4 years, 1 month 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
« no previous file with comments | « ui/display/fake_display_snapshot.cc ('k') | ui/display/manager/display_layout_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/manager/display_layout.cc
diff --git a/ui/display/manager/display_layout.cc b/ui/display/manager/display_layout.cc
index d9edfb7fd0907a5ddca70db1d867237058288f6b..25660de1af10c97f7f99a28c95d5557570c6a1ab 100644
--- a/ui/display/manager/display_layout.cc
+++ b/ui/display/manager/display_layout.cc
@@ -49,15 +49,15 @@ Display* FindDisplayById(Displays* display_list, int64_t id) {
// DisplayPlacement
DisplayPlacement::DisplayPlacement()
- : DisplayPlacement(Display::kInvalidDisplayID,
- Display::kInvalidDisplayID,
+ : DisplayPlacement(kInvalidDisplayId,
+ kInvalidDisplayId,
DisplayPlacement::RIGHT,
0,
DisplayPlacement::TOP_LEFT) {}
DisplayPlacement::DisplayPlacement(Position position, int offset)
- : DisplayPlacement(Display::kInvalidDisplayID,
- Display::kInvalidDisplayID,
+ : DisplayPlacement(kInvalidDisplayId,
+ kInvalidDisplayId,
position,
offset,
DisplayPlacement::TOP_LEFT) {}
@@ -65,8 +65,8 @@ DisplayPlacement::DisplayPlacement(Position position, int offset)
DisplayPlacement::DisplayPlacement(Position position,
int offset,
OffsetReference offset_reference)
- : DisplayPlacement(Display::kInvalidDisplayID,
- Display::kInvalidDisplayID,
+ : DisplayPlacement(kInvalidDisplayId,
+ kInvalidDisplayId,
position,
offset,
offset_reference) {}
@@ -120,9 +120,9 @@ DisplayPlacement& DisplayPlacement::Swap() {
std::string DisplayPlacement::ToString() const {
std::stringstream s;
- if (display_id != Display::kInvalidDisplayID)
+ if (display_id != kInvalidDisplayId)
s << "id=" << display_id << ", ";
- if (parent_display_id != Display::kInvalidDisplayID)
+ if (parent_display_id != kInvalidDisplayId)
s << "parent=" << parent_display_id << ", ";
s << PositionToString(position) << ", ";
s << offset;
@@ -176,9 +176,7 @@ bool DisplayPlacement::StringToPosition(const base::StringPiece& string,
// DisplayLayout
DisplayLayout::DisplayLayout()
- : mirrored(false),
- default_unified(true),
- primary_id(Display::kInvalidDisplayID) {}
+ : mirrored(false), default_unified(true), primary_id(kInvalidDisplayId) {}
DisplayLayout::~DisplayLayout() {}
@@ -225,11 +223,11 @@ bool DisplayLayout::Validate(const DisplayIdList& list,
LOG(ERROR) << "PlacementList must be sorted by display_id";
return false;
}
- if (placement.display_id == Display::kInvalidDisplayID) {
+ if (placement.display_id == kInvalidDisplayId) {
LOG(ERROR) << "display_id is not initialized";
return false;
}
- if (placement.parent_display_id == Display::kInvalidDisplayID) {
+ if (placement.parent_display_id == kInvalidDisplayId) {
LOG(ERROR) << "display_parent_id is not initialized";
return false;
}
« no previous file with comments | « ui/display/fake_display_snapshot.cc ('k') | ui/display/manager/display_layout_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698