| 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 CHROME_BROWSER_ANDROID_LOCATION_SETTINGS_IMPL_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_LOCATION_SETTINGS_IMPL_H_ |
| 6 #define CHROME_BROWSER_ANDROID_LOCATION_SETTINGS_IMPL_H_ | 6 #define CHROME_BROWSER_ANDROID_LOCATION_SETTINGS_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/android/jni_weak_ref.h" | 10 #include "base/android/jni_weak_ref.h" |
| 11 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "chrome/browser/android/location_settings.h" | 13 #include "chrome/browser/android/location_settings.h" |
| 14 | 14 |
| 15 class LocationSettingsImpl : public LocationSettings { | 15 class LocationSettingsImpl : public LocationSettings { |
| 16 public: | 16 public: |
| 17 LocationSettingsImpl(); | 17 LocationSettingsImpl(); |
| 18 ~LocationSettingsImpl() override; | 18 ~LocationSettingsImpl() override; |
| 19 | 19 |
| 20 // LocationSettings implementation: | 20 // LocationSettings implementation: |
| 21 bool CanSitesRequestLocationPermission( | 21 bool HasAndroidLocationPermission() override; |
| 22 bool CanPromptForAndroidLocationPermission( |
| 22 content::WebContents* web_contents) override; | 23 content::WebContents* web_contents) override; |
| 23 | 24 bool IsSystemLocationSettingEnabled() override; |
| 24 bool CanPromptToEnableSystemLocationSetting() override; | 25 bool CanPromptToEnableSystemLocationSetting() override; |
| 25 | |
| 26 void PromptToEnableSystemLocationSetting( | 26 void PromptToEnableSystemLocationSetting( |
| 27 const LocationSettingsDialogContext prompt_context, | 27 const LocationSettingsDialogContext prompt_context, |
| 28 content::WebContents* web_contents, | 28 content::WebContents* web_contents, |
| 29 LocationSettingsDialogOutcomeCallback callback) override; | 29 LocationSettingsDialogOutcomeCallback callback) override; |
| 30 | 30 |
| 31 // Registers the location settings native methods through JNI. | 31 // Registers the location settings native methods through JNI. |
| 32 static bool Register(JNIEnv* env); | 32 static bool Register(JNIEnv* env); |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 DISALLOW_COPY_AND_ASSIGN(LocationSettingsImpl); | 35 DISALLOW_COPY_AND_ASSIGN(LocationSettingsImpl); |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 #endif // CHROME_BROWSER_ANDROID_LOCATION_SETTINGS_IMPL_H_ | 38 #endif // CHROME_BROWSER_ANDROID_LOCATION_SETTINGS_IMPL_H_ |
| OLD | NEW |