| 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_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 gfx::NativeWindow GetNativeWindow() override; | 37 gfx::NativeWindow GetNativeWindow() override; |
| 38 | 38 |
| 39 void Closing(); | 39 void Closing(); |
| 40 void Toggle(int index, bool value); | 40 void Toggle(int index, bool value); |
| 41 void Accept(); | 41 void Accept(); |
| 42 void Deny(); | 42 void Deny(); |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 // These three functions have separate implementations for Views-based and | 45 // These three functions have separate implementations for Views-based and |
| 46 // Cocoa-based browsers, to allow this bubble to be used in either. | 46 // Cocoa-based browsers, to allow this bubble to be used in either. |
| 47 |
| 48 // Returns the view to anchor the permission bubble to. May be null. |
| 47 views::View* GetAnchorView(); | 49 views::View* GetAnchorView(); |
| 50 // Returns the anchor point to anchor the permission bubble to, as a fallback. |
| 51 // Only used if GetAnchorView() returns nullptr. |
| 48 gfx::Point GetAnchorPoint(); | 52 gfx::Point GetAnchorPoint(); |
| 53 // Returns the type of arrow to display on the permission bubble. |
| 49 views::BubbleBorder::Arrow GetAnchorArrow(); | 54 views::BubbleBorder::Arrow GetAnchorArrow(); |
| 50 | 55 |
| 51 Browser* browser_; | 56 Browser* browser_; |
| 52 Delegate* delegate_; | 57 Delegate* delegate_; |
| 53 PermissionsBubbleDialogDelegateView* bubble_delegate_; | 58 PermissionsBubbleDialogDelegateView* bubble_delegate_; |
| 54 | 59 |
| 55 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleViewViews); | 60 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleViewViews); |
| 56 }; | 61 }; |
| 57 | 62 |
| 58 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ | 63 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ |
| OLD | NEW |