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

Side by Side Diff: ui/base/layout.cc

Issue 1581473002: Remove base/win/metro.{cc|h} and some associated code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 4 years, 11 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/base/layout.h" 5 #include "ui/base/layout.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
11 #include <limits> 11 #include <limits>
12 12
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "ui/base/touch/touch_device.h" 17 #include "ui/base/touch/touch_device.h"
18 #include "ui/base/ui_base_switches.h" 18 #include "ui/base/ui_base_switches.h"
19 #include "ui/gfx/display.h" 19 #include "ui/gfx/display.h"
20 #include "ui/gfx/image/image_skia.h" 20 #include "ui/gfx/image/image_skia.h"
21 #include "ui/gfx/screen.h" 21 #include "ui/gfx/screen.h"
22 22
23 #if defined(OS_WIN) 23 #if defined(OS_WIN)
24 #include "base/win/metro.h"
25 #include "ui/gfx/win/dpi.h" 24 #include "ui/gfx/win/dpi.h"
26 #include <Windows.h> 25 #include <Windows.h>
27 #endif // defined(OS_WIN) 26 #endif // defined(OS_WIN)
28 27
29 namespace ui { 28 namespace ui {
30 29
31 namespace { 30 namespace {
32 31
33 std::vector<ScaleFactor>* g_supported_scale_factors = NULL; 32 std::vector<ScaleFactor>* g_supported_scale_factors = NULL;
34 33
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 128
130 #if !defined(OS_MACOSX) 129 #if !defined(OS_MACOSX)
131 float GetScaleFactorForNativeView(gfx::NativeView view) { 130 float GetScaleFactorForNativeView(gfx::NativeView view) {
132 gfx::Screen* screen = gfx::Screen::GetScreenFor(view); 131 gfx::Screen* screen = gfx::Screen::GetScreenFor(view);
133 gfx::Display display = screen->GetDisplayNearestWindow(view); 132 gfx::Display display = screen->GetDisplayNearestWindow(view);
134 return display.device_scale_factor(); 133 return display.device_scale_factor();
135 } 134 }
136 #endif // !defined(OS_MACOSX) 135 #endif // !defined(OS_MACOSX)
137 136
138 } // namespace ui 137 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698