| Index: chrome/browser/ui/views/webshare/webshare_target_picker_view.h
|
| diff --git a/chrome/browser/ui/views/webshare/webshare_target_picker_view.h b/chrome/browser/ui/views/webshare/webshare_target_picker_view.h
|
| index b3898a7f602e795f63f3d14484a984f3c469ab77..bb455fe17136d9fa1aa29a5580647650208f5cd8 100644
|
| --- a/chrome/browser/ui/views/webshare/webshare_target_picker_view.h
|
| +++ b/chrome/browser/ui/views/webshare/webshare_target_picker_view.h
|
| @@ -11,13 +11,16 @@
|
| #include "base/macros.h"
|
| #include "base/strings/string16.h"
|
| #include "chrome/browser/ui/browser_dialogs.h"
|
| -#include "ui/base/models/table_model.h"
|
| #include "ui/base/ui_base_types.h"
|
| -#include "ui/views/controls/table/table_view.h"
|
| #include "ui/views/controls/table/table_view_observer.h"
|
| #include "ui/views/window/dialog_delegate.h"
|
|
|
| class GURL;
|
| +class TargetPickerTableModel;
|
| +
|
| +namespace views {
|
| +class TableView;
|
| +}
|
|
|
| // Dialog that presents the user with a list of share target apps. Allows the
|
| // user to pick one target to be opened and have data passed to it.
|
| @@ -26,8 +29,7 @@ class GURL;
|
| // in-development feature (Web Share) behind a runtime flag. It should not be
|
| // used by any released code until going through UI review.
|
| class WebShareTargetPickerView : public views::DialogDelegateView,
|
| - public views::TableViewObserver,
|
| - public ui::TableModel {
|
| + public views::TableViewObserver {
|
| public:
|
| // |targets| is a list of app title and manifest URL pairs that will be shown
|
| // in a list. If the user picks a target, this calls |callback| with the
|
| @@ -56,15 +58,11 @@ class WebShareTargetPickerView : public views::DialogDelegateView,
|
| void OnSelectionChanged() override;
|
| void OnDoubleClick() override;
|
|
|
| - // ui::TableModel overrides:
|
| - int RowCount() override;
|
| - base::string16 GetText(int row, int column_id) override;
|
| - void SetObserver(ui::TableModelObserver* observer) override;
|
| -
|
| private:
|
| - views::TableView* table_;
|
| + views::TableView* table_ = nullptr;
|
|
|
| const std::vector<std::pair<base::string16, GURL>> targets_;
|
| + std::unique_ptr<TargetPickerTableModel> table_model_;
|
|
|
| base::Callback<void(base::Optional<std::string>)> close_callback_;
|
|
|
|
|