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

Side by Side Diff: ui/gfx/android/device_info.h

Issue 11886074: Use correct favicon scale factor on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed and added JavaBitmap JNI registration to .h Created 7 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 | 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_GFX_ANDROID_DEVICE_INFO_H_
6 #define UI_GFX_ANDROID_DEVICE_INFO_H_
7
8 #include <jni.h>
9 #include <string>
10
11 #include "base/android/scoped_java_ref.h"
12 #include "base/basictypes.h"
13 #include "ui/base/ui_export.h"
14
15 namespace gfx {
16
17 // Facilitates access to device information typically only
18 // available using the Android SDK, including Display properties.
19 class UI_EXPORT DeviceInfo {
20 public:
21 DeviceInfo();
22 ~DeviceInfo();
23
24 // Returns display height in physical pixels.
25 int GetDisplayHeight();
26
27 // Returns display width in physical pixels.
28 int GetDisplayWidth();
29
30 // Returns number of bits per pixel.
31 int GetBitsPerPixel();
32
33 // Returns number of bits per component.
34 int GetBitsPerComponent();
35
36 // Returns a scaling factor for Density Independent Pixel unit
37 // (1.0 is 160dpi, 0.75 is 120dpi, 2.0 is 320dpi).
38 double GetDIPScale();
39
40 // Returns display refresh rate in number of frames per second.
41 double GetRefreshRate();
42
43 // Returns the ISO country code equivalent of the current MCC.
44 std::string GetNetworkCountryIso();
jamesr 2013/01/17 06:18:07 wait - what's this have to do with graphics?
aruslan 2013/01/17 23:01:10 Moved the method out and renamed the classes to av
45
46 // Registers methods with JNI and returns true if succeeded.
47 static bool RegisterDeviceInfo(JNIEnv* env);
48
49 private:
50 base::android::ScopedJavaGlobalRef<jobject> j_device_info_;
51
52 DISALLOW_COPY_AND_ASSIGN(DeviceInfo);
53 };
54
55 } // namespace gfx
56
57 #endif // UI_GFX_ANDROID_DEVICE_INFO_H_
OLDNEW
« ui/base/layout.cc ('K') | « ui/base/layout.cc ('k') | ui/gfx/android/device_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698