Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_CHOOSER_BUBBLE_UI_VIEW_H_ | 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_ | 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_CHOOSER_BUBBLE_UI_VIEW_H_ |
| 7 | 7 |
| 8 #include "components/bubble/bubble_ui.h" | 8 #include "components/bubble/bubble_ui.h" |
| 9 #include "ui/views/bubble/bubble_border.h" | 9 #include "ui/views/bubble/bubble_border.h" |
| 10 | 10 |
| 11 namespace views { | 11 namespace views { |
| 12 class View; | 12 class View; |
| 13 } | 13 } |
| 14 | 14 |
| 15 class Browser; | 15 class Browser; |
| 16 class ChooserBubbleController; | 16 class ChooserController; |
| 17 class ChooserBubbleUiViewDelegate; | 17 class ChooserBubbleUiViewDelegate; |
| 18 | 18 |
| 19 // ChooserBubbleUiView implements a chooser-based permission model, | 19 // ChooserBubbleUiView implements a chooser-based permission model, |
| 20 // it uses table view to show a list of items (such as usb devices, etc.) | 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. | 21 // for user to grant permission. It can be used by WebUsb, WebBluetooth. |
| 22 class ChooserBubbleUiView : public BubbleUi { | 22 class ChooserBubbleUiView : public BubbleUi { |
| 23 public: | 23 public: |
| 24 ChooserBubbleUiView(Browser* browser, ChooserBubbleController* controller); | 24 ChooserBubbleUiView(Browser* browser, ChooserController* controller); |
|
sky
2016/05/17 21:10:45
Document ownership.
juncai
2016/05/19 23:29:14
Done.
| |
| 25 ~ChooserBubbleUiView() override; | 25 ~ChooserBubbleUiView() override; |
| 26 | 26 |
| 27 // BubbleUi: | 27 // BubbleUi: |
| 28 void Show(BubbleReference bubble_reference) override; | 28 void Show(BubbleReference bubble_reference) override; |
| 29 void Close() override; | 29 void Close() override; |
| 30 void UpdateAnchorPosition() override; | 30 void UpdateAnchorPosition() override; |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 friend class ChooserBubbleUiViewDelegate; | 33 friend class ChooserBubbleUiViewDelegate; |
| 34 views::View* GetAnchorView(); | 34 views::View* GetAnchorView(); |
| 35 views::BubbleBorder::Arrow GetAnchorArrow(); | 35 views::BubbleBorder::Arrow GetAnchorArrow(); |
| 36 | 36 |
| 37 Browser* browser_; | 37 Browser* browser_; |
| 38 ChooserBubbleController* controller_; | 38 ChooserController* controller_; |
| 39 ChooserBubbleUiViewDelegate* chooser_bubble_ui_view_delegate_; | 39 ChooserBubbleUiViewDelegate* chooser_bubble_ui_view_delegate_; |
| 40 }; | 40 }; |
|
sky
2016/05/17 21:10:45
nit: DISALLOW_...
juncai
2016/05/19 23:29:14
Done.
| |
| 41 | 41 |
| 42 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_CHOOSER_BUBBLE_UI_VIEW_H_ | 42 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_CHOOSER_BUBBLE_UI_VIEW_H_ |
| OLD | NEW |