| 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 <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "chrome/browser/ui/website_settings/permission_bubble_view.h" | 13 #include "chrome/browser/ui/website_settings/permission_bubble_view.h" |
| 14 #include "ui/gfx/geometry/point.h" |
| 13 #include "ui/views/bubble/bubble_border.h" | 15 #include "ui/views/bubble/bubble_border.h" |
| 14 | 16 |
| 15 namespace views { | 17 namespace views { |
| 16 class View; | 18 class View; |
| 17 } | 19 } |
| 18 | 20 |
| 19 class Browser; | 21 class Browser; |
| 20 class PermissionsBubbleDialogDelegateView; | 22 class PermissionsBubbleDialogDelegateView; |
| 21 | 23 |
| 22 class PermissionBubbleViewViews : public PermissionBubbleView { | 24 class PermissionBubbleViewViews : public PermissionBubbleView { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 33 bool IsVisible() override; | 35 bool IsVisible() override; |
| 34 void UpdateAnchorPosition() override; | 36 void UpdateAnchorPosition() override; |
| 35 gfx::NativeWindow GetNativeWindow() override; | 37 gfx::NativeWindow GetNativeWindow() override; |
| 36 | 38 |
| 37 void Closing(); | 39 void Closing(); |
| 38 void Toggle(int index, bool value); | 40 void Toggle(int index, bool value); |
| 39 void Accept(); | 41 void Accept(); |
| 40 void Deny(); | 42 void Deny(); |
| 41 | 43 |
| 42 private: | 44 private: |
| 45 // These three functions have separate implementations for Views-based and |
| 46 // Cocoa-based browsers, to allow this bubble to be used in either. |
| 43 views::View* GetAnchorView(); | 47 views::View* GetAnchorView(); |
| 48 gfx::Point GetAnchorPoint(); |
| 44 views::BubbleBorder::Arrow GetAnchorArrow(); | 49 views::BubbleBorder::Arrow GetAnchorArrow(); |
| 45 | 50 |
| 46 Browser* browser_; | 51 Browser* browser_; |
| 47 Delegate* delegate_; | 52 Delegate* delegate_; |
| 48 PermissionsBubbleDialogDelegateView* bubble_delegate_; | 53 PermissionsBubbleDialogDelegateView* bubble_delegate_; |
| 49 | 54 |
| 50 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleViewViews); | 55 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleViewViews); |
| 51 }; | 56 }; |
| 52 | 57 |
| 53 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ | 58 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ |
| OLD | NEW |