OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_DIALOGS_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
6 #define CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 // Shows the toolkit-views based BookmarkEditor. | 151 // Shows the toolkit-views based BookmarkEditor. |
152 void ShowBookmarkEditorViews(gfx::NativeWindow parent_window, | 152 void ShowBookmarkEditorViews(gfx::NativeWindow parent_window, |
153 Profile* profile, | 153 Profile* profile, |
154 const BookmarkEditor::EditDetails& details, | 154 const BookmarkEditor::EditDetails& details, |
155 BookmarkEditor::Configuration configuration); | 155 BookmarkEditor::Configuration configuration); |
156 | 156 |
157 payments::PaymentRequestDialog* CreatePaymentRequestDialog( | 157 payments::PaymentRequestDialog* CreatePaymentRequestDialog( |
158 payments::PaymentRequest* request); | 158 payments::PaymentRequest* request); |
159 | 159 |
| 160 // Used to return the target the user picked or nullopt if the user cancelled |
| 161 // the share. |
| 162 using WebShareTargetPickerCallback = |
| 163 base::OnceCallback<void(const base::Optional<std::string>&)>; |
| 164 |
160 // Shows the dialog to choose a share target app. |targets| is a list of app | 165 // Shows the dialog to choose a share target app. |targets| is a list of app |
161 // title and manifest URL pairs that will be shown in a list. If the user picks | 166 // title and manifest URL pairs that will be shown in a list. If the user picks |
162 // a target, this calls |callback| with the manifest URL of the chosen target, | 167 // a target, this calls |callback| with the manifest URL of the chosen target, |
163 // or supplies null if the user cancelled the share. | 168 // or supplies null if the user cancelled the share. |
164 void ShowWebShareTargetPickerDialog( | 169 void ShowWebShareTargetPickerDialog( |
165 gfx::NativeWindow parent_window, | 170 gfx::NativeWindow parent_window, |
166 const std::vector<std::pair<base::string16, GURL>>& targets, | 171 const std::vector<std::pair<base::string16, GURL>>& targets, |
167 const base::Callback<void(base::Optional<std::string>)>& callback); | 172 WebShareTargetPickerCallback callback); |
168 | 173 |
169 #if defined(OS_MACOSX) | 174 #if defined(OS_MACOSX) |
170 | 175 |
171 // This is a class so that it can be friended from ContentSettingBubbleContents, | 176 // This is a class so that it can be friended from ContentSettingBubbleContents, |
172 // which allows it to call SetAnchorRect(). | 177 // which allows it to call SetAnchorRect(). |
173 class ContentSettingBubbleViewsBridge { | 178 class ContentSettingBubbleViewsBridge { |
174 public: | 179 public: |
175 static void Show(gfx::NativeView parent_view, | 180 static void Show(gfx::NativeView parent_view, |
176 ContentSettingBubbleModel* model, | 181 ContentSettingBubbleModel* model, |
177 content::WebContents* web_contents, | 182 content::WebContents* web_contents, |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 using BubbleShowPtr = | 254 using BubbleShowPtr = |
250 void (*)(content::WebContents*, | 255 void (*)(content::WebContents*, |
251 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, | 256 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, |
252 const IntentPickerResponse&); | 257 const IntentPickerResponse&); |
253 | 258 |
254 BubbleShowPtr ShowIntentPickerBubble(); | 259 BubbleShowPtr ShowIntentPickerBubble(); |
255 | 260 |
256 #endif // OS_CHROMEOS | 261 #endif // OS_CHROMEOS |
257 | 262 |
258 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 263 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
OLD | NEW |