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

Side by Side Diff: chrome/browser/android/physical_web/physical_web_data_source_android.h

Issue 2377513002: Add a Physical Web JNI bridge to support native Physical Web clients (Closed)
Patch Set: remove @CalledByNative annotation on unused method Created 4 years, 2 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CHROME_BROWSER_ANDROID_PHYSICAL_WEB_PHYSICAL_WEB_DATA_SOURCE_ANDROID_H_ 5 #ifndef CHROME_BROWSER_ANDROID_PHYSICAL_WEB_PHYSICAL_WEB_DATA_SOURCE_ANDROID_H_
6 #define CHROME_BROWSER_ANDROID_PHYSICAL_WEB_PHYSICAL_WEB_DATA_SOURCE_ANDROID_H_ 6 #define CHROME_BROWSER_ANDROID_PHYSICAL_WEB_PHYSICAL_WEB_DATA_SOURCE_ANDROID_H_
7 7
8 #include <jni.h>
9
10 #include "base/android/scoped_java_ref.h"
8 #include "base/macros.h" 11 #include "base/macros.h"
9 #include "components/physical_web/data_source/physical_web_data_source.h" 12 #include "components/physical_web/data_source/physical_web_data_source_impl.h"
10 13
11 namespace base { 14 namespace base {
12 class ListValue; 15 class ListValue;
13 } 16 }
14 17
15 class PhysicalWebDataSourceAndroid : public PhysicalWebDataSource { 18 class PhysicalWebDataSourceAndroid : public PhysicalWebDataSourceImpl {
16 public: 19 public:
17 PhysicalWebDataSourceAndroid(); 20 PhysicalWebDataSourceAndroid();
18 ~PhysicalWebDataSourceAndroid() override; 21 ~PhysicalWebDataSourceAndroid() override;
19 22
23 static bool RegisterPhysicalWebDataSource(JNIEnv* env);
24
25 void Initialize();
26
20 void StartDiscovery(bool network_request_enabled) override; 27 void StartDiscovery(bool network_request_enabled) override;
21 void StopDiscovery() override; 28 void StopDiscovery() override;
22 29
23 std::unique_ptr<base::ListValue> GetMetadata() override; 30 std::unique_ptr<base::ListValue> GetMetadata() override;
24 bool HasUnresolvedDiscoveries() override; 31 bool HasUnresolvedDiscoveries() override;
25 32
26 void RegisterListener(PhysicalWebListener* listener) override; 33 private:
27 void UnregisterListener(PhysicalWebListener* listener) override; 34 // A reference to the Java UrlManager singleton.
35 base::android::ScopedJavaGlobalRef<jobject> url_manager_;
28 36
29 private:
30 DISALLOW_COPY_AND_ASSIGN(PhysicalWebDataSourceAndroid); 37 DISALLOW_COPY_AND_ASSIGN(PhysicalWebDataSourceAndroid);
31 }; 38 };
32 39
33 #endif // CHROME_BROWSER_ANDROID_PHYSICAL_WEB_PHYSICAL_WEB_DATA_SOURCE_ANDROID_ H_ 40 #endif // CHROME_BROWSER_ANDROID_PHYSICAL_WEB_PHYSICAL_WEB_DATA_SOURCE_ANDROID_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698