| OLD | NEW |
| 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 "chrome/browser/ui/website_settings/permission_prompt.h" | 8 #include "chrome/browser/ui/website_settings/permission_prompt.h" |
| 9 | 9 |
| 10 class GroupedPermissionInfoBarDelegate; | 10 class GroupedPermissionInfoBarDelegate; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 void SetDelegate(Delegate* delegate) override; | 27 void SetDelegate(Delegate* delegate) override; |
| 28 void Show(const std::vector<PermissionRequest*>& requests, | 28 void Show(const std::vector<PermissionRequest*>& requests, |
| 29 const std::vector<bool>& accept_state) override; | 29 const std::vector<bool>& accept_state) override; |
| 30 bool CanAcceptRequestUpdate() override; | 30 bool CanAcceptRequestUpdate() override; |
| 31 void Hide() override; | 31 void Hide() override; |
| 32 bool IsVisible() override; | 32 bool IsVisible() override; |
| 33 void UpdateAnchorPosition() override; | 33 void UpdateAnchorPosition() override; |
| 34 gfx::NativeWindow GetNativeWindow() override; | 34 gfx::NativeWindow GetNativeWindow() override; |
| 35 | 35 |
| 36 void Closing(); | 36 void Closing(); |
| 37 void Accept(); |
| 38 void Deny(); |
| 37 | 39 |
| 38 private: | 40 private: |
| 39 // PermissionPromptAndroid is owned by PermissionRequestManager, so it should | 41 // PermissionPromptAndroid is owned by PermissionRequestManager, so it should |
| 40 // be safe to hold a raw WebContents pointer here because this class is | 42 // be safe to hold a raw WebContents pointer here because this class is |
| 41 // destroyed before the WebContents. | 43 // destroyed before the WebContents. |
| 42 content::WebContents* web_contents_; | 44 content::WebContents* web_contents_; |
| 43 // |delegate_| is the PermissionRequestManager, which owns this object. | 45 // |delegate_| is the PermissionRequestManager, which owns this object. |
| 44 Delegate* delegate_; | 46 Delegate* delegate_; |
| 45 // |infobar_| is owned by the InfoBarService; we keep a pointer here so we can | 47 // |infobar_| is owned by the InfoBarService; we keep a pointer here so we can |
| 46 // ask the service to remove the infobar after it is added. | 48 // ask the service to remove the infobar after it is added. |
| 47 infobars::InfoBar* infobar_; | 49 infobars::InfoBar* infobar_; |
| 48 | 50 |
| 49 DISALLOW_COPY_AND_ASSIGN(PermissionPromptAndroid); | 51 DISALLOW_COPY_AND_ASSIGN(PermissionPromptAndroid); |
| 50 }; | 52 }; |
| 51 | 53 |
| 52 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_ANDROID_H_ | 54 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_ANDROID_H_ |
| OLD | NEW |