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

Unified Diff: chrome/browser/android/location_settings_impl.h

Issue 2709883005: Stubs for triggering the LSD in Clank (Closed)
Patch Set: Declare the dependency of components/location on WindowAndroid Created 3 years, 10 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: chrome/browser/android/location_settings_impl.h
diff --git a/chrome/browser/android/location_settings_impl.h b/chrome/browser/android/location_settings_impl.h
index 581829f2f53accedadf6e6983d44b71307c7dd25..4a4b0ef97d7698e6ae3317fdf9f18793e738409a 100644
--- a/chrome/browser/android/location_settings_impl.h
+++ b/chrome/browser/android/location_settings_impl.h
@@ -21,6 +21,48 @@ class LocationSettingsImpl : public LocationSettings {
bool CanSitesRequestLocationPermission(
content::WebContents* web_contents) override;
+ void CanPromptToEnableSystemLocationSetting(
+ const base::Callback<void(bool can_prompt)>& callback) override;
+
+ void PromptToEnableSystemLocationSetting(
+ const PromptContext prompt_context,
+ content::WebContents* web_contents,
+ const base::Callback<void(PromptOutcome prompt_outcome)>& callback)
+ override;
+
+ // JNI classes and methods.
+ class BoolCallback {
+ public:
+ explicit BoolCallback(
+ const base::Callback<void(bool can_prompt)>& callback);
+ ~BoolCallback();
+
+ void RunBoolCallback(JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj,
+ bool result);
+
+ private:
+ const base::Callback<void(bool can_prompt)> callback_;
+ };
+
+ class PromptOutcomeCallback {
+ public:
+ explicit PromptOutcomeCallback(
+ const base::Callback<void(PromptOutcome prompt_outcome)>& callback);
+ ~PromptOutcomeCallback();
+
+ void RunPromptOutcomeCallback(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj,
+ int result);
+
+ private:
+ const base::Callback<void(PromptOutcome prompt_outcome)> callback_;
+ };
+
+ // Register the location settings native methods through JNI.
+ static bool Register(JNIEnv* env);
+
private:
DISALLOW_COPY_AND_ASSIGN(LocationSettingsImpl);
};

Powered by Google App Engine
This is Rietveld 408576698