| 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 "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "chrome/browser/ui/bookmarks/bookmark_editor.h" | 14 #include "chrome/browser/ui/bookmarks/bookmark_editor.h" |
| 15 #include "third_party/skia/include/core/SkColor.h" | 15 #include "third_party/skia/include/core/SkColor.h" |
| 16 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 17 | 17 |
| 18 #if defined(OS_CHROMEOS) | 18 #if defined(OS_CHROMEOS) |
| 19 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" | 19 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" |
| 20 #endif // OS_CHROMEOS | 20 #endif // OS_CHROMEOS |
| 21 | 21 |
| 22 class Browser; | 22 class Browser; |
| 23 class ContentSettingBubbleModel; | 23 class ContentSettingBubbleModel; |
| 24 class GURL; | 24 class GURL; |
| 25 class LoginHandler; | 25 class LoginHandler; |
| 26 class Profile; | 26 class Profile; |
| 27 | 27 |
| 28 namespace base { | |
| 29 struct Feature; | |
| 30 } | |
| 31 | |
| 32 namespace bookmarks { | 28 namespace bookmarks { |
| 33 class BookmarkBubbleObserver; | 29 class BookmarkBubbleObserver; |
| 34 } | 30 } |
| 35 | 31 |
| 36 namespace content { | 32 namespace content { |
| 37 class BrowserContext; | 33 class BrowserContext; |
| 38 class ColorChooser; | 34 class ColorChooser; |
| 39 class WebContents; | 35 class WebContents; |
| 40 } | 36 } |
| 41 | 37 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 59 namespace task_manager { | 55 namespace task_manager { |
| 60 class TaskManagerTableModel; | 56 class TaskManagerTableModel; |
| 61 } | 57 } |
| 62 | 58 |
| 63 namespace ui { | 59 namespace ui { |
| 64 class WebDialogDelegate; | 60 class WebDialogDelegate; |
| 65 } | 61 } |
| 66 | 62 |
| 67 namespace chrome { | 63 namespace chrome { |
| 68 | 64 |
| 69 #if defined(OS_MACOSX) | |
| 70 // Makes ToolkitViewsDialogsEnabled() available to chrome://flags. | |
| 71 extern const base::Feature kMacViewsNativeDialogs; | |
| 72 | |
| 73 // Makes ToolkitViewsWebUIDialogsEnabled() available to chrome://flags. | |
| 74 extern const base::Feature kMacViewsWebUIDialogs; | |
| 75 #endif // OS_MACOSX | |
| 76 | |
| 77 // Shows or hides the Task Manager. |browser| can be NULL when called from Ash. | 65 // Shows or hides the Task Manager. |browser| can be NULL when called from Ash. |
| 78 // Returns a pointer to the underlying TableModel, which can be ignored, or used | 66 // Returns a pointer to the underlying TableModel, which can be ignored, or used |
| 79 // for testing. | 67 // for testing. |
| 80 task_manager::TaskManagerTableModel* ShowTaskManager(Browser* browser); | 68 task_manager::TaskManagerTableModel* ShowTaskManager(Browser* browser); |
| 81 void HideTaskManager(); | 69 void HideTaskManager(); |
| 82 | 70 |
| 83 #if !defined(OS_MACOSX) | 71 #if !defined(OS_MACOSX) |
| 84 // Creates and shows an HTML dialog with the given delegate and context. | 72 // Creates and shows an HTML dialog with the given delegate and context. |
| 85 // The window is automatically destroyed when it is closed. | 73 // The window is automatically destroyed when it is closed. |
| 86 // Returns the created window. | 74 // Returns the created window. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 115 Profile* profile, | 103 Profile* profile, |
| 116 const extensions::Extension* app, | 104 const extensions::Extension* app, |
| 117 const base::Callback<void(bool /* created */)>& close_callback); | 105 const base::Callback<void(bool /* created */)>& close_callback); |
| 118 | 106 |
| 119 // Shows a color chooser that reports to the given WebContents. | 107 // Shows a color chooser that reports to the given WebContents. |
| 120 content::ColorChooser* ShowColorChooser(content::WebContents* web_contents, | 108 content::ColorChooser* ShowColorChooser(content::WebContents* web_contents, |
| 121 SkColor initial_color); | 109 SkColor initial_color); |
| 122 | 110 |
| 123 #if defined(OS_MACOSX) | 111 #if defined(OS_MACOSX) |
| 124 | 112 |
| 125 // For Mac, returns true if Chrome should show an equivalent toolkit-views based | |
| 126 // dialog instead of a native-looking Cocoa dialog. | |
| 127 bool ToolkitViewsDialogsEnabled(); | |
| 128 | |
| 129 // For Mac, returns true if Chrome should show an equivalent toolkit-views based | |
| 130 // dialog instead of a WebUI-styled Cocoa dialog. | |
| 131 bool ToolkitViewsWebUIDialogsEnabled(); | |
| 132 | |
| 133 // Shows a Views website settings bubble at the given anchor point. | 113 // Shows a Views website settings bubble at the given anchor point. |
| 134 void ShowWebsiteSettingsBubbleViewsAtPoint( | 114 void ShowWebsiteSettingsBubbleViewsAtPoint( |
| 135 const gfx::Point& anchor_point, | 115 const gfx::Point& anchor_point, |
| 136 Profile* profile, | 116 Profile* profile, |
| 137 content::WebContents* web_contents, | 117 content::WebContents* web_contents, |
| 138 const GURL& virtual_url, | 118 const GURL& virtual_url, |
| 139 const security_state::SecurityInfo& security_info); | 119 const security_state::SecurityInfo& security_info); |
| 140 | 120 |
| 141 // Show a Views bookmark bubble at the given point. This occurs when the | 121 // Show a Views bookmark bubble at the given point. This occurs when the |
| 142 // bookmark star is clicked or "Bookmark This Page..." is selected from a menu | 122 // bookmark star is clicked or "Bookmark This Page..." is selected from a menu |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 using BubbleShowPtr = | 181 using BubbleShowPtr = |
| 202 void (*)(content::WebContents*, | 182 void (*)(content::WebContents*, |
| 203 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, | 183 const std::vector<arc::ArcNavigationThrottle::AppInfo>&, |
| 204 const IntentPickerResponse&); | 184 const IntentPickerResponse&); |
| 205 | 185 |
| 206 BubbleShowPtr ShowIntentPickerBubble(); | 186 BubbleShowPtr ShowIntentPickerBubble(); |
| 207 | 187 |
| 208 #endif // OS_CHROMEOS | 188 #endif // OS_CHROMEOS |
| 209 | 189 |
| 210 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 190 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
| OLD | NEW |