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

Unified Diff: chrome/browser/ui/webui/options/chromeos/display_options_handler.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: Fix comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/display_info_provider_chromeos_unittest.cc ('k') | ui/display/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
index da31e347fb564918816d89e4bcc47346010d5b0a..45a2d4c0e30197cd98c4596c70447c18b9ede538 100644
--- a/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
@@ -10,7 +10,6 @@
#include <string>
#include "ash/display/display_configuration_controller.h"
-#include "ash/display/display_layout_builder.h"
#include "ash/display/display_manager.h"
#include "ash/display/resolution_notification_controller.h"
#include "ash/display/window_tree_host_manager.h"
@@ -29,6 +28,8 @@
#include "content/public/browser/web_ui.h"
#include "grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/display/manager/display_layout.h"
+#include "ui/display/manager/display_layout_builder.h"
#include "ui/gfx/display.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size_conversions.h"
@@ -339,7 +340,7 @@ void DisplayOptionsHandler::SendAllDisplayInfo() {
js_display->Set("availableColorProfiles", available_color_profiles);
if (display_manager->GetNumDisplays() > 1) {
- const ash::DisplayPlacement placement =
+ const display::DisplayPlacement placement =
display_manager->GetCurrentDisplayLayout().FindPlacementById(
display.id());
if (placement.display_id != gfx::Display::kInvalidDisplayID) {
@@ -409,7 +410,8 @@ void DisplayOptionsHandler::HandleSetDisplayLayout(
content::RecordAction(base::UserMetricsAction("Options_DisplayRearrange"));
ash::DisplayManager* display_manager = GetDisplayManager();
- ash::DisplayLayoutBuilder builder(display_manager->GetCurrentDisplayLayout());
+ display::DisplayLayoutBuilder builder(
+ display_manager->GetCurrentDisplayLayout());
builder.ClearPlacements();
for (const base::Value* layout : *layouts) {
const base::DictionaryValue* dictionary;
@@ -435,11 +437,11 @@ void DisplayOptionsHandler::HandleSetDisplayLayout(
builder.AddDisplayPlacement(
display_id, parent_id,
- static_cast<ash::DisplayPlacement::Position>(position), offset);
+ static_cast<display::DisplayPlacement::Position>(position), offset);
}
- scoped_ptr<ash::DisplayLayout> layout = builder.Build();
- if (!ash::DisplayLayout::Validate(display_manager->GetCurrentDisplayIdList(),
- *layout)) {
+ scoped_ptr<display::DisplayLayout> layout = builder.Build();
+ if (!display::DisplayLayout::Validate(
+ display_manager->GetCurrentDisplayIdList(), *layout)) {
LOG(ERROR) << "Invalid layout: " << layout->ToString();
return;
}
« no previous file with comments | « chrome/browser/extensions/display_info_provider_chromeos_unittest.cc ('k') | ui/display/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698