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

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 felt@'s comments 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 class ChooserOptions;
19
20 // ChooserBubbleUiView implements a chooser-based permission model,
21 // it uses table view to show a list of items (such as usb devices, etc.)
22 // for user to grant permission. It can be used by WebUsb, WebBluetooth.
23 class ChooserBubbleUiView : public BubbleUi {
24 public:
25 ChooserBubbleUiView(Browser* browser,
26 ChooserOptions* chooser_options,
27 ChooserBubbleDelegate* chooser_bubble_delegate);
28 ~ChooserBubbleUiView() override;
29
30 // BubbleUi:
31 void Show(BubbleReference bubble_reference) override;
32 void Close() override;
33 void UpdateAnchorPosition() override;
34
35 private:
36 friend class ChooserBubbleUiViewDelegate;
37 views::View* GetAnchorView();
38 views::BubbleBorder::Arrow GetAnchorArrow();
39
40 Browser* browser_;
41 ChooserOptions* chooser_options_;
42 ChooserBubbleDelegate* chooser_bubble_delegate_;
43 ChooserBubbleUiViewDelegate* chooser_bubble_ui_view_delegate_;
44 };
45
46 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_CHOOSER_BUBBLE_UI_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698