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

Unified Diff: content/common/android/device_telephony_info.h

Issue 11886074: Use correct favicon scale factor on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Split DeviceTelephonyInfo from DeviceDisplayInfo; added SCALE_FACTOR_150P and 300P. 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 side-by-side diff with in-line comments
Download patch
Index: content/common/android/device_telephony_info.h
diff --git a/content/common/android/device_telephony_info.h b/content/common/android/device_telephony_info.h
new file mode 100644
index 0000000000000000000000000000000000000000..84922d010ad52d92cd48d0b99983b02901e8f266
--- /dev/null
+++ b/content/common/android/device_telephony_info.h
@@ -0,0 +1,37 @@
+// Copyright (c) 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.
+
+#ifndef CONTENT_COMMON_ANDROID_DEVICE_TELEPHONY_INFO_H_
+#define CONTENT_COMMON_ANDROID_DEVICE_TELEPHONY_INFO_H_
+
+#include <jni.h>
+#include <string>
+
+#include "base/android/scoped_java_ref.h"
+#include "base/basictypes.h"
+
+namespace content {
+
+// Facilitates access to device information typically only
+// available using the Android SDK, including Telephony properties.
+class DeviceTelephonyInfo {
+ public:
+ DeviceTelephonyInfo();
+ ~DeviceTelephonyInfo();
+
+ // Returns the ISO country code equivalent of the current MCC.
+ std::string GetNetworkCountryIso();
+
+ // Registers methods with JNI and returns true if succeeded.
+ static bool RegisterDeviceTelephonyInfo(JNIEnv* env);
+
+ private:
+ base::android::ScopedJavaGlobalRef<jobject> j_device_info_;
+
+ DISALLOW_COPY_AND_ASSIGN(DeviceTelephonyInfo);
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_ANDROID_DEVICE_TELEPHONY_INFO_H_

Powered by Google App Engine
This is Rietveld 408576698