OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_CHOOSER_BUBBLE_UI_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_CHOOSER_BUBBLE_UI_VIEW_H_ |
| 7 |
| 8 #include "components/bubble/bubble_ui.h" |
| 9 #include "ui/views/bubble/bubble_border.h" |
| 10 |
| 11 namespace views { |
| 12 class View; |
| 13 } |
| 14 |
| 15 class Browser; |
| 16 class ChooserBubbleDelegate; |
| 17 class ChooserBubbleUiViewDelegate; |
| 18 |
| 19 // ChooserBubbleUiView implements a chooser-based permission model, |
| 20 // it uses table view to show a list of items (such as usb devices, etc.) |
| 21 // for user to grant permission. It can be used by WebUsb, WebBluetooth. |
| 22 class ChooserBubbleUiView : public BubbleUi { |
| 23 public: |
| 24 ChooserBubbleUiView(Browser* browser, |
| 25 ChooserBubbleDelegate* chooser_bubble_delegate); |
| 26 ~ChooserBubbleUiView() override; |
| 27 |
| 28 // BubbleUi: |
| 29 void Show(BubbleReference bubble_reference) override; |
| 30 void Close() override; |
| 31 void UpdateAnchorPosition() override; |
| 32 |
| 33 private: |
| 34 friend class ChooserBubbleUiViewDelegate; |
| 35 views::View* GetAnchorView(); |
| 36 views::BubbleBorder::Arrow GetAnchorArrow(); |
| 37 |
| 38 Browser* browser_; |
| 39 ChooserBubbleDelegate* chooser_bubble_delegate_; |
| 40 ChooserBubbleUiViewDelegate* chooser_bubble_ui_view_delegate_; |
| 41 }; |
| 42 |
| 43 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_CHOOSER_BUBBLE_UI_VIEW_H_ |
OLD | NEW |