Index: chrome/browser/android/permissions/permission_group_infobar_delegate_android.h |
diff --git a/chrome/browser/android/permissions/permission_group_infobar_delegate_android.h b/chrome/browser/android/permissions/permission_group_infobar_delegate_android.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b58d329b2ada697b2b5ccba98d423e3e40b6b51c |
--- /dev/null |
+++ b/chrome/browser/android/permissions/permission_group_infobar_delegate_android.h |
@@ -0,0 +1,61 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_ANDROID_PERMISSIONS_PERMISSION_GROUP_INFOBAR_DELEGATE_ANDROID_H_ |
+#define CHROME_BROWSER_ANDROID_PERMISSIONS_PERMISSION_GROUP_INFOBAR_DELEGATE_ANDROID_H_ |
+ |
+#include "base/android/scoped_java_ref.h" |
+#include "base/callback.h" |
+#include "base/strings/string16.h" |
+#include "components/content_settings/core/common/content_settings.h" |
+#include "components/infobars/core/confirm_infobar_delegate.h" |
+#include "content/public/common/manifest.h" |
+#include "ui/gfx/image/image.h" |
+#include "url/gurl.h" |
+ |
+namespace content { |
+class WebContents; |
+} |
+ |
+namespace infobars { |
+class InfoBarManager; |
+} // namespace infobars |
+ |
+class PermissionGroupInfoBar; |
+class PermissionInfobarRequest; |
+ |
+// Manages installation of an app being promoted by a webpage. |
+class PermissionGroupInfoBarDelegateAndroid : public ConfirmInfoBarDelegate { |
+ public: |
+ PermissionGroupInfoBarDelegateAndroid( |
+ const GURL& requesting_frame, |
+ const std::string& display_languages, |
+ const base::Callback<void( |
+ bool, const std::vector<ContentSetting>&)>& callback); |
+ ~PermissionGroupInfoBarDelegateAndroid() override; |
+ |
+ // For use by PermissionGroupInfoBar. |
+ void OnCheckedStateUpdate(jboolean* raw_checked_states, |
+ int array_size); |
+ |
+ // ConfirmInfoBarDelegate: |
+ base::string16 GetMessageText() const override; |
+ |
+ private: |
+ // ConfirmInfoBarDelegate: |
+ gfx::Image GetIcon() const override; |
+ void InfoBarDismissed() override; |
+ int GetButtons() const override; |
+ bool Accept() override; |
+ bool LinkClicked(WindowOpenDisposition disposition) override; |
+ |
+ GURL requesting_frame_; |
+ std::string display_languages_; |
+ base::Callback<void(bool, const std::vector<ContentSetting>&)> callback_; |
+ std::vector<ContentSetting> checked_states_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(PermissionGroupInfoBarDelegateAndroid); |
+}; // AppBannerInfoBarDelegateAndroid |
+ |
+#endif // CHROME_BROWSER_ANDROID_PERMISSIONS_PERMISSION_GROUP_INFOBAR_DELEGATE_ANDROID_H_ |