Chromium Code Reviews| Index: chrome/browser/ui/views/chooser_content_view.h |
| diff --git a/chrome/browser/ui/views/chooser_content_view.h b/chrome/browser/ui/views/chooser_content_view.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d2f325767dd61cf6e4812de9c99986fa38e9d9b7 |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/chooser_content_view.h |
| @@ -0,0 +1,51 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_VIEWS_CHOOSER_CONTENT_VIEW_H_ |
| +#define CHROME_BROWSER_UI_VIEWS_CHOOSER_CONTENT_VIEW_H_ |
| + |
| +#include <memory> |
| + |
| +#include "base/macros.h" |
| +#include "base/strings/string16.h" |
| +#include "ui/base/ui_base_types.h" |
| + |
| +class ChooserController; |
| +class ChooserTableModel; |
| + |
| +namespace ui { |
| +class TableModel; |
| +} |
| + |
| +namespace views { |
| +class StyledLabel; |
| +class StyledLabelListener; |
| +class TableView; |
| +class TableViewObserver; |
| +} |
| + |
| +// A bubble or dialog view for choosing among several options in a table. |
| +// Used for WebUSB/WebBluetooth device selection for Chrome and extensions. |
| +class ChooserContentView { |
| + public: |
| + ChooserContentView(views::TableViewObserver* observer, |
| + ChooserController* chooser_controller); |
| + ~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
|
| + |
| + base::string16 GetDialogButtonLabel(ui::DialogButton button) const; |
| + bool IsDialogButtonEnabled(ui::DialogButton button) const; |
| + // 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.
|
| + views::StyledLabel* CreateFootnoteView( |
| + views::StyledLabelListener* listener) const; |
| + |
| + views::TableView* table_view() const { return table_view_; } |
| + |
| + private: |
| + // |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.
|
| + views::TableView* table_view_; |
| + std::unique_ptr<ChooserTableModel> chooser_table_model_; |
| + 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.
|
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_CHOOSER_CONTENT_VIEW_H_ |