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

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: Dynamically enable/disable button 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/webshare/webshare_target_picker_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
14 #include "base/strings/string16.h"
13 #include "build/build_config.h" 15 #include "build/build_config.h"
14 #include "chrome/browser/ui/bookmarks/bookmark_editor.h" 16 #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" 17 #include "third_party/skia/include/core/SkColor.h"
17 #include "ui/gfx/native_widget_types.h" 18 #include "ui/gfx/native_widget_types.h"
18 19
19 #if defined(OS_CHROMEOS) 20 #if defined(OS_CHROMEOS)
20 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" 21 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h"
21 #endif // OS_CHROMEOS 22 #endif // OS_CHROMEOS
22 23
23 class Browser; 24 class Browser;
24 class ContentSettingBubbleModel; 25 class ContentSettingBubbleModel;
25 class GURL; 26 class GURL;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // Shows the toolkit-views based BookmarkEditor. 153 // Shows the toolkit-views based BookmarkEditor.
153 void ShowBookmarkEditorViews(gfx::NativeWindow parent_window, 154 void ShowBookmarkEditorViews(gfx::NativeWindow parent_window,
154 Profile* profile, 155 Profile* profile,
155 const BookmarkEditor::EditDetails& details, 156 const BookmarkEditor::EditDetails& details,
156 BookmarkEditor::Configuration configuration); 157 BookmarkEditor::Configuration configuration);
157 158
158 payments::PaymentRequestDialog* CreatePaymentRequestDialog( 159 payments::PaymentRequestDialog* CreatePaymentRequestDialog(
159 payments::PaymentRequest* request); 160 payments::PaymentRequest* request);
160 161
161 // Shows the dialog to choose a share target app. |targets| is a list of app 162 // Shows the dialog to choose a share target app. |targets| is a list of app
162 // titles that will be shown in a list. Calls |callback| with SHARE if an app 163 // title and manifest URL pairs that will be shown in a list. If the user picks
163 // was chosen, or CANCEL if the dialog was cancelled. 164 // a target, this calls |callback| with the manifest URL of the chosen target,
164 // TODO(mgiuca): Callback should provide info about the picked app. 165 // or supplies null if the user cancelled the share.
165 void ShowWebShareTargetPickerDialog( 166 void ShowWebShareTargetPickerDialog(
166 gfx::NativeWindow parent_window, 167 gfx::NativeWindow parent_window,
167 const std::vector<base::string16>& targets, 168 const std::vector<std::pair<base::string16, GURL>>& targets,
168 const base::Callback<void(SharePickerResult)>& callback); 169 const base::Callback<void(base::Optional<std::string>)>& callback);
169 170
170 #if defined(OS_MACOSX) 171 #if defined(OS_MACOSX)
171 172
172 // This is a class so that it can be friended from ContentSettingBubbleContents, 173 // This is a class so that it can be friended from ContentSettingBubbleContents,
173 // which allows it to call SetAnchorRect(). 174 // which allows it to call SetAnchorRect().
174 class ContentSettingBubbleViewsBridge { 175 class ContentSettingBubbleViewsBridge {
175 public: 176 public:
176 static void Show(gfx::NativeView parent_view, 177 static void Show(gfx::NativeView parent_view,
177 ContentSettingBubbleModel* model, 178 ContentSettingBubbleModel* model,
178 content::WebContents* web_contents, 179 content::WebContents* web_contents,
(...skipping 23 matching lines...) Expand all
202 using BubbleShowPtr = 203 using BubbleShowPtr =
203 void (*)(content::WebContents*, 204 void (*)(content::WebContents*,
204 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, 205 const std::vector<arc::ArcNavigationThrottle::AppInfo>&,
205 const IntentPickerResponse&); 206 const IntentPickerResponse&);
206 207
207 BubbleShowPtr ShowIntentPickerBubble(); 208 BubbleShowPtr ShowIntentPickerBubble();
208 209
209 #endif // OS_CHROMEOS 210 #endif // OS_CHROMEOS
210 211
211 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ 212 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_
OLDNEW
« 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