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

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

Issue 2909453002: Support persist toggle in PermissionRequestManager path on Android (Closed)
Patch Set: rebase Created 3 years, 6 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
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_PERMISSION_PROMPT_ANDROID_H_ 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_ANDROID_H_
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_ANDROID_H_ 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_ANDROID_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 12 matching lines...) Expand all
23 // PermissionPrompt: 23 // PermissionPrompt:
24 void SetDelegate(Delegate* delegate) override; 24 void SetDelegate(Delegate* delegate) override;
25 void Show() override; 25 void Show() override;
26 bool CanAcceptRequestUpdate() override; 26 bool CanAcceptRequestUpdate() override;
27 bool HidesAutomatically() override; 27 bool HidesAutomatically() override;
28 void Hide() override; 28 void Hide() override;
29 void UpdateAnchorPosition() override; 29 void UpdateAnchorPosition() override;
30 gfx::NativeWindow GetNativeWindow() override; 30 gfx::NativeWindow GetNativeWindow() override;
31 31
32 void Closing(); 32 void Closing();
33 void TogglePersist(bool value);
33 void ToggleAccept(int index, bool value); 34 void ToggleAccept(int index, bool value);
34 void Accept(); 35 void Accept();
35 void Deny(); 36 void Deny();
36 37
37 size_t PermissionCount() const; 38 size_t PermissionCount() const;
39 bool ShouldShowPersistenceToggle() const;
38 ContentSettingsType GetContentSettingType(size_t position) const; 40 ContentSettingsType GetContentSettingType(size_t position) const;
39 int GetIconIdForPermission(size_t position) const; 41 int GetIconIdForPermission(size_t position) const;
40 base::string16 GetMessageText(size_t position) const; 42 base::string16 GetMessageText(size_t position) const;
41 base::string16 GetMessageTextFragment(size_t position) const; 43 base::string16 GetMessageTextFragment(size_t position) const;
42 44
43 private: 45 private:
44 // PermissionPromptAndroid is owned by PermissionRequestManager, so it should 46 // PermissionPromptAndroid is owned by PermissionRequestManager, so it should
45 // be safe to hold a raw WebContents pointer here because this class is 47 // be safe to hold a raw WebContents pointer here because this class is
46 // destroyed before the WebContents. 48 // destroyed before the WebContents.
47 content::WebContents* web_contents_; 49 content::WebContents* web_contents_;
48 // |delegate_| is the PermissionRequestManager, which owns this object. 50 // |delegate_| is the PermissionRequestManager, which owns this object.
49 Delegate* delegate_; 51 Delegate* delegate_;
50 52
51 DISALLOW_COPY_AND_ASSIGN(PermissionPromptAndroid); 53 DISALLOW_COPY_AND_ASSIGN(PermissionPromptAndroid);
52 }; 54 };
53 55
54 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_ANDROID_H_ 56 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_ANDROID_H_
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permission_infobar_delegate.cc ('k') | chrome/browser/permissions/permission_prompt_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698