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

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

Issue 2449963005: Notify native clients when Physical Web URL metadata is updated (Closed)
Patch Set: double-check native is initialized Created 4 years, 1 month 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> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 static bool RegisterPhysicalWebDataSource(JNIEnv* env); 53 static bool RegisterPhysicalWebDataSource(JNIEnv* env);
54 54
55 void Initialize(); 55 void Initialize();
56 56
57 void StartDiscovery(bool network_request_enabled) override; 57 void StartDiscovery(bool network_request_enabled) override;
58 void StopDiscovery() override; 58 void StopDiscovery() override;
59 59
60 std::unique_ptr<base::ListValue> GetMetadata() override; 60 std::unique_ptr<base::ListValue> GetMetadata() override;
61 bool HasUnresolvedDiscoveries() override; 61 bool HasUnresolvedDiscoveries() override;
62 62
63 void OnFound(JNIEnv* env,
64 const base::android::JavaParamRef<jobject>& obj,
65 const base::android::JavaParamRef<jstring>& j_url);
66 void OnLost(JNIEnv* env,
67 const base::android::JavaParamRef<jobject>& obj,
68 const base::android::JavaParamRef<jstring>& j_url);
69 void OnDistanceChanged(JNIEnv* env,
70 const base::android::JavaParamRef<jobject>& obj,
71 const base::android::JavaParamRef<jstring>& j_url,
72 jdouble distance_estimate);
73
63 private: 74 private:
64 // A reference to the Java UrlManager singleton. 75 // A reference to the Java UrlManager singleton.
65 base::android::ScopedJavaGlobalRef<jobject> url_manager_; 76 base::android::ScopedJavaGlobalRef<jobject> url_manager_;
66 77
67 DISALLOW_COPY_AND_ASSIGN(PhysicalWebDataSourceAndroid); 78 DISALLOW_COPY_AND_ASSIGN(PhysicalWebDataSourceAndroid);
68 }; 79 };
69 80
70 #endif // CHROME_BROWSER_ANDROID_PHYSICAL_WEB_PHYSICAL_WEB_DATA_SOURCE_ANDROID_ H_ 81 #endif // CHROME_BROWSER_ANDROID_PHYSICAL_WEB_PHYSICAL_WEB_DATA_SOURCE_ANDROID_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698