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

Side by Side Diff: chrome/browser/ui/browser_dialogs.h

Issue 2148243004: chrome::ShowTaskManager: refine return type to eliminate a downcast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@triple_click_tm
Patch Set: Fix mac compile. Created 4 years, 5 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
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>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 namespace gfx { 47 namespace gfx {
48 class Image; 48 class Image;
49 class Point; 49 class Point;
50 } 50 }
51 51
52 namespace net { 52 namespace net {
53 class AuthChallengeInfo; 53 class AuthChallengeInfo;
54 class URLRequest; 54 class URLRequest;
55 } 55 }
56 56
57 namespace task_management {
58 class TaskManagerTableModel;
59 }
60
57 namespace ui { 61 namespace ui {
58 class TableModel;
59 class WebDialogDelegate; 62 class WebDialogDelegate;
60 } 63 }
61 64
62 namespace chrome { 65 namespace chrome {
63 66
64 #if defined(OS_MACOSX) 67 #if defined(OS_MACOSX)
65 // Makes ToolkitViewsDialogsEnabled() available to chrome://flags. 68 // Makes ToolkitViewsDialogsEnabled() available to chrome://flags.
66 extern const base::Feature kMacViewsNativeDialogs; 69 extern const base::Feature kMacViewsNativeDialogs;
67 70
68 // Makes ToolkitViewsWebUIDialogsEnabled() available to chrome://flags. 71 // Makes ToolkitViewsWebUIDialogsEnabled() available to chrome://flags.
69 extern const base::Feature kMacViewsWebUIDialogs; 72 extern const base::Feature kMacViewsWebUIDialogs;
70 #endif // OS_MACOSX 73 #endif // OS_MACOSX
71 74
72 // Shows or hides the Task Manager. |browser| can be NULL when called from Ash. 75 // Shows or hides the Task Manager. |browser| can be NULL when called from Ash.
73 // Returns a pointer to the underlying TableModel, which can be ignored, or used 76 // Returns a pointer to the underlying TableModel, which can be ignored, or used
74 // for testing. 77 // for testing.
75 ui::TableModel* ShowTaskManager(Browser* browser); 78 task_management::TaskManagerTableModel* ShowTaskManager(Browser* browser);
76 void HideTaskManager(); 79 void HideTaskManager();
77 80
78 #if !defined(OS_MACOSX) 81 #if !defined(OS_MACOSX)
79 // Creates and shows an HTML dialog with the given delegate and context. 82 // Creates and shows an HTML dialog with the given delegate and context.
80 // The window is automatically destroyed when it is closed. 83 // The window is automatically destroyed when it is closed.
81 // Returns the created window. 84 // Returns the created window.
82 // 85 //
83 // Make sure to use the returned window only when you know it is safe 86 // Make sure to use the returned window only when you know it is safe
84 // to do so, i.e. before OnDialogClosed() is called on the delegate. 87 // to do so, i.e. before OnDialogClosed() is called on the delegate.
85 gfx::NativeWindow ShowWebDialog(gfx::NativeView parent, 88 gfx::NativeWindow ShowWebDialog(gfx::NativeView parent,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // bookmark star is clicked or "Bookmark This Page..." is selected from a menu 128 // bookmark star is clicked or "Bookmark This Page..." is selected from a menu
126 // or via a key equivalent. 129 // or via a key equivalent.
127 void ShowBookmarkBubbleViewsAtPoint(const gfx::Point& anchor_point, 130 void ShowBookmarkBubbleViewsAtPoint(const gfx::Point& anchor_point,
128 gfx::NativeView parent, 131 gfx::NativeView parent,
129 bookmarks::BookmarkBubbleObserver* observer, 132 bookmarks::BookmarkBubbleObserver* observer,
130 Browser* browser, 133 Browser* browser,
131 const GURL& url, 134 const GURL& url,
132 bool newly_bookmarked); 135 bool newly_bookmarked);
133 136
134 // Bridging methods that show/hide the toolkit-views based Task Manager on Mac. 137 // Bridging methods that show/hide the toolkit-views based Task Manager on Mac.
135 ui::TableModel* ShowTaskManagerViews(Browser* browser); 138 task_management::TaskManagerTableModel* ShowTaskManagerViews(Browser* browser);
136 void HideTaskManagerViews(); 139 void HideTaskManagerViews();
137 140
138 // Notifies the old task manager with network bytes read events when the Mac 141 // Notifies the old task manager with network bytes read events when the Mac
139 // views are not used. 142 // views are not used.
140 bool NotifyOldTaskManagerBytesRead(const net::URLRequest& request, 143 bool NotifyOldTaskManagerBytesRead(const net::URLRequest& request,
141 int64_t bytes_read); 144 int64_t bytes_read);
142 145
143 #endif // OS_MACOSX 146 #endif // OS_MACOSX
144 147
145 #if defined(TOOLKIT_VIEWS) 148 #if defined(TOOLKIT_VIEWS)
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 void(*)(content::NavigationHandle*, 184 void(*)(content::NavigationHandle*,
182 const std::vector<std::pair<std::basic_string<char>, gfx::Image> >&, 185 const std::vector<std::pair<std::basic_string<char>, gfx::Image> >&,
183 const base::Callback<void(size_t, 186 const base::Callback<void(size_t,
184 arc::ArcNavigationThrottle::CloseReason)>&); 187 arc::ArcNavigationThrottle::CloseReason)>&);
185 188
186 BubbleShowPtr ShowIntentPickerBubble(); 189 BubbleShowPtr ShowIntentPickerBubble();
187 190
188 #endif // OS_CHROMEOS 191 #endif // OS_CHROMEOS
189 192
190 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ 193 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_
OLDNEW
« no previous file with comments | « chrome/browser/task_management/task_manager_tester.cc ('k') | chrome/browser/ui/cocoa/task_manager_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698