Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Side by Side Diff: chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.h

Issue 1408193003: Add chrome side webusb permission UI code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address sky@'s comments, added TODO to chrome_bubble_manager.cc Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW
« no previous file with comments | « chrome/browser/ui/chrome_bubble_manager.cc ('k') | chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698