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> |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 // Make sure to use the returned window only when you know it is safe | 87 // Make sure to use the returned window only when you know it is safe |
88 // to do so, i.e. before OnDialogClosed() is called on the delegate. | 88 // to do so, i.e. before OnDialogClosed() is called on the delegate. |
89 gfx::NativeWindow ShowWebDialog(gfx::NativeView parent, | 89 gfx::NativeWindow ShowWebDialog(gfx::NativeView parent, |
90 content::BrowserContext* context, | 90 content::BrowserContext* context, |
91 ui::WebDialogDelegate* delegate); | 91 ui::WebDialogDelegate* delegate); |
92 #endif // !defined(OS_MACOSX) | 92 #endif // !defined(OS_MACOSX) |
93 | 93 |
94 #if defined(USE_ASH) | 94 #if defined(USE_ASH) |
95 // Creates and shows an HTML dialog with the given delegate and browser context. | 95 // Creates and shows an HTML dialog with the given delegate and browser context. |
96 // The dialog is placed in the ash window hierarchy in the given container. | 96 // The dialog is placed in the ash window hierarchy in the given container. |
97 // Returns the created window. | |
sky
2017/05/11 15:04:11
Document the lifetime of the returned window and w
Qiang(Joe) Xu
2017/05/12 21:50:45
Add the same comment as above: The window is autom
| |
97 // See ash/public/cpp/shell_window_ids.h for |container_id| values. The window | 98 // See ash/public/cpp/shell_window_ids.h for |container_id| values. The window |
98 // is destroyed when it is closed. See also chrome::ShowWebDialog(). | 99 // is destroyed when it is closed. See also chrome::ShowWebDialog(). |
99 void ShowWebDialogInContainer(int container_id, | 100 gfx::NativeWindow ShowWebDialogInContainer(int container_id, |
100 content::BrowserContext* context, | 101 content::BrowserContext* context, |
101 ui::WebDialogDelegate* delegate); | 102 ui::WebDialogDelegate* delegate); |
102 #endif // defined(USE_ASH) | 103 #endif // defined(USE_ASH) |
103 | 104 |
104 // Shows the create chrome app shortcut dialog box. | 105 // Shows the create chrome app shortcut dialog box. |
105 // |close_callback| may be null. | 106 // |close_callback| may be null. |
106 void ShowCreateChromeAppShortcutsDialog( | 107 void ShowCreateChromeAppShortcutsDialog( |
107 gfx::NativeWindow parent_window, | 108 gfx::NativeWindow parent_window, |
108 Profile* profile, | 109 Profile* profile, |
109 const extensions::Extension* app, | 110 const extensions::Extension* app, |
110 const base::Callback<void(bool /* created */)>& close_callback); | 111 const base::Callback<void(bool /* created */)>& close_callback); |
111 | 112 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
277 using BubbleShowPtr = | 278 using BubbleShowPtr = |
278 void (*)(content::WebContents*, | 279 void (*)(content::WebContents*, |
279 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, | 280 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, |
280 const IntentPickerResponse&); | 281 const IntentPickerResponse&); |
281 | 282 |
282 BubbleShowPtr ShowIntentPickerBubble(); | 283 BubbleShowPtr ShowIntentPickerBubble(); |
283 | 284 |
284 #endif // OS_CHROMEOS | 285 #endif // OS_CHROMEOS |
285 | 286 |
286 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 287 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
OLD | NEW |