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

Side by Side Diff: chrome/browser/ui/browser_dialogs.h

Issue 2667803002: Picker takes a vector of pairs, and passes back the user chosen target. (Closed)
Patch Set: Move replacing of placeholders to after picker Created 3 years, 10 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 unified diff | Download patch
OLDNEW
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>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/optional.h"
13 #include "build/build_config.h" 14 #include "build/build_config.h"
14 #include "chrome/browser/ui/bookmarks/bookmark_editor.h" 15 #include "chrome/browser/ui/bookmarks/bookmark_editor.h"
15 #include "chrome/browser/webshare/share_service_impl.h"
16 #include "third_party/skia/include/core/SkColor.h" 16 #include "third_party/skia/include/core/SkColor.h"
17 #include "ui/gfx/native_widget_types.h" 17 #include "ui/gfx/native_widget_types.h"
18 18
19 #if defined(OS_CHROMEOS) 19 #if defined(OS_CHROMEOS)
20 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" 20 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h"
21 #endif // OS_CHROMEOS 21 #endif // OS_CHROMEOS
22 22
23 class Browser; 23 class Browser;
24 class ContentSettingBubbleModel; 24 class ContentSettingBubbleModel;
25 class GURL; 25 class GURL;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 // Shows the toolkit-views based BookmarkEditor. 148 // Shows the toolkit-views based BookmarkEditor.
149 void ShowBookmarkEditorViews(gfx::NativeWindow parent_window, 149 void ShowBookmarkEditorViews(gfx::NativeWindow parent_window,
150 Profile* profile, 150 Profile* profile,
151 const BookmarkEditor::EditDetails& details, 151 const BookmarkEditor::EditDetails& details,
152 BookmarkEditor::Configuration configuration); 152 BookmarkEditor::Configuration configuration);
153 153
154 void ShowPaymentRequestDialog(payments::PaymentRequest* request); 154 void ShowPaymentRequestDialog(payments::PaymentRequest* request);
155 155
156 // Shows the dialog to choose a share target app. |targets| is a list of app 156 // Shows the dialog to choose a share target app. |targets| is a list of app
157 // titles that will be shown in a list. Calls |callback| with SHARE if an app 157 // titles that will be shown in a list. Calls |callback| with SHARE if an app
sky 2017/01/31 05:22:32 Update description
constantina 2017/01/31 23:29:42 Done.
158 // was chosen, or CANCEL if the dialog was cancelled. 158 // was chosen, or CANCEL if the dialog was cancelled.
159 // TODO(mgiuca): Callback should provide info about the picked app. 159 // TODO(mgiuca): Callback should provide info about the picked app.
160 void ShowWebShareTargetPickerDialog( 160 void ShowWebShareTargetPickerDialog(
161 gfx::NativeWindow parent_window, 161 gfx::NativeWindow parent_window,
162 const std::vector<base::string16>& targets, 162 const std::vector<base::string16>& targets,
163 const base::Callback<void(SharePickerResult)>& callback); 163 const base::Callback<void(base::Optional<base::string16>)>& callback);
164 164
165 #if defined(OS_MACOSX) 165 #if defined(OS_MACOSX)
166 166
167 // This is a class so that it can be friended from ContentSettingBubbleContents, 167 // This is a class so that it can be friended from ContentSettingBubbleContents,
168 // which allows it to call SetAnchorRect(). 168 // which allows it to call SetAnchorRect().
169 class ContentSettingBubbleViewsBridge { 169 class ContentSettingBubbleViewsBridge {
170 public: 170 public:
171 static void Show(gfx::NativeView parent_view, 171 static void Show(gfx::NativeView parent_view,
172 ContentSettingBubbleModel* model, 172 ContentSettingBubbleModel* model,
173 content::WebContents* web_contents, 173 content::WebContents* web_contents,
(...skipping 23 matching lines...) Expand all
197 using BubbleShowPtr = 197 using BubbleShowPtr =
198 void (*)(content::WebContents*, 198 void (*)(content::WebContents*,
199 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, 199 const std::vector<arc::ArcNavigationThrottle::AppInfo>&,
200 const IntentPickerResponse&); 200 const IntentPickerResponse&);
201 201
202 BubbleShowPtr ShowIntentPickerBubble(); 202 BubbleShowPtr ShowIntentPickerBubble();
203 203
204 #endif // OS_CHROMEOS 204 #endif // OS_CHROMEOS
205 205
206 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ 206 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698