Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1769)

Unified Diff: chrome/browser/ui/browser_dialogs.h

Issue 2849143002: webshare: Small refactor of WebShare (OnceCallback, const&, and alias) (Closed)
Patch Set: Add new line Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/webshare/webshare_target_picker_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_dialogs.h
diff --git a/chrome/browser/ui/browser_dialogs.h b/chrome/browser/ui/browser_dialogs.h
index e82786079f6c931ae562f9a175afe233d9f37b7a..92c92d4da4595993d2196e83e3d4788341730dce 100644
--- a/chrome/browser/ui/browser_dialogs.h
+++ b/chrome/browser/ui/browser_dialogs.h
@@ -157,6 +157,11 @@ void ShowBookmarkEditorViews(gfx::NativeWindow parent_window,
payments::PaymentRequestDialog* CreatePaymentRequestDialog(
payments::PaymentRequest* request);
+// Used to return the target the user picked or nullopt if the user cancelled
+// the share.
+using WebShareTargetPickerCallback =
+ base::OnceCallback<void(const base::Optional<std::string>&)>;
+
// Shows the dialog to choose a share target app. |targets| is a list of app
// title and manifest URL pairs that will be shown in a list. If the user picks
// a target, this calls |callback| with the manifest URL of the chosen target,
@@ -164,7 +169,7 @@ payments::PaymentRequestDialog* CreatePaymentRequestDialog(
void ShowWebShareTargetPickerDialog(
gfx::NativeWindow parent_window,
const std::vector<std::pair<base::string16, GURL>>& targets,
- const base::Callback<void(base::Optional<std::string>)>& callback);
+ WebShareTargetPickerCallback callback);
#if defined(OS_MACOSX)
« no previous file with comments | « no previous file | chrome/browser/ui/views/webshare/webshare_target_picker_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698