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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 namespace task_manager { | 66 namespace task_manager { |
67 class TaskManagerTableModel; | 67 class TaskManagerTableModel; |
68 } | 68 } |
69 | 69 |
70 namespace ui { | 70 namespace ui { |
71 class WebDialogDelegate; | 71 class WebDialogDelegate; |
72 } | 72 } |
73 | 73 |
74 namespace chrome { | 74 namespace chrome { |
75 | 75 |
76 // Used by ShowWebShareTargetPickerDialog to return the target the user picked | |
77 // or nullopt if the user cancelled the share. | |
78 using WebShareTargetPickerCallback = | |
79 base::Callback<void(const base::Optional<std::string>&)>; | |
Matt Giuca
2017/05/01 06:50:06
I think this should go at the bottom of the file -
ortuno
2017/05/01 07:13:02
As discussed the alias has to be defined before it
sky
2017/05/01 21:08:50
optional: put this right above the the single plac
ortuno
2017/05/01 22:55:00
Done. Q: Is it usually just a judgement call where
| |
80 | |
76 // Shows or hides the Task Manager. |browser| can be NULL when called from Ash. | 81 // Shows or hides the Task Manager. |browser| can be NULL when called from Ash. |
77 // Returns a pointer to the underlying TableModel, which can be ignored, or used | 82 // Returns a pointer to the underlying TableModel, which can be ignored, or used |
78 // for testing. | 83 // for testing. |
79 task_manager::TaskManagerTableModel* ShowTaskManager(Browser* browser); | 84 task_manager::TaskManagerTableModel* ShowTaskManager(Browser* browser); |
80 void HideTaskManager(); | 85 void HideTaskManager(); |
81 | 86 |
82 #if !defined(OS_MACOSX) | 87 #if !defined(OS_MACOSX) |
83 // Creates and shows an HTML dialog with the given delegate and context. | 88 // Creates and shows an HTML dialog with the given delegate and context. |
84 // The window is automatically destroyed when it is closed. | 89 // The window is automatically destroyed when it is closed. |
85 // Returns the created window. | 90 // Returns the created window. |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
157 payments::PaymentRequestDialog* CreatePaymentRequestDialog( | 162 payments::PaymentRequestDialog* CreatePaymentRequestDialog( |
158 payments::PaymentRequest* request); | 163 payments::PaymentRequest* request); |
159 | 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 const 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 |