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

Side by Side Diff: ui/aura/dip_util.h

Issue 10221028: Move DIP translation from ui/aura to ui/compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove dip from gyp Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_AURA_DIP_UTIL_H_
6 #define UI_AURA_DIP_UTIL_H_
7 #pragma once
8
9 #include "ui/aura/aura_export.h"
10
11 namespace gfx {
12 class Point;
13 class Size;
14 class Rect;
15 } // namespace gfx
16
17 namespace aura {
18 class Window;
19
20 #if defined(ENABLE_DIP)
21 AURA_EXPORT float GetMonitorScaleFactor(const Window* window);
22 #endif
23
24 // Utility functions that convert point/size/rect between
25 // DIP and pixel coordinates system.
26 AURA_EXPORT gfx::Point ConvertPointToDIP(const Window* window,
27 const gfx::Point& point_in_pixel);
28 AURA_EXPORT gfx::Size ConvertSizeToDIP(const Window* window,
29 const gfx::Size& size_in_pixel);
30 AURA_EXPORT gfx::Rect ConvertRectToDIP(const Window* window,
31 const gfx::Rect& rect_in_pixel);
32 AURA_EXPORT gfx::Point ConvertPointToPixel(const Window* window,
33 const gfx::Point& point_in_dip);
34 AURA_EXPORT gfx::Size ConvertSizeToPixel(const Window* window,
35 const gfx::Size& size_in_dip);
36 AURA_EXPORT gfx::Rect ConvertRectToPixel(const Window* window,
37 const gfx::Rect& rect_in_dip);
38
39 } // namespace aura
40
41 #endif // UI_AURA_DIP_UTIL_H_
OLDNEW
« no previous file with comments | « ui/aura/aura.gyp ('k') | ui/aura/dip_util.cc » ('j') | ui/gfx/compositor/compositor.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698