OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROMECAST_BASE_CAST_SYS_INFO_ANDROID_H_ | 5 #ifndef CHROMECAST_BASE_CAST_SYS_INFO_ANDROID_H_ |
6 #define CHROMECAST_BASE_CAST_SYS_INFO_ANDROID_H_ | 6 #define CHROMECAST_BASE_CAST_SYS_INFO_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "chromecast/public/cast_sys_info.h" | 11 #include "chromecast/public/cast_sys_info.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 namespace android { | 14 namespace android { |
15 class BuildInfo; | 15 class BuildInfo; |
16 } | 16 } |
17 } | 17 } |
18 | 18 |
19 namespace chromecast { | 19 namespace chromecast { |
20 | 20 |
21 class CastSysInfoAndroid : public CastSysInfo { | 21 class CastSysInfoAndroid : public CastSysInfo { |
22 public: | 22 public: |
23 static bool RegisterJni(JNIEnv* env); | |
24 | |
25 CastSysInfoAndroid(); | 23 CastSysInfoAndroid(); |
26 ~CastSysInfoAndroid() override; | 24 ~CastSysInfoAndroid() override; |
27 | 25 |
28 // CastSysInfo implementation: | 26 // CastSysInfo implementation: |
29 BuildType GetBuildType() override; | 27 BuildType GetBuildType() override; |
30 std::string GetSerialNumber() override; | 28 std::string GetSerialNumber() override; |
31 std::string GetProductName() override; | 29 std::string GetProductName() override; |
32 std::string GetDeviceModel() override; | 30 std::string GetDeviceModel() override; |
33 std::string GetManufacturer() override; | 31 std::string GetManufacturer() override; |
34 std::string GetSystemBuildNumber() override; | 32 std::string GetSystemBuildNumber() override; |
35 std::string GetSystemReleaseChannel() override; | 33 std::string GetSystemReleaseChannel() override; |
36 std::string GetBoardName() override; | 34 std::string GetBoardName() override; |
37 std::string GetBoardRevision() override; | 35 std::string GetBoardRevision() override; |
38 std::string GetFactoryCountry() override; | 36 std::string GetFactoryCountry() override; |
39 std::string GetFactoryLocale(std::string* second_locale) override; | 37 std::string GetFactoryLocale(std::string* second_locale) override; |
40 std::string GetWifiInterface() override; | 38 std::string GetWifiInterface() override; |
41 std::string GetApInterface() override; | 39 std::string GetApInterface() override; |
42 std::string GetGlVendor() override; | 40 std::string GetGlVendor() override; |
43 std::string GetGlRenderer() override; | 41 std::string GetGlRenderer() override; |
44 std::string GetGlVersion() override; | 42 std::string GetGlVersion() override; |
45 | 43 |
46 // Native implementation of Java methods. | |
47 void DeviceNameChanged(JNIEnv* env, jobject obj, jstring device_name); | |
48 | |
49 private: | 44 private: |
50 const base::android::BuildInfo* const build_info_; | 45 const base::android::BuildInfo* const build_info_; |
51 | 46 |
52 DISALLOW_COPY_AND_ASSIGN(CastSysInfoAndroid); | 47 DISALLOW_COPY_AND_ASSIGN(CastSysInfoAndroid); |
53 }; | 48 }; |
54 | 49 |
55 } // namespace chromecast | 50 } // namespace chromecast |
56 | 51 |
57 #endif // CHROMECAST_BASE_CAST_SYS_INFO_ANDROID_H_ | 52 #endif // CHROMECAST_BASE_CAST_SYS_INFO_ANDROID_H_ |
OLD | NEW |