| Index: ui/display/manager/display_info.cc
|
| diff --git a/ash/common/display/display_info.cc b/ui/display/manager/display_info.cc
|
| similarity index 97%
|
| rename from ash/common/display/display_info.cc
|
| rename to ui/display/manager/display_info.cc
|
| index 3ee93edac58932638e64568904220dda5ca918a5..4aa6e855ab48cb7efe1c7a014ded9275054ad60c 100644
|
| --- a/ash/common/display/display_info.cc
|
| +++ b/ui/display/manager/display_info.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "ash/common/display/display_info.h"
|
| +#include "ui/display/manager/display_info.h"
|
|
|
| #include <stdio.h>
|
|
|
| @@ -24,7 +24,7 @@
|
| #include "ui/display/win/dpi.h"
|
| #endif
|
|
|
| -namespace ash {
|
| +namespace ui {
|
| namespace {
|
|
|
| // Use larger than max int to catch overflow early.
|
| @@ -61,8 +61,8 @@ struct ManagedDisplayModeSorter {
|
| explicit ManagedDisplayModeSorter(bool is_internal)
|
| : is_internal(is_internal) {}
|
|
|
| - bool operator()(const scoped_refptr<ManagedDisplayMode>& a,
|
| - const scoped_refptr<ManagedDisplayMode>& b) {
|
| + bool operator()(const scoped_refptr<ui::ManagedDisplayMode>& a,
|
| + const scoped_refptr<ui::ManagedDisplayMode>& b) {
|
| gfx::Size size_a_dip = a->GetSizeInDIP(is_internal);
|
| gfx::Size size_b_dip = b->GetSizeInDIP(is_internal);
|
| if (size_a_dip.GetArea() == size_b_dip.GetArea())
|
| @@ -129,7 +129,7 @@ gfx::Size ManagedDisplayMode::GetSizeInDIP(bool is_internal) const {
|
| }
|
|
|
| bool ManagedDisplayMode::IsEquivalent(
|
| - const scoped_refptr<ManagedDisplayMode>& other) const {
|
| + const scoped_refptr<ui::ManagedDisplayMode>& other) const {
|
| const float kEpsilon = 0.0001f;
|
| return size_ == other->size_ &&
|
| std::abs(ui_scale_ - other->ui_scale_) < kEpsilon &&
|
| @@ -239,7 +239,7 @@ DisplayInfo DisplayInfo::CreateFromSpecWithID(const std::string& spec,
|
| 1.0, device_scale_factor)));
|
| }
|
| }
|
| - scoped_refptr<ManagedDisplayMode> dm = display_modes[native_mode];
|
| + scoped_refptr<ui::ManagedDisplayMode> dm = display_modes[native_mode];
|
| display_modes[native_mode] = new ManagedDisplayMode(
|
| dm->size(), dm->refresh_rate(), dm->is_interlaced(), true,
|
| dm->ui_scale(), dm->device_scale_factor());
|
| @@ -247,7 +247,7 @@ DisplayInfo DisplayInfo::CreateFromSpecWithID(const std::string& spec,
|
|
|
| if (id == display::Display::kInvalidDisplayID)
|
| id = synthesized_display_id++;
|
| - DisplayInfo display_info(
|
| + ui::DisplayInfo display_info(
|
| id, base::StringPrintf("Display-%d", static_cast<int>(id)), has_overscan);
|
| display_info.set_device_scale_factor(device_scale_factor);
|
| display_info.SetRotation(rotation, display::Display::ROTATION_SOURCE_ACTIVE);
|
| @@ -496,4 +496,4 @@ void ResetDisplayIdForTest() {
|
| synthesized_display_id = kSynthesizedDisplayIdStart;
|
| }
|
|
|
| -} // namespace ash
|
| +} // namespace ui
|
|
|