OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_PERMISSIONS_PERMISSION_GROUP_INFOBAR_DELEGATE_AND
ROID_H_ |
| 6 #define CHROME_BROWSER_ANDROID_PERMISSIONS_PERMISSION_GROUP_INFOBAR_DELEGATE_AND
ROID_H_ |
| 7 |
| 8 #include "base/android/scoped_java_ref.h" |
| 9 #include "base/callback.h" |
| 10 #include "base/strings/string16.h" |
| 11 #include "components/content_settings/core/common/content_settings.h" |
| 12 #include "components/infobars/core/confirm_infobar_delegate.h" |
| 13 #include "content/public/common/manifest.h" |
| 14 #include "ui/gfx/image/image.h" |
| 15 #include "url/gurl.h" |
| 16 |
| 17 namespace content { |
| 18 class WebContents; |
| 19 } |
| 20 |
| 21 namespace infobars { |
| 22 class InfoBarManager; |
| 23 } // namespace infobars |
| 24 |
| 25 class PermissionGroupInfoBar; |
| 26 class PermissionInfobarRequest; |
| 27 |
| 28 // Manages installation of an app being promoted by a webpage. |
| 29 class PermissionGroupInfoBarDelegateAndroid : public ConfirmInfoBarDelegate { |
| 30 public: |
| 31 PermissionGroupInfoBarDelegateAndroid( |
| 32 const GURL& requesting_frame, |
| 33 const std::string& display_languages, |
| 34 const base::Callback<void( |
| 35 bool, const std::vector<ContentSetting>&)>& callback); |
| 36 ~PermissionGroupInfoBarDelegateAndroid() override; |
| 37 |
| 38 // For use by PermissionGroupInfoBar. |
| 39 void OnCheckedStateUpdate(jboolean* raw_checked_states, |
| 40 int array_size); |
| 41 |
| 42 // ConfirmInfoBarDelegate: |
| 43 base::string16 GetMessageText() const override; |
| 44 |
| 45 private: |
| 46 // ConfirmInfoBarDelegate: |
| 47 gfx::Image GetIcon() const override; |
| 48 void InfoBarDismissed() override; |
| 49 int GetButtons() const override; |
| 50 bool Accept() override; |
| 51 bool LinkClicked(WindowOpenDisposition disposition) override; |
| 52 |
| 53 GURL requesting_frame_; |
| 54 std::string display_languages_; |
| 55 base::Callback<void(bool, const std::vector<ContentSetting>&)> callback_; |
| 56 std::vector<ContentSetting> checked_states_; |
| 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(PermissionGroupInfoBarDelegateAndroid); |
| 59 }; // AppBannerInfoBarDelegateAndroid |
| 60 |
| 61 #endif // CHROME_BROWSER_ANDROID_PERMISSIONS_PERMISSION_GROUP_INFOBAR_DELEGATE_
ANDROID_H_ |
OLD | NEW |