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

Side by Side Diff: components/metrics/ui/screen_info_metrics_provider.cc

Issue 1926523002: Rename gfx::Display/Screen to display::Display/Screen in components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « components/metrics/ui/DEPS ('k') | components/mus/ws/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/metrics/ui/screen_info_metrics_provider.h" 5 #include "components/metrics/ui/screen_info_metrics_provider.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "components/metrics/proto/system_profile.pb.h" 8 #include "components/metrics/proto/system_profile.pb.h"
9 #include "ui/gfx/screen.h" 9 #include "ui/display/screen.h"
10 10
11 namespace metrics { 11 namespace metrics {
12 12
13 #if defined(OS_WIN) 13 #if defined(OS_WIN)
14 14
15 #include <windows.h> 15 #include <windows.h>
16 16
17 namespace { 17 namespace {
18 18
19 struct ScreenDPIInformation { 19 struct ScreenDPIInformation {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 hardware->set_primary_screen_height(display_size.height()); 71 hardware->set_primary_screen_height(display_size.height());
72 hardware->set_primary_screen_scale_factor(GetScreenDeviceScaleFactor()); 72 hardware->set_primary_screen_scale_factor(GetScreenDeviceScaleFactor());
73 hardware->set_screen_count(GetScreenCount()); 73 hardware->set_screen_count(GetScreenCount());
74 74
75 #if defined(OS_WIN) 75 #if defined(OS_WIN)
76 WriteScreenDPIInformationProto(hardware); 76 WriteScreenDPIInformationProto(hardware);
77 #endif 77 #endif
78 } 78 }
79 79
80 gfx::Size ScreenInfoMetricsProvider::GetScreenSize() const { 80 gfx::Size ScreenInfoMetricsProvider::GetScreenSize() const {
81 return gfx::Screen::GetScreen()->GetPrimaryDisplay().GetSizeInPixel(); 81 return display::Screen::GetScreen()->GetPrimaryDisplay().GetSizeInPixel();
82 } 82 }
83 83
84 float ScreenInfoMetricsProvider::GetScreenDeviceScaleFactor() const { 84 float ScreenInfoMetricsProvider::GetScreenDeviceScaleFactor() const {
85 return gfx::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor(); 85 return display::Screen::GetScreen()
86 ->GetPrimaryDisplay()
87 .device_scale_factor();
86 } 88 }
87 89
88 int ScreenInfoMetricsProvider::GetScreenCount() const { 90 int ScreenInfoMetricsProvider::GetScreenCount() const {
89 return gfx::Screen::GetScreen()->GetNumDisplays(); 91 return display::Screen::GetScreen()->GetNumDisplays();
90 } 92 }
91 93
92 } // namespace metrics 94 } // namespace metrics
OLDNEW
« no previous file with comments | « components/metrics/ui/DEPS ('k') | components/mus/ws/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698