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

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

Issue 2755593002: Remove pointer from PermissionPromptAndroid to InfoBar (Closed)
Patch Set: fix comment Created 3 years, 8 months 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // Toggle accept value for an individual permission at |position|. 44 // Toggle accept value for an individual permission at |position|.
45 void ToggleAccept(size_t position, bool new_value); 45 void ToggleAccept(size_t position, bool new_value);
46 46
47 // ConfirmInfoBarDelegate: 47 // ConfirmInfoBarDelegate:
48 base::string16 GetMessageText() const override; 48 base::string16 GetMessageText() const override;
49 bool Accept() override; 49 bool Accept() override;
50 bool Cancel() override; 50 bool Cancel() override;
51 void InfoBarDismissed() override; 51 void InfoBarDismissed() override;
52 52
53 void PermissionPromptDestroyed();
54
55 protected: 53 protected:
56 bool GetAcceptState(size_t position); 54 bool GetAcceptState(size_t position);
57 55
58 private: 56 private:
59 GroupedPermissionInfoBarDelegate(PermissionPromptAndroid* permission_prompt, 57 GroupedPermissionInfoBarDelegate(PermissionPromptAndroid* permission_prompt,
60 const GURL& requesting_origin); 58 const GURL& requesting_origin);
61 59
62 // ConfirmInfoBarDelegate: 60 // ConfirmInfoBarDelegate:
63 InfoBarIdentifier GetIdentifier() const override; 61 InfoBarIdentifier GetIdentifier() const override;
64 Type GetInfoBarType() const override; 62 Type GetInfoBarType() const override;
65 int GetButtons() const override; 63 int GetButtons() const override;
66 base::string16 GetButtonLabel(InfoBarButton button) const override; 64 base::string16 GetButtonLabel(InfoBarButton button) const override;
67 65
66 // InfoBarDelegate:
67 bool EqualsDelegate(infobars::InfoBarDelegate* delegate) const override;
68
68 const GURL requesting_origin_; 69 const GURL requesting_origin_;
69 // Whether the accept/deny decision is persisted. 70 // Whether the accept/deny decision is persisted.
70 bool persist_; 71 bool persist_;
71 PermissionPromptAndroid* permission_prompt_; 72 PermissionPromptAndroid* permission_prompt_;
72 73
73 DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBarDelegate); 74 DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBarDelegate);
74 }; 75 };
75 76
76 #endif // CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_ANDROI D_H_ 77 #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