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

Side by Side Diff: ui/display/manager/display_layout.cc

Issue 1838833002: Move DisplayLayout and DisplayLayoutBuilder From ash To ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screenwinmove
Patch Set: Update to 1c9b022 and Fix Newly Added Code Impacted by Breaking Change Created 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/display/display_layout.h" 5 #include "ui/display/manager/display_layout.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "ash/ash_switches.h"
11 #include "ash/display/display_pref_util.h"
12 #include "ash/shell.h"
13 #include "base/logging.h" 10 #include "base/logging.h"
14 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
15 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
16 #include "base/values.h" 13 #include "base/values.h"
17 #include "ui/gfx/display.h" 14 #include "ui/gfx/display.h"
18 15
19 namespace ash { 16 namespace display {
20 namespace { 17 namespace {
21 18
22 // DisplayPlacement Positions 19 // DisplayPlacement Positions
23 const char kTop[] = "top"; 20 const char kTop[] = "top";
24 const char kRight[] = "right"; 21 const char kRight[] = "right";
25 const char kBottom[] = "bottom"; 22 const char kBottom[] = "bottom";
26 const char kLeft[] = "left"; 23 const char kLeft[] = "left";
27 const char kUnknown[] = "unknown"; 24 const char kUnknown[] = "unknown";
28 25
29 // The maximum value for 'offset' in DisplayLayout in case of outliers. Need 26 // The maximum value for 'offset' in DisplayLayout in case of outliers. Need
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 DisplayPlacement DisplayLayout::FindPlacementById(int64_t display_id) const { 246 DisplayPlacement DisplayLayout::FindPlacementById(int64_t display_id) const {
250 const auto iter = 247 const auto iter =
251 std::find_if(placement_list.begin(), placement_list.end(), 248 std::find_if(placement_list.begin(), placement_list.end(),
252 [display_id](const DisplayPlacement& placement) { 249 [display_id](const DisplayPlacement& placement) {
253 return placement.display_id == display_id; 250 return placement.display_id == display_id;
254 }); 251 });
255 return (iter == placement_list.end()) ? DisplayPlacement() 252 return (iter == placement_list.end()) ? DisplayPlacement()
256 : DisplayPlacement(*iter); 253 : DisplayPlacement(*iter);
257 } 254 }
258 255
259 } // namespace ash 256 } // namespace gfx
oshima 2016/04/07 19:54:21 display
robliao 2016/04/07 20:10:21 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698