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

Side by Side Diff: chrome/browser/ui/views/extensions/chooser_dialog_view.h

Issue 2033283002: Implement bluetooth chooser for Chrome Apps on non-Mac desktops (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor_ChooserBubbleUiViewDelegate
Patch Set: rebase again Created 4 years, 6 months 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 2016 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_EXTENSIONS_CHOOSER_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_CHOOSER_DIALOG_VIEW_H_
7
8 #include "base/macros.h"
9 #include "ui/views/controls/styled_label_listener.h"
10 #include "ui/views/controls/table/table_view_observer.h"
11 #include "ui/views/window/dialog_delegate.h"
12
13 class ChooserContentView;
14 class ChooserController;
15
16 namespace content {
17 class WebContents;
18 }
19
20 namespace views {
21 class TableView;
22 }
23
24 // Displays a chooser view as a modal dialog constrained
25 // to the window/tab displaying the given web contents.
26 class ChooserDialogView : public views::DialogDelegateView,
27 public views::StyledLabelListener,
28 public views::TableViewObserver {
29 public:
30 ChooserDialogView(content::WebContents* web_contents,
31 ChooserController* chooser_controller);
32 ~ChooserDialogView() override;
33
34 // views::WidgetDelegate:
35 base::string16 GetWindowTitle() const override;
36 bool ShouldShowCloseButton() const override;
37 ui::ModalType GetModalType() const override;
38
39 // views::DialogDelegate:
40 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
41 bool IsDialogButtonEnabled(ui::DialogButton button) const override;
42 views::View* CreateFootnoteView() override;
43 bool Accept() override;
44 bool Cancel() override;
45 bool Close() override;
46
47 // views::DialogDelegateView:
48 views::View* GetContentsView() override;
49 views::Widget* GetWidget() override;
50 const views::Widget* GetWidget() const override;
51
52 // views::StyledLabelListener:
53 void StyledLabelLinkClicked(views::StyledLabel* label,
54 const gfx::Range& range,
55 int event_flags) override;
56
57 // views::TableViewObserver:
58 void OnSelectionChanged() override;
59
60 views::TableView* table_view_for_test() const;
61
62 private:
63 ChooserContentView* chooser_content_view_;
64 content::WebContents* web_contents_;
65 ChooserController* chooser_controller_;
66
67 DISALLOW_COPY_AND_ASSIGN(ChooserDialogView);
68 };
69
70 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_CHOOSER_DIALOG_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/browser_dialogs_views.cc ('k') | chrome/browser/ui/views/extensions/chooser_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698