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

Unified Diff: ash/accelerators/accelerator_commands_aura.cc

Issue 2270553002: Move ash::DisplayInfo to ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 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
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_delegate_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_commands_aura.cc
diff --git a/ash/accelerators/accelerator_commands_aura.cc b/ash/accelerators/accelerator_commands_aura.cc
index 69a65272cc1ad58c99866fdcebf7a1b7989abf13..ea84e462b3b0dea03e8c4f6d1d45a77a07d8b066 100644
--- a/ash/accelerators/accelerator_commands_aura.cc
+++ b/ash/accelerators/accelerator_commands_aura.cc
@@ -4,7 +4,6 @@
#include "ash/accelerators/accelerator_commands_aura.h"
-#include "ash/common/display/display_info.h"
#include "ash/common/wm/window_state.h"
#include "ash/common/wm_window.h"
#include "ash/display/display_manager.h"
@@ -12,6 +11,7 @@
#include "ash/shell.h"
#include "ash/wm/screen_pinning_controller.h"
#include "base/metrics/user_metrics.h"
+#include "ui/display/manager/managed_display_info.h"
namespace ash {
namespace accelerators {
@@ -39,9 +39,10 @@ bool ZoomInternalDisplay(bool up) {
int64_t display_id = display_manager->IsInUnifiedMode()
? DisplayManager::kUnifiedDisplayId
: display_manager->GetDisplayIdForUIScaling();
- const DisplayInfo& display_info = display_manager->GetDisplayInfo(display_id);
+ const display::ManagedDisplayInfo& display_info =
+ display_manager->GetDisplayInfo(display_id);
- scoped_refptr<ManagedDisplayMode> mode;
+ scoped_refptr<display::ManagedDisplayMode> mode;
if (display_manager->IsInUnifiedMode())
mode = GetDisplayModeForNextResolution(display_info, up);
else
@@ -57,14 +58,15 @@ void ResetInternalDisplayZoom() {
DisplayManager* display_manager = Shell::GetInstance()->display_manager();
if (display_manager->IsInUnifiedMode()) {
- const DisplayInfo& display_info =
+ const display::ManagedDisplayInfo& display_info =
display_manager->GetDisplayInfo(DisplayManager::kUnifiedDisplayId);
- const DisplayInfo::ManagedDisplayModeList& modes =
+ const display::ManagedDisplayInfo::ManagedDisplayModeList& modes =
display_info.display_modes();
- auto iter = std::find_if(modes.begin(), modes.end(),
- [](const scoped_refptr<ManagedDisplayMode>& mode) {
- return mode->native();
- });
+ auto iter = std::find_if(
+ modes.begin(), modes.end(),
+ [](const scoped_refptr<display::ManagedDisplayMode>& mode) {
+ return mode->native();
+ });
display_manager->SetDisplayMode(DisplayManager::kUnifiedDisplayId, *iter);
} else {
SetDisplayUIScale(display_manager->GetDisplayIdForUIScaling(), 1.0f);
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_delegate_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698