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

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: Refactoring URL itteration function as per comments, addressing other formatting and style errors 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. If
51 // |incognito| is true, the function will use |browser_context| to check if the
52 // URLs can be opened in incognito mode, which may affect the count.
53 int OpenCount(gfx::NativeWindow parent,
54 const std::vector<const bookmarks::BookmarkNode*>& nodes,
55 bool incognito = false,
56 content::BrowserContext* browser_context = NULL);
Peter Kasting 2017/04/14 08:17:15 Nit: NULL -> nullptr (everywhere in CL)
Paezagon 2017/04/14 18:47:24 Done.
57
58 // Convenience for OpenCount() with a single BookmarkNode.
Peter Kasting 2017/04/14 08:17:15 Nit: Maybe we shouldn't add this, and BookmarkMenu
Paezagon 2017/04/14 18:47:24 I would rather keep it consistent with the OpenAll
59 int OpenCount(gfx::NativeWindow parent,
60 const bookmarks::BookmarkNode* node,
61 bool incognito = false,
62 content::BrowserContext* browser_context = NULL);
63
50 // Asks the user before deleting a non-empty bookmark folder. 64 // Asks the user before deleting a non-empty bookmark folder.
51 bool ConfirmDeleteBookmarkNode(const bookmarks::BookmarkNode* node, 65 bool ConfirmDeleteBookmarkNode(const bookmarks::BookmarkNode* node,
52 gfx::NativeWindow window); 66 gfx::NativeWindow window);
53 67
54 // Shows the bookmark all tabs dialog. 68 // Shows the bookmark all tabs dialog.
55 void ShowBookmarkAllTabsDialog(Browser* browser); 69 void ShowBookmarkAllTabsDialog(Browser* browser);
56 70
57 // Returns true if OpenAll() can open at least one bookmark of type url 71 // Returns true if OpenAll() can open at least one bookmark of type url
58 // in |selection|. 72 // in |selection|.
59 bool HasBookmarkURLs( 73 bool HasBookmarkURLs(
60 const std::vector<const bookmarks::BookmarkNode*>& selection); 74 const std::vector<const bookmarks::BookmarkNode*>& selection);
61 75
62 // Returns true if OpenAll() can open at least one bookmark of type url 76 // Returns true if OpenAll() can open at least one bookmark of type url
63 // in |selection| with incognito mode. 77 // in |selection| with incognito mode.
64 bool HasBookmarkURLsAllowedInIncognitoMode( 78 bool HasBookmarkURLsAllowedInIncognitoMode(
65 const std::vector<const bookmarks::BookmarkNode*>& selection, 79 const std::vector<const bookmarks::BookmarkNode*>& selection,
66 content::BrowserContext* browser_context); 80 content::BrowserContext* browser_context);
67 81
68 } // namespace chrome 82 } // namespace chrome
69 83
70 #endif // CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_DESKTOP_H_ 84 #endif // CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_DESKTOP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698