Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_WEBSHARE_WEBSHARE_TARGET_PICKER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_WEBSHARE_WEBSHARE_TARGET_PICKER_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_WEBSHARE_WEBSHARE_TARGET_PICKER_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_WEBSHARE_WEBSHARE_TARGET_PICKER_VIEW_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 // |targets| is a list of app title and manifest URL pairs that will be shown | 35 // |targets| is a list of app title and manifest URL pairs that will be shown |
| 36 // in a list. If the user picks a target, this calls |callback| with the | 36 // in a list. If the user picks a target, this calls |callback| with the |
| 37 // manifest URL of the chosen target, or returns null if the user cancelled | 37 // manifest URL of the chosen target, or returns null if the user cancelled |
| 38 // the share. | 38 // the share. |
| 39 WebShareTargetPickerView( | 39 WebShareTargetPickerView( |
| 40 const std::vector<std::pair<base::string16, GURL>>& targets, | 40 const std::vector<std::pair<base::string16, GURL>>& targets, |
| 41 const base::Callback<void(base::Optional<std::string>)>& | 41 const base::Callback<void(base::Optional<std::string>)>& |
| 42 close_callback); | 42 close_callback); |
| 43 ~WebShareTargetPickerView() override; | 43 ~WebShareTargetPickerView() override; |
| 44 | 44 |
| 45 // views::View overrides: | 45 // views::DialogDelegateView overrides: |
| 46 gfx::Size GetPreferredSize() const override; | 46 gfx::Size GetUnsnappedPreferredSize() const override; |
|
Peter Kasting
2017/03/30 00:35:36
Nit: Combine with two sections below
| |
| 47 | 47 |
| 48 // views::WidgetDelegate overrides: | 48 // views::WidgetDelegate overrides: |
| 49 ui::ModalType GetModalType() const override; | 49 ui::ModalType GetModalType() const override; |
| 50 base::string16 GetWindowTitle() const override; | 50 base::string16 GetWindowTitle() const override; |
| 51 | 51 |
| 52 // views::DialogDelegate overrides: | 52 // views::DialogDelegate overrides: |
| 53 bool Cancel() override; | 53 bool Cancel() override; |
| 54 bool Accept() override; | 54 bool Accept() override; |
| 55 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; | 55 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; |
| 56 bool IsDialogButtonEnabled(ui::DialogButton button) const override; | 56 bool IsDialogButtonEnabled(ui::DialogButton button) const override; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 67 | 67 |
| 68 const std::vector<std::pair<base::string16, GURL>> targets_; | 68 const std::vector<std::pair<base::string16, GURL>> targets_; |
| 69 std::unique_ptr<TargetPickerTableModel> table_model_; | 69 std::unique_ptr<TargetPickerTableModel> table_model_; |
| 70 | 70 |
| 71 base::Callback<void(base::Optional<std::string>)> close_callback_; | 71 base::Callback<void(base::Optional<std::string>)> close_callback_; |
| 72 | 72 |
| 73 DISALLOW_COPY_AND_ASSIGN(WebShareTargetPickerView); | 73 DISALLOW_COPY_AND_ASSIGN(WebShareTargetPickerView); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 #endif // CHROME_BROWSER_UI_VIEWS_WEBSHARE_WEBSHARE_TARGET_PICKER_VIEW_H_ | 76 #endif // CHROME_BROWSER_UI_VIEWS_WEBSHARE_WEBSHARE_TARGET_PICKER_VIEW_H_ |
| OLD | NEW |