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> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/optional.h" | 13 #include "base/optional.h" |
14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
16 #include "chrome/browser/ui/bookmarks/bookmark_editor.h" | 16 #include "chrome/browser/ui/bookmarks/bookmark_editor.h" |
17 #include "third_party/skia/include/core/SkColor.h" | 17 #include "third_party/skia/include/core/SkColor.h" |
18 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
19 | 19 |
20 #if defined(OS_CHROMEOS) | 20 #if defined(OS_CHROMEOS) |
21 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" | 21 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" |
22 #endif // OS_CHROMEOS | 22 #endif // OS_CHROMEOS |
23 | 23 |
24 class Browser; | 24 class Browser; |
25 class GURL; | 25 class GURL; |
26 class LoginHandler; | 26 class LoginHandler; |
27 class Profile; | 27 class Profile; |
28 struct WebApplicationInfo; | |
28 | 29 |
29 namespace content { | 30 namespace content { |
30 class BrowserContext; | 31 class BrowserContext; |
31 class ColorChooser; | 32 class ColorChooser; |
32 class WebContents; | 33 class WebContents; |
33 } | 34 } |
34 | 35 |
35 namespace extensions { | 36 namespace extensions { |
36 class Extension; | 37 class Extension; |
37 } | 38 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 #endif // defined(USE_ASH) | 96 #endif // defined(USE_ASH) |
96 | 97 |
97 // Shows the create chrome app shortcut dialog box. | 98 // Shows the create chrome app shortcut dialog box. |
98 // |close_callback| may be null. | 99 // |close_callback| may be null. |
99 void ShowCreateChromeAppShortcutsDialog( | 100 void ShowCreateChromeAppShortcutsDialog( |
100 gfx::NativeWindow parent_window, | 101 gfx::NativeWindow parent_window, |
101 Profile* profile, | 102 Profile* profile, |
102 const extensions::Extension* app, | 103 const extensions::Extension* app, |
103 const base::Callback<void(bool /* created */)>& close_callback); | 104 const base::Callback<void(bool /* created */)>& close_callback); |
104 | 105 |
106 // Callback type used with the ShowBookmarkAppDialog() method. The boolean | |
107 // parameter is true when the user accepts the dialog. The WebApplicationInfo | |
108 // parameter contains the WebApplicationInfo as edited by the user. | |
109 typedef base::Callback<void(bool, const WebApplicationInfo&)> | |
sky
2017/06/07 16:27:43
typedef->using and OnceCallback.
tapted
2017/06/08 01:52:31
Done.
| |
110 ShowBookmarkAppDialogCallback; | |
111 | |
112 // Shows the Bookmark App bubble. | |
113 // See Extension::InitFromValueFlags::FROM_BOOKMARK for a description of | |
114 // bookmark apps. | |
115 // | |
116 // |web_app_info| is the WebApplicationInfo being converted into an app. | |
117 void ShowBookmarkAppDialog(gfx::NativeWindow parent_window, | |
118 const WebApplicationInfo& web_app_info, | |
119 const ShowBookmarkAppDialogCallback& callback); | |
120 | |
105 // Shows a color chooser that reports to the given WebContents. | 121 // Shows a color chooser that reports to the given WebContents. |
106 content::ColorChooser* ShowColorChooser(content::WebContents* web_contents, | 122 content::ColorChooser* ShowColorChooser(content::WebContents* web_contents, |
107 SkColor initial_color); | 123 SkColor initial_color); |
108 | 124 |
109 #if defined(OS_MACOSX) | 125 #if defined(OS_MACOSX) |
110 | 126 |
111 // Shows a views zoom bubble at the |anchor_point|. This occurs when the zoom | 127 // Shows a views zoom bubble at the |anchor_point|. This occurs when the zoom |
112 // icon is clicked or when a shortcut key is pressed or whenever |web_contents| | 128 // icon is clicked or when a shortcut key is pressed or whenever |web_contents| |
113 // zoom factor changes. |user_action| is used to determine if the bubble will | 129 // zoom factor changes. |user_action| is used to determine if the bubble will |
114 // auto-close. | 130 // auto-close. |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
284 using BubbleShowPtr = | 300 using BubbleShowPtr = |
285 void (*)(content::WebContents*, | 301 void (*)(content::WebContents*, |
286 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, | 302 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, |
287 const IntentPickerResponse&); | 303 const IntentPickerResponse&); |
288 | 304 |
289 BubbleShowPtr ShowIntentPickerBubble(); | 305 BubbleShowPtr ShowIntentPickerBubble(); |
290 | 306 |
291 #endif // OS_CHROMEOS | 307 #endif // OS_CHROMEOS |
292 | 308 |
293 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 309 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
OLD | NEW |