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 LoginHandler; | 25 class LoginHandler; |
26 class Profile; | 26 class Profile; |
27 class SigninManager; | |
27 class WebShareTarget; | 28 class WebShareTarget; |
28 struct WebApplicationInfo; | 29 struct WebApplicationInfo; |
29 | 30 |
31 namespace base { | |
32 class TimeDelta; | |
33 } | |
34 | |
30 namespace content { | 35 namespace content { |
31 class BrowserContext; | 36 class BrowserContext; |
32 class ColorChooser; | 37 class ColorChooser; |
33 class WebContents; | 38 class WebContents; |
34 } | 39 } |
35 | 40 |
36 namespace extensions { | 41 namespace extensions { |
37 class Extension; | 42 class Extension; |
38 } | 43 } |
39 | 44 |
(...skipping 12 matching lines...) Expand all Loading... | |
52 } | 57 } |
53 | 58 |
54 namespace task_manager { | 59 namespace task_manager { |
55 class TaskManagerTableModel; | 60 class TaskManagerTableModel; |
56 } | 61 } |
57 | 62 |
58 namespace ui { | 63 namespace ui { |
59 class WebDialogDelegate; | 64 class WebDialogDelegate; |
60 } | 65 } |
61 | 66 |
67 namespace views { | |
68 class Widget; | |
69 } | |
70 | |
62 namespace chrome { | 71 namespace chrome { |
63 | 72 |
64 // Shows or hides the Task Manager. |browser| can be NULL when called from Ash. | 73 // Shows or hides the Task Manager. |browser| can be NULL when called from Ash. |
65 // Returns a pointer to the underlying TableModel, which can be ignored, or used | 74 // Returns a pointer to the underlying TableModel, which can be ignored, or used |
66 // for testing. | 75 // for testing. |
67 task_manager::TaskManagerTableModel* ShowTaskManager(Browser* browser); | 76 task_manager::TaskManagerTableModel* ShowTaskManager(Browser* browser); |
68 void HideTaskManager(); | 77 void HideTaskManager(); |
69 | 78 |
70 #if !defined(OS_MACOSX) | 79 #if !defined(OS_MACOSX) |
71 // Creates and shows an HTML dialog with the given delegate and context. | 80 // Creates and shows an HTML dialog with the given delegate and context. |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
152 // Shows the dialog to choose a share target app. |targets| is a list of app | 161 // Shows the dialog to choose a share target app. |targets| is a list of app |
153 // title and manifest URL pairs that will be shown in a list. If the user picks | 162 // title and manifest URL pairs that will be shown in a list. If the user picks |
154 // a target, this calls |callback| with the manifest URL of the chosen target, | 163 // a target, this calls |callback| with the manifest URL of the chosen target, |
155 // or supplies null if the user cancelled the share. | 164 // or supplies null if the user cancelled the share. |
156 void ShowWebShareTargetPickerDialog(gfx::NativeWindow parent_window, | 165 void ShowWebShareTargetPickerDialog(gfx::NativeWindow parent_window, |
157 std::vector<WebShareTarget> targets, | 166 std::vector<WebShareTarget> targets, |
158 WebShareTargetPickerCallback callback); | 167 WebShareTargetPickerCallback callback); |
159 | 168 |
160 #endif // TOOLKIT_VIEWS | 169 #endif // TOOLKIT_VIEWS |
161 | 170 |
171 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX) | |
172 | |
173 // Show the ForcedReauthenticationDialog for |profile|. If there're no opened | |
174 // browser windows for |profile|, |signin_manager| will be called to signed out | |
175 // immediately. Otherwise, dialog will be closed with all browser windows are | |
176 // assoicated to |profile| after |countdown_duration| if there is no reauth. | |
177 views::Widget* ShowForcedReauthenticationDialog( | |
sky
2017/06/22 14:52:02
Remember, no platform specific ui code here.
Also,
zmin
2017/06/23 00:58:40
And I have moved the new class/function Declaratio
| |
178 Profile* profile, | |
179 SigninManager* signin_manager, | |
180 base::TimeDelta countdown_duration); | |
181 | |
182 #endif // TOOLKIT_VIEWS && !OS_MACOSX | |
183 | |
162 // Values used in the Dialog.Creation UMA metric. Each value represents a | 184 // Values used in the Dialog.Creation UMA metric. Each value represents a |
163 // different type of dialog box. | 185 // different type of dialog box. |
164 // These values are written to logs. New enum values can be added, but existing | 186 // These values are written to logs. New enum values can be added, but existing |
165 // enums must never be renumbered or deleted and reused. | 187 // enums must never be renumbered or deleted and reused. |
166 enum class DialogIdentifier { | 188 enum class DialogIdentifier { |
167 UNKNOWN = 0, | 189 UNKNOWN = 0, |
168 TRANSLATE = 1, | 190 TRANSLATE = 1, |
169 BOOKMARK = 2, | 191 BOOKMARK = 2, |
170 BOOKMARK_EDITOR = 3, | 192 BOOKMARK_EDITOR = 3, |
171 DESKTOP_MEDIA_PICKER = 4, | 193 DESKTOP_MEDIA_PICKER = 4, |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
278 using BubbleShowPtr = | 300 using BubbleShowPtr = |
279 void (*)(content::WebContents*, | 301 void (*)(content::WebContents*, |
280 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, | 302 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, |
281 const IntentPickerResponse&); | 303 const IntentPickerResponse&); |
282 | 304 |
283 BubbleShowPtr ShowIntentPickerBubble(); | 305 BubbleShowPtr ShowIntentPickerBubble(); |
284 | 306 |
285 #endif // OS_CHROMEOS | 307 #endif // OS_CHROMEOS |
286 | 308 |
287 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 309 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
OLD | NEW |