Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_CHOOSER_CONTENT_VIEW_H_ | |
| 6 #define CHROME_BROWSER_UI_VIEWS_CHOOSER_CONTENT_VIEW_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "base/strings/string16.h" | |
| 12 #include "ui/base/ui_base_types.h" | |
| 13 | |
| 14 class ChooserController; | |
| 15 class ChooserTableModel; | |
| 16 | |
| 17 namespace ui { | |
| 18 class TableModel; | |
| 19 } | |
| 20 | |
| 21 namespace views { | |
| 22 class StyledLabel; | |
| 23 class StyledLabelListener; | |
| 24 class TableView; | |
| 25 class TableViewObserver; | |
| 26 } | |
| 27 | |
| 28 // A bubble or dialog view for choosing among several options in a table. | |
| 29 // Used for WebUSB/WebBluetooth device selection for Chrome and extensions. | |
| 30 class ChooserContentView { | |
| 31 public: | |
| 32 ChooserContentView(views::TableViewObserver* observer, | |
| 33 ChooserController* chooser_controller); | |
| 34 ~ChooserContentView(); | |
|
msw
2016/06/08 00:58:45
nit: "= default;"?
juncai
2016/06/09 01:59:21
Changed ChooserContentView to be a subclass of vie
| |
| 35 | |
| 36 base::string16 GetDialogButtonLabel(ui::DialogButton button) const; | |
| 37 bool IsDialogButtonEnabled(ui::DialogButton button) const; | |
| 38 // The returned view is owned by its parent view. | |
|
msw
2016/06/08 00:58:45
nit: remove this comment or say "Ownership of the
juncai
2016/06/09 01:59:21
Done.
| |
| 39 views::StyledLabel* CreateFootnoteView( | |
| 40 views::StyledLabelListener* listener) const; | |
| 41 | |
| 42 views::TableView* table_view() const { return table_view_; } | |
| 43 | |
| 44 private: | |
| 45 // |table_view_| is not owned by this class, it is owned by its parent view. | |
|
msw
2016/06/08 00:58:45
nit: remove this comment; that's standard behavior
juncai
2016/06/09 01:59:21
Done.
| |
| 46 views::TableView* table_view_; | |
| 47 std::unique_ptr<ChooserTableModel> chooser_table_model_; | |
| 48 DISALLOW_COPY_AND_ASSIGN(ChooserContentView); | |
|
msw
2016/06/08 00:58:45
nit: add a blank line above
juncai
2016/06/09 01:59:21
Done.
| |
| 49 }; | |
| 50 | |
| 51 #endif // CHROME_BROWSER_UI_VIEWS_CHOOSER_CONTENT_VIEW_H_ | |
| OLD | NEW |