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

Unified Diff: ui/display/screen.cc

Issue 1964153002: Move Screen, its impls, DisplayObserver and DisplayChangeNotifier to ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tabs 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/display/screen.h ('k') | ui/display/screen_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/screen.cc
diff --git a/ui/gfx/screen.cc b/ui/display/screen.cc
similarity index 77%
rename from ui/gfx/screen.cc
rename to ui/display/screen.cc
index a07e9218b1fc66a1f7ecb815800754ab72c6eb92..25f688219985aca631b5837818acaf34955a5a95 100644
--- a/ui/gfx/screen.cc
+++ b/ui/display/screen.cc
@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/gfx/screen.h"
+#include "ui/display/screen.h"
+#include "ui/display/display.h"
#include "ui/gfx/geometry/rect.h"
-namespace gfx {
+namespace display {
namespace {
@@ -14,11 +15,9 @@ Screen* g_screen;
} // namespace
-Screen::Screen() {
-}
+Screen::Screen() {}
-Screen::~Screen() {
-}
+Screen::~Screen() {}
// static
Screen* Screen::GetScreen() {
@@ -35,16 +34,16 @@ void Screen::SetScreenInstance(Screen* instance) {
g_screen = instance;
}
-gfx::Rect Screen::ScreenToDIPRectInWindow(NativeView view,
+gfx::Rect Screen::ScreenToDIPRectInWindow(gfx::NativeView view,
const gfx::Rect& screen_rect) const {
float scale = GetDisplayNearestWindow(view).device_scale_factor();
return ScaleToEnclosingRect(screen_rect, 1.0f / scale);
}
-gfx::Rect Screen::DIPToScreenRectInWindow(NativeView view,
+gfx::Rect Screen::DIPToScreenRectInWindow(gfx::NativeView view,
const gfx::Rect& dip_rect) const {
float scale = GetDisplayNearestWindow(view).device_scale_factor();
return ScaleToEnclosingRect(dip_rect, scale);
}
-} // namespace gfx
+} // namespace display
« no previous file with comments | « ui/display/screen.h ('k') | ui/display/screen_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698