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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 }; | 167 }; |
168 | 168 |
169 #endif // OS_MACOSX | 169 #endif // OS_MACOSX |
170 | 170 |
171 #endif // TOOLKIT_VIEWS | 171 #endif // TOOLKIT_VIEWS |
172 | 172 |
173 } // namespace chrome | 173 } // namespace chrome |
174 | 174 |
175 #if defined(OS_CHROMEOS) | 175 #if defined(OS_CHROMEOS) |
176 | 176 |
| 177 // This callback informs the package name of the app selected by the user, along |
| 178 // with the reason why the Bubble was closed. The string param must have a valid |
| 179 // package name, except when the CloseReason is ERROR or DIALOG_DEACTIVATED, for |
| 180 // these cases we return a dummy value which won't be used at all and has no |
| 181 // significance. |
| 182 using IntentPickerResponse = |
| 183 base::Callback<void(std::string, arc::ArcNavigationThrottle::CloseReason)>; |
| 184 |
177 // Return a pointer to the IntentPickerBubbleView::ShowBubble method. | 185 // Return a pointer to the IntentPickerBubbleView::ShowBubble method. |
178 using BubbleShowPtr = void (*)( | 186 using BubbleShowPtr = |
179 content::WebContents*, | 187 void (*)(content::WebContents*, |
180 const std::vector<std::pair<std::basic_string<char>, gfx::Image>>&, | 188 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, |
181 const base::Callback<void(size_t, | 189 const IntentPickerResponse&); |
182 arc::ArcNavigationThrottle::CloseReason)>&); | |
183 | 190 |
184 BubbleShowPtr ShowIntentPickerBubble(); | 191 BubbleShowPtr ShowIntentPickerBubble(); |
185 | 192 |
186 #endif // OS_CHROMEOS | 193 #endif // OS_CHROMEOS |
187 | 194 |
188 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 195 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
OLD | NEW |