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 // Delegate for infobar which is displayed when multiple permissions are | |
gone
2015/09/28 10:48:43
"requested." pushes you over 80 chars?
Lalit Maganti
2015/09/28 12:41:25
Unfortunately yes :(
| |
29 // requested. | |
30 class PermissionGroupInfoBarDelegateAndroid : public ConfirmInfoBarDelegate { | |
31 public: | |
32 PermissionGroupInfoBarDelegateAndroid( | |
33 const GURL& requesting_frame, | |
34 const std::string& display_languages, | |
35 const base::Callback<void( | |
36 bool, const std::vector<ContentSetting>&)>& callback); | |
37 ~PermissionGroupInfoBarDelegateAndroid() override; | |
38 | |
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 }; // PermissionGroupInfoBarDelegateAndroid | |
60 | |
61 #endif // CHROME_BROWSER_ANDROID_PERMISSIONS_PERMISSION_GROUP_INFOBAR_DELEGATE_ ANDROID_H_ | |
OLD | NEW |