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

Side by Side Diff: chrome/browser/ui/bookmarks/bookmark_utils_desktop.h

Issue 2809003002: Making bookmark folder context menu display the number of bookmarks that will be opened by Open All (Closed)
Patch Set: All changes to add count to context menu Created 3 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_BOOKMARKS_BOOKMARK_UTILS_DESKTOP_H_ 5 #ifndef CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_DESKTOP_H_
6 #define CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_DESKTOP_H_ 6 #define CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_DESKTOP_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ui/base/window_open_disposition.h" 10 #include "ui/base/window_open_disposition.h"
(...skipping 29 matching lines...) Expand all
40 WindowOpenDisposition initial_disposition, 40 WindowOpenDisposition initial_disposition,
41 content::BrowserContext* browser_context); 41 content::BrowserContext* browser_context);
42 42
43 // Convenience for OpenAll() with a single BookmarkNode. 43 // Convenience for OpenAll() with a single BookmarkNode.
44 void OpenAll(gfx::NativeWindow parent, 44 void OpenAll(gfx::NativeWindow parent,
45 content::PageNavigator* navigator, 45 content::PageNavigator* navigator,
46 const bookmarks::BookmarkNode* node, 46 const bookmarks::BookmarkNode* node,
47 WindowOpenDisposition initial_disposition, 47 WindowOpenDisposition initial_disposition,
48 content::BrowserContext* browser_context); 48 content::BrowserContext* browser_context);
49 49
50 // Returns the count of bookmarks that would be opened by OpenAll
Peter Kasting 2017/04/13 04:52:09 This needs to document the args, at least the ones
Paezagon 2017/04/14 01:00:30 Done.
51 int OpenCount(gfx::NativeWindow parent,
Peter Kasting 2017/04/13 04:52:09 We're trying to kill the chrome:: namespace, and i
Paezagon 2017/04/14 01:00:30 The OpenAll functions are used in both the C++ and
52 const std::vector<const bookmarks::BookmarkNode*>& nodes,
53 bool offTheRecord = false,
Peter Kasting 2017/04/13 04:52:09 Nit: I sort of feel like when half the callers wan
Paezagon 2017/04/14 01:00:29 I am treating incognito as a 'special case'. I don
Peter Kasting 2017/04/14 08:17:14 But like I said, fully half the callers set it. T
Paezagon 2017/04/14 18:47:24 Done.
54 content::BrowserContext* browser_context = NULL);
55
56 // Convenience for OpenCount() with a single BookmarkNode.
57 int OpenCount(gfx::NativeWindow parent,
58 const bookmarks::BookmarkNode* node,
59 bool offTheRecord = false,
60 content::BrowserContext* browser_context = NULL);
61
50 // Asks the user before deleting a non-empty bookmark folder. 62 // Asks the user before deleting a non-empty bookmark folder.
51 bool ConfirmDeleteBookmarkNode(const bookmarks::BookmarkNode* node, 63 bool ConfirmDeleteBookmarkNode(const bookmarks::BookmarkNode* node,
52 gfx::NativeWindow window); 64 gfx::NativeWindow window);
53 65
54 // Shows the bookmark all tabs dialog. 66 // Shows the bookmark all tabs dialog.
55 void ShowBookmarkAllTabsDialog(Browser* browser); 67 void ShowBookmarkAllTabsDialog(Browser* browser);
56 68
57 // Returns true if OpenAll() can open at least one bookmark of type url 69 // Returns true if OpenAll() can open at least one bookmark of type url
58 // in |selection|. 70 // in |selection|.
59 bool HasBookmarkURLs( 71 bool HasBookmarkURLs(
60 const std::vector<const bookmarks::BookmarkNode*>& selection); 72 const std::vector<const bookmarks::BookmarkNode*>& selection);
61 73
62 // Returns true if OpenAll() can open at least one bookmark of type url 74 // Returns true if OpenAll() can open at least one bookmark of type url
63 // in |selection| with incognito mode. 75 // in |selection| with incognito mode.
64 bool HasBookmarkURLsAllowedInIncognitoMode( 76 bool HasBookmarkURLsAllowedInIncognitoMode(
65 const std::vector<const bookmarks::BookmarkNode*>& selection, 77 const std::vector<const bookmarks::BookmarkNode*>& selection,
66 content::BrowserContext* browser_context); 78 content::BrowserContext* browser_context);
67 79
68 } // namespace chrome 80 } // namespace chrome
69 81
70 #endif // CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_DESKTOP_H_ 82 #endif // CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_DESKTOP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698