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

Unified Diff: ui/gfx/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/gfx/screen.h ('k') | ui/gfx/screen_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/screen.cc
diff --git a/ui/gfx/screen.cc b/ui/gfx/screen.cc
deleted file mode 100644
index a07e9218b1fc66a1f7ecb815800754ab72c6eb92..0000000000000000000000000000000000000000
--- a/ui/gfx/screen.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// 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/gfx/geometry/rect.h"
-
-namespace gfx {
-
-namespace {
-
-Screen* g_screen;
-
-} // namespace
-
-Screen::Screen() {
-}
-
-Screen::~Screen() {
-}
-
-// static
-Screen* Screen::GetScreen() {
-#if defined(OS_MACOSX) || defined(OS_ANDROID)
- // TODO(scottmg): https://crbug.com/558054
- if (!g_screen)
- g_screen = CreateNativeScreen();
-#endif
- return g_screen;
-}
-
-// static
-void Screen::SetScreenInstance(Screen* instance) {
- g_screen = instance;
-}
-
-gfx::Rect Screen::ScreenToDIPRectInWindow(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,
- const gfx::Rect& dip_rect) const {
- float scale = GetDisplayNearestWindow(view).device_scale_factor();
- return ScaleToEnclosingRect(dip_rect, scale);
-}
-
-} // namespace gfx
« no previous file with comments | « ui/gfx/screen.h ('k') | ui/gfx/screen_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698