OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_UI_ANDROID_PAGE_INFO_PAGE_INFO_POPUP_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_PAGE_INFO_PAGE_INFO_POPUP_ANDROID_H_ |
6 #define CHROME_BROWSER_UI_ANDROID_PAGE_INFO_PAGE_INFO_POPUP_ANDROID_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_PAGE_INFO_PAGE_INFO_POPUP_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/android/scoped_java_ref.h" | 12 #include "base/android/scoped_java_ref.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/optional.h" |
14 #include "chrome/browser/ui/page_info/page_info_ui.h" | 15 #include "chrome/browser/ui/page_info/page_info_ui.h" |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 class WebContents; | 18 class WebContents; |
18 } | 19 } |
19 | 20 |
20 class SearchGeolocationService; | 21 class SearchGeolocationService; |
21 | 22 |
22 // A Java counterpart will be generated for this enum. | 23 // A Java counterpart will be generated for this enum. |
23 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser | 24 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser |
(...skipping 20 matching lines...) Expand all Loading... |
44 | 45 |
45 // PageInfoUI implementations. | 46 // PageInfoUI implementations. |
46 void SetCookieInfo(const CookieInfoList& cookie_info_list) override; | 47 void SetCookieInfo(const CookieInfoList& cookie_info_list) override; |
47 void SetPermissionInfo(const PermissionInfoList& permission_info_list, | 48 void SetPermissionInfo(const PermissionInfoList& permission_info_list, |
48 ChosenObjectInfoList chosen_object_info_list) override; | 49 ChosenObjectInfoList chosen_object_info_list) override; |
49 void SetIdentityInfo(const IdentityInfo& identity_info) override; | 50 void SetIdentityInfo(const IdentityInfo& identity_info) override; |
50 | 51 |
51 static bool RegisterPageInfoPopupAndroid(JNIEnv* env); | 52 static bool RegisterPageInfoPopupAndroid(JNIEnv* env); |
52 | 53 |
53 private: | 54 private: |
| 55 // Returns an optional value which is set if this permission should be |
| 56 // displayed in Page Info. Most permissions will only be displayed if they are |
| 57 // set to some non-default value, but there are some permissions which require |
| 58 // customized behavior. |
| 59 base::Optional<ContentSetting> GetSettingToDisplay( |
| 60 const PermissionInfo& permission); |
| 61 |
54 // The presenter that controlls the Page Info UI. | 62 // The presenter that controlls the Page Info UI. |
55 std::unique_ptr<PageInfo> presenter_; | 63 std::unique_ptr<PageInfo> presenter_; |
56 | 64 |
57 // The java prompt implementation. | 65 // The java prompt implementation. |
58 base::android::ScopedJavaGlobalRef<jobject> popup_jobject_; | 66 base::android::ScopedJavaGlobalRef<jobject> popup_jobject_; |
59 | 67 |
60 // Owned by the profile. | 68 // Owned by the profile. |
61 SearchGeolocationService* search_geolocation_service_; | 69 SearchGeolocationService* search_geolocation_service_; |
62 | 70 |
63 GURL url_; | 71 GURL url_; |
64 | 72 |
65 DISALLOW_COPY_AND_ASSIGN(PageInfoPopupAndroid); | 73 DISALLOW_COPY_AND_ASSIGN(PageInfoPopupAndroid); |
66 }; | 74 }; |
67 | 75 |
68 #endif // CHROME_BROWSER_UI_ANDROID_PAGE_INFO_PAGE_INFO_POPUP_ANDROID_H_ | 76 #endif // CHROME_BROWSER_UI_ANDROID_PAGE_INFO_PAGE_INFO_POPUP_ANDROID_H_ |
OLD | NEW |