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_WEBSITE_SETTINGS_POPUP_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_WEBSITE_SETTINGS_POPUP_ANDROID_H_ |
6 #define CHROME_BROWSER_UI_ANDROID_WEBSITE_SETTINGS_POPUP_ANDROID_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_WEBSITE_SETTINGS_POPUP_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" |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "chrome/browser/ui/website_settings/website_settings_ui.h" | 13 #include "chrome/browser/ui/website_settings/website_settings_ui.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 class WebContents; | 16 class WebContents; |
17 } | 17 } |
18 | 18 |
| 19 // A Java counterpart will be generated for this enum. |
| 20 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser |
| 21 enum PageInfoConnectionType { |
| 22 CONNECTION_UNKNOWN, |
| 23 CONNECTION_ENCRYPTED, |
| 24 CONNECTION_MIXED_CONTENT, |
| 25 CONNECTION_UNENCRYPTED, |
| 26 CONNECTION_ENCRYPTED_ERROR, |
| 27 CONNECTION_INTERNAL_PAGE, |
| 28 }; |
| 29 |
19 // Android implementation of the website settings UI. | 30 // Android implementation of the website settings UI. |
20 class WebsiteSettingsPopupAndroid : public WebsiteSettingsUI { | 31 class WebsiteSettingsPopupAndroid : public WebsiteSettingsUI { |
21 public: | 32 public: |
22 WebsiteSettingsPopupAndroid(JNIEnv* env, | 33 WebsiteSettingsPopupAndroid(JNIEnv* env, |
23 jobject java_website_settings, | 34 jobject java_website_settings, |
24 content::WebContents* web_contents); | 35 content::WebContents* web_contents); |
25 virtual ~WebsiteSettingsPopupAndroid(); | 36 virtual ~WebsiteSettingsPopupAndroid(); |
26 void Destroy(JNIEnv* env, jobject obj); | 37 void Destroy(JNIEnv* env, jobject obj); |
27 | 38 |
28 // Revokes any current user exceptions for bypassing SSL error interstitials | |
29 // on this page. | |
30 void ResetCertDecisions(JNIEnv* env, jobject obj, jobject java_web_contents); | |
31 | |
32 // WebsiteSettingsUI implementations. | 39 // WebsiteSettingsUI implementations. |
33 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) override; | 40 virtual void SetCookieInfo(const CookieInfoList& cookie_info_list) override; |
34 virtual void SetPermissionInfo( | 41 virtual void SetPermissionInfo( |
35 const PermissionInfoList& permission_info_list) override; | 42 const PermissionInfoList& permission_info_list) override; |
36 virtual void SetIdentityInfo(const IdentityInfo& identity_info) override; | 43 virtual void SetIdentityInfo(const IdentityInfo& identity_info) override; |
37 virtual void SetFirstVisit(const base::string16& first_visit) override; | 44 virtual void SetFirstVisit(const base::string16& first_visit) override; |
38 virtual void SetSelectedTab(WebsiteSettingsUI::TabId tab_id) override; | 45 virtual void SetSelectedTab(WebsiteSettingsUI::TabId tab_id) override; |
39 | 46 |
40 static bool RegisterWebsiteSettingsPopupAndroid(JNIEnv* env); | 47 static bool RegisterWebsiteSettingsPopupAndroid(JNIEnv* env); |
41 | 48 |
42 private: | 49 private: |
43 // The presenter that controlls the Website Settings UI. | 50 // The presenter that controlls the Website Settings UI. |
44 scoped_ptr<WebsiteSettings> presenter_; | 51 scoped_ptr<WebsiteSettings> presenter_; |
45 | 52 |
46 // The java prompt implementation. | 53 // The java prompt implementation. |
47 base::android::ScopedJavaGlobalRef<jobject> popup_jobject_; | 54 base::android::ScopedJavaGlobalRef<jobject> popup_jobject_; |
48 | 55 |
| 56 GURL url_; |
| 57 |
49 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupAndroid); | 58 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupAndroid); |
50 }; | 59 }; |
51 | 60 |
52 #endif // CHROME_BROWSER_UI_ANDROID_WEBSITE_SETTINGS_POPUP_ANDROID_H_ | 61 #endif // CHROME_BROWSER_UI_ANDROID_WEBSITE_SETTINGS_POPUP_ANDROID_H_ |
OLD | NEW |