| Index: ash/accelerators/accelerator_commands_aura.cc
|
| diff --git a/ash/accelerators/accelerator_commands_aura.cc b/ash/accelerators/accelerator_commands_aura.cc
|
| index ea84e462b3b0dea03e8c4f6d1d45a77a07d8b066..fc252343985a54e8582e125c9aec49fdcaf0525d 100644
|
| --- a/ash/accelerators/accelerator_commands_aura.cc
|
| +++ b/ash/accelerators/accelerator_commands_aura.cc
|
| @@ -7,7 +7,6 @@
|
| #include "ash/common/wm/window_state.h"
|
| #include "ash/common/wm_window.h"
|
| #include "ash/display/display_manager.h"
|
| -#include "ash/display/display_util.h"
|
| #include "ash/shell.h"
|
| #include "ash/wm/screen_pinning_controller.h"
|
| #include "base/metrics/user_metrics.h"
|
| @@ -35,42 +34,13 @@ bool ZoomInternalDisplay(bool up) {
|
| base::RecordAction(base::UserMetricsAction("Accel_Scale_Ui_Down"));
|
|
|
| DisplayManager* display_manager = Shell::GetInstance()->display_manager();
|
| -
|
| - int64_t display_id = display_manager->IsInUnifiedMode()
|
| - ? DisplayManager::kUnifiedDisplayId
|
| - : display_manager->GetDisplayIdForUIScaling();
|
| - const display::ManagedDisplayInfo& display_info =
|
| - display_manager->GetDisplayInfo(display_id);
|
| -
|
| - scoped_refptr<display::ManagedDisplayMode> mode;
|
| - if (display_manager->IsInUnifiedMode())
|
| - mode = GetDisplayModeForNextResolution(display_info, up);
|
| - else
|
| - mode = GetDisplayModeForNextUIScale(display_info, up);
|
| -
|
| - if (!mode)
|
| - return false;
|
| - return display_manager->SetDisplayMode(display_id, mode);
|
| + return display_manager->ZoomInternalDisplay(up);
|
| }
|
|
|
| void ResetInternalDisplayZoom() {
|
| base::RecordAction(base::UserMetricsAction("Accel_Scale_Ui_Reset"));
|
| DisplayManager* display_manager = Shell::GetInstance()->display_manager();
|
| -
|
| - if (display_manager->IsInUnifiedMode()) {
|
| - const display::ManagedDisplayInfo& display_info =
|
| - display_manager->GetDisplayInfo(DisplayManager::kUnifiedDisplayId);
|
| - const display::ManagedDisplayInfo::ManagedDisplayModeList& modes =
|
| - display_info.display_modes();
|
| - 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);
|
| - }
|
| + display_manager->ResetInternalDisplayZoom();
|
| }
|
|
|
| void Unpin() {
|
|
|