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

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

Issue 2122073004: Display extension name on device chooser title (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_chooser_controller_to_chrome_browser
Patch Set: removed unused variable Created 4 years, 5 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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_EXTENSIONS_CHOOSER_DIALOG_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_CHOOSER_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_CHOOSER_DIALOG_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_CHOOSER_DIALOG_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/views/controls/styled_label_listener.h" 11 #include "ui/views/controls/styled_label_listener.h"
12 #include "ui/views/controls/table/table_view_observer.h" 12 #include "ui/views/controls/table/table_view_observer.h"
13 #include "ui/views/window/dialog_delegate.h" 13 #include "ui/views/window/dialog_delegate.h"
14 #include "url/origin.h"
15 14
16 class ChooserContentView; 15 class ChooserContentView;
17 class ChooserController; 16 class ChooserController;
18 17
19 namespace content {
20 class WebContents;
21 }
22
23 namespace views { 18 namespace views {
24 class TableView; 19 class TableView;
25 } 20 }
26 21
27 // Displays a chooser view as a modal dialog constrained 22 // Displays a chooser view as a modal dialog constrained
28 // to the window/tab displaying the given web contents. 23 // to the window/tab displaying the given web contents.
29 class ChooserDialogView : public views::DialogDelegateView, 24 class ChooserDialogView : public views::DialogDelegateView,
30 public views::StyledLabelListener, 25 public views::StyledLabelListener,
31 public views::TableViewObserver { 26 public views::TableViewObserver {
32 public: 27 public:
33 ChooserDialogView(content::WebContents* web_contents, 28 explicit ChooserDialogView(
34 std::unique_ptr<ChooserController> chooser_controller); 29 std::unique_ptr<ChooserController> chooser_controller);
35 ~ChooserDialogView() override; 30 ~ChooserDialogView() override;
36 31
37 // views::WidgetDelegate: 32 // views::WidgetDelegate:
38 base::string16 GetWindowTitle() const override; 33 base::string16 GetWindowTitle() const override;
39 bool ShouldShowCloseButton() const override; 34 bool ShouldShowCloseButton() const override;
40 ui::ModalType GetModalType() const override; 35 ui::ModalType GetModalType() const override;
41 36
42 // views::DialogDelegate: 37 // views::DialogDelegate:
43 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; 38 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
44 bool IsDialogButtonEnabled(ui::DialogButton button) const override; 39 bool IsDialogButtonEnabled(ui::DialogButton button) const override;
(...skipping 11 matching lines...) Expand all
56 void StyledLabelLinkClicked(views::StyledLabel* label, 51 void StyledLabelLinkClicked(views::StyledLabel* label,
57 const gfx::Range& range, 52 const gfx::Range& range,
58 int event_flags) override; 53 int event_flags) override;
59 54
60 // views::TableViewObserver: 55 // views::TableViewObserver:
61 void OnSelectionChanged() override; 56 void OnSelectionChanged() override;
62 57
63 views::TableView* table_view_for_test() const; 58 views::TableView* table_view_for_test() const;
64 59
65 private: 60 private:
66 content::WebContents* web_contents_;
67 url::Origin origin_;
68 ChooserContentView* chooser_content_view_; 61 ChooserContentView* chooser_content_view_;
69 62
70 DISALLOW_COPY_AND_ASSIGN(ChooserDialogView); 63 DISALLOW_COPY_AND_ASSIGN(ChooserDialogView);
71 }; 64 };
72 65
73 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_CHOOSER_DIALOG_VIEW_H_ 66 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_CHOOSER_DIALOG_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chooser_content_view.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