Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: chrome/browser/permissions/grouped_permission_infobar_delegate_android.h

Issue 2537083002: Make dismiss works for PermissionPromptAndroid (Closed)
Patch Set: remove dependency and land this first Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/permissions/grouped_permission_infobar_delegate_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROID_H _ 5 #ifndef CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROID_H _
6 #define CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROID_H _ 6 #define CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROID_H _
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // Message text to display for an individual permission at |position|. 44 // Message text to display for an individual permission at |position|.
45 base::string16 GetMessageTextFragment(size_t position) const; 45 base::string16 GetMessageTextFragment(size_t position) const;
46 46
47 // Toggle accept value for an individual permission at |position|. 47 // Toggle accept value for an individual permission at |position|.
48 void ToggleAccept(size_t position, bool new_value); 48 void ToggleAccept(size_t position, bool new_value);
49 49
50 // ConfirmInfoBarDelegate: 50 // ConfirmInfoBarDelegate:
51 base::string16 GetMessageText() const override; 51 base::string16 GetMessageText() const override;
52 bool Accept() override; 52 bool Accept() override;
53 bool Cancel() override; 53 bool Cancel() override;
54 void InfoBarDismissed() override;
54 55
55 void PermissionPromptDestroyed(); 56 void PermissionPromptDestroyed();
56 57
57 protected: 58 protected:
58 bool GetAcceptState(size_t position); 59 bool GetAcceptState(size_t position);
59 60
60 private: 61 private:
61 GroupedPermissionInfoBarDelegate( 62 GroupedPermissionInfoBarDelegate(
62 PermissionPromptAndroid* permission_prompt, 63 PermissionPromptAndroid* permission_prompt,
63 const GURL& requesting_origin, 64 const GURL& requesting_origin,
64 const std::vector<PermissionRequest*>& requests); 65 const std::vector<PermissionRequest*>& requests);
65 66
66 // ConfirmInfoBarDelegate: 67 // ConfirmInfoBarDelegate:
67 InfoBarIdentifier GetIdentifier() const override; 68 InfoBarIdentifier GetIdentifier() const override;
68 Type GetInfoBarType() const override; 69 Type GetInfoBarType() const override;
69 int GetButtons() const override; 70 int GetButtons() const override;
70 base::string16 GetButtonLabel(InfoBarButton button) const override; 71 base::string16 GetButtonLabel(InfoBarButton button) const override;
71 72
72 const GURL requesting_origin_; 73 const GURL requesting_origin_;
73 const std::vector<PermissionRequest*> requests_; 74 const std::vector<PermissionRequest*> requests_;
74 // Whether the accept/deny decision is persisted. 75 // Whether the accept/deny decision is persisted.
75 bool persist_; 76 bool persist_;
76 PermissionPromptAndroid* permission_prompt_; 77 PermissionPromptAndroid* permission_prompt_;
77 78
78 DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBarDelegate); 79 DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBarDelegate);
79 }; 80 };
80 81
81 #endif // CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROI D_H_ 82 #endif // CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROI D_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/permissions/grouped_permission_infobar_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698