| OLD | NEW |
| 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_CHOOSER_CONTENT_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_CHOOSER_CONTENT_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_CHOOSER_CONTENT_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_CHOOSER_CONTENT_VIEW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // Used for WebUSB/WebBluetooth device selection for Chrome and extensions. | 30 // Used for WebUSB/WebBluetooth device selection for Chrome and extensions. |
| 31 class ChooserContentView : public views::View { | 31 class ChooserContentView : public views::View { |
| 32 public: | 32 public: |
| 33 ChooserContentView(views::TableViewObserver* observer, | 33 ChooserContentView(views::TableViewObserver* observer, |
| 34 std::unique_ptr<ChooserController> chooser_controller); | 34 std::unique_ptr<ChooserController> chooser_controller); |
| 35 ~ChooserContentView() override; | 35 ~ChooserContentView() override; |
| 36 | 36 |
| 37 // views::View: | 37 // views::View: |
| 38 gfx::Size GetPreferredSize() const override; | 38 gfx::Size GetPreferredSize() const override; |
| 39 | 39 |
| 40 base::string16 GetWindowTitle() const; |
| 40 base::string16 GetDialogButtonLabel(ui::DialogButton button) const; | 41 base::string16 GetDialogButtonLabel(ui::DialogButton button) const; |
| 41 bool IsDialogButtonEnabled(ui::DialogButton button) const; | 42 bool IsDialogButtonEnabled(ui::DialogButton button) const; |
| 42 // Ownership of the view is passed to the caller. | 43 // Ownership of the view is passed to the caller. |
| 43 views::StyledLabel* CreateFootnoteView( | 44 views::StyledLabel* CreateFootnoteView( |
| 44 views::StyledLabelListener* listener) const; | 45 views::StyledLabelListener* listener) const; |
| 45 void Accept(); | 46 void Accept(); |
| 46 void Cancel(); | 47 void Cancel(); |
| 47 void Close(); | 48 void Close(); |
| 48 void StyledLabelLinkClicked(); | 49 void StyledLabelLinkClicked(); |
| 49 void UpdateTableModel(); | 50 void UpdateTableModel(); |
| 50 | 51 |
| 51 views::TableView* table_view_for_test() const { return table_view_; } | 52 views::TableView* table_view_for_test() const { return table_view_; } |
| 52 | 53 |
| 53 private: | 54 private: |
| 54 std::unique_ptr<ChooserController> chooser_controller_; | 55 std::unique_ptr<ChooserController> chooser_controller_; |
| 55 std::unique_ptr<ChooserTableModel> chooser_table_model_; | 56 std::unique_ptr<ChooserTableModel> chooser_table_model_; |
| 56 views::TableView* table_view_; | 57 views::TableView* table_view_; |
| 57 | 58 |
| 58 DISALLOW_COPY_AND_ASSIGN(ChooserContentView); | 59 DISALLOW_COPY_AND_ASSIGN(ChooserContentView); |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 #endif // CHROME_BROWSER_UI_VIEWS_CHOOSER_CONTENT_VIEW_H_ | 62 #endif // CHROME_BROWSER_UI_VIEWS_CHOOSER_CONTENT_VIEW_H_ |
| OLD | NEW |