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

Side by Side Diff: chromecast/base/cast_sys_info_android.h

Issue 1132663004: Chromecast: adds Android implementation of CastSysInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_DUMMY_H_ 5 #ifndef CHROMECAST_BASE_CAST_SYS_INFO_ANDROID_H_
6 #define CHROMECAST_BASE_CAST_SYS_INFO_DUMMY_H_ 6 #define CHROMECAST_BASE_CAST_SYS_INFO_ANDROID_H_
7
8 #include <jni.h>
7 9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "chromecast/public/cast_sys_info.h" 11 #include "chromecast/base/cast_sys_info_dummy.h"
lcwu1 2015/05/19 02:01:44 This header is no longer needed.
gunsch 2015/05/19 02:51:47 Done.
12
13 namespace base {
14 namespace android {
15 class BuildInfo;
16 }
17 }
10 18
11 namespace chromecast { 19 namespace chromecast {
12 20
13 class CastSysInfoDummy : public CastSysInfo { 21 class CastSysInfoAndroid : public CastSysInfo {
14 public: 22 public:
15 CastSysInfoDummy(); 23 static bool RegisterJni(JNIEnv* env);
16 ~CastSysInfoDummy() override; 24
25 CastSysInfoAndroid();
26 ~CastSysInfoAndroid() override;
17 27
18 // CastSysInfo implementation: 28 // CastSysInfo implementation:
19 BuildType GetBuildType() override; 29 BuildType GetBuildType() override;
20 std::string GetSystemReleaseChannel() override;
21 std::string GetSerialNumber() override; 30 std::string GetSerialNumber() override;
22 std::string GetProductName() override; 31 std::string GetProductName() override;
23 std::string GetDeviceModel() override; 32 std::string GetDeviceModel() override;
33 std::string GetManufacturer() override;
34 std::string GetSystemBuildNumber() override;
35 std::string GetSystemReleaseChannel() override;
24 std::string GetBoardName() override; 36 std::string GetBoardName() override;
25 std::string GetBoardRevision() override; 37 std::string GetBoardRevision() override;
26 std::string GetManufacturer() override;
27 std::string GetSystemBuildNumber() override;
28 std::string GetFactoryCountry() override; 38 std::string GetFactoryCountry() override;
29 std::string GetFactoryLocale(std::string* second_locale) override; 39 std::string GetFactoryLocale(std::string* second_locale) override;
30 std::string GetWifiInterface() override; 40 std::string GetWifiInterface() override;
31 std::string GetApInterface() override; 41 std::string GetApInterface() override;
32 std::string GetGlVendor() override; 42 std::string GetGlVendor() override;
33 std::string GetGlRenderer() override; 43 std::string GetGlRenderer() override;
34 std::string GetGlVersion() override; 44 std::string GetGlVersion() override;
35 45
46 // Native implementation of Java methods.
47 void DeviceNameChanged(JNIEnv* env, jobject obj, jstring device_name);
48
36 private: 49 private:
37 DISALLOW_COPY_AND_ASSIGN(CastSysInfoDummy); 50 const base::android::BuildInfo* const build_info_;
51
52 DISALLOW_COPY_AND_ASSIGN(CastSysInfoAndroid);
38 }; 53 };
39 54
40 } // namespace chromecast 55 } // namespace chromecast
41 56
42 #endif // CHROMECAST_BASE_CAST_SYS_INFO_DUMMY_H_ 57 #endif // CHROMECAST_BASE_CAST_SYS_INFO_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698