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

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

Issue 2849143002: webshare: Small refactor of WebShare (OnceCallback, const&, and alias) (Closed)
Patch Set: improve comment 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..e1bd574bbe12e1c5443c4bc362d49d2a39583f6d 100644
--- a/chrome/browser/ui/browser_dialogs.h
+++ b/chrome/browser/ui/browser_dialogs.h
@@ -73,6 +73,11 @@ class WebDialogDelegate;
namespace chrome {
+// Used by ShowWebShareTargetPickerDialog to return the target the user picked
+// or nullopt if the user cancelled the share.
+using WebShareTargetPickerCallback =
+ 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
+
// Shows or hides the Task Manager. |browser| can be NULL when called from Ash.
// Returns a pointer to the underlying TableModel, which can be ignored, or used
// for testing.
@@ -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);
+ const 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