| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_UI_VIEWS_PERMISSION_BUBBLE_PERMISSION_PROMPT_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PERMISSION_BUBBLE_PERMISSION_PROMPT_IMPL_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PERMISSION_BUBBLE_PERMISSION_PROMPT_IMPL_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PERMISSION_BUBBLE_PERMISSION_PROMPT_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // PermissionPrompt: | 29 // PermissionPrompt: |
| 30 void SetDelegate(Delegate* delegate) override; | 30 void SetDelegate(Delegate* delegate) override; |
| 31 void Show() override; | 31 void Show() override; |
| 32 bool CanAcceptRequestUpdate() override; | 32 bool CanAcceptRequestUpdate() override; |
| 33 bool HidesAutomatically() override; | 33 bool HidesAutomatically() override; |
| 34 void Hide() override; | 34 void Hide() override; |
| 35 void UpdateAnchorPosition() override; | 35 void UpdateAnchorPosition() override; |
| 36 gfx::NativeWindow GetNativeWindow() override; | 36 gfx::NativeWindow GetNativeWindow() override; |
| 37 | 37 |
| 38 void Closing(); | 38 void Closing(); |
| 39 void ToggleAccept(int index, bool value); | |
| 40 void TogglePersist(bool value); | 39 void TogglePersist(bool value); |
| 41 void Accept(); | 40 void Accept(); |
| 42 void Deny(); | 41 void Deny(); |
| 43 | 42 |
| 44 private: | 43 private: |
| 45 // These three functions have separate implementations for Views-based and | 44 // These three functions have separate implementations for Views-based and |
| 46 // Cocoa-based browsers, to allow this bubble to be used in either. | 45 // Cocoa-based browsers, to allow this bubble to be used in either. |
| 47 | 46 |
| 48 // Returns the view to anchor the permission bubble to. May be null. | 47 // Returns the view to anchor the permission bubble to. May be null. |
| 49 views::View* GetAnchorView(); | 48 views::View* GetAnchorView(); |
| 50 // Returns the anchor point to anchor the permission bubble to, as a fallback. | 49 // Returns the anchor point to anchor the permission bubble to, as a fallback. |
| 51 // Only used if GetAnchorView() returns nullptr. | 50 // Only used if GetAnchorView() returns nullptr. |
| 52 gfx::Point GetAnchorPoint(); | 51 gfx::Point GetAnchorPoint(); |
| 53 // Returns the type of arrow to display on the permission bubble. | 52 // Returns the type of arrow to display on the permission bubble. |
| 54 views::BubbleBorder::Arrow GetAnchorArrow(); | 53 views::BubbleBorder::Arrow GetAnchorArrow(); |
| 55 | 54 |
| 56 Browser* browser_; | 55 Browser* browser_; |
| 57 Delegate* delegate_; | 56 Delegate* delegate_; |
| 58 PermissionsBubbleDialogDelegateView* bubble_delegate_; | 57 PermissionsBubbleDialogDelegateView* bubble_delegate_; |
| 59 | 58 |
| 60 DISALLOW_COPY_AND_ASSIGN(PermissionPromptImpl); | 59 DISALLOW_COPY_AND_ASSIGN(PermissionPromptImpl); |
| 61 }; | 60 }; |
| 62 | 61 |
| 63 #endif // CHROME_BROWSER_UI_VIEWS_PERMISSION_BUBBLE_PERMISSION_PROMPT_IMPL_H_ | 62 #endif // CHROME_BROWSER_UI_VIEWS_PERMISSION_BUBBLE_PERMISSION_PROMPT_IMPL_H_ |
| OLD | NEW |