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_BOOKMARKS_BOOKMARK_UTILS_H_ | 5 #ifndef CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_H_ |
6 #define CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_H_ | 6 #define CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 // Fills in the URL and title for a bookmark of |web_contents|. | 47 // Fills in the URL and title for a bookmark of |web_contents|. |
48 void GetURLAndTitleToBookmark(content::WebContents* web_contents, | 48 void GetURLAndTitleToBookmark(content::WebContents* web_contents, |
49 GURL* url, | 49 GURL* url, |
50 base::string16* title); | 50 base::string16* title); |
51 | 51 |
52 // Toggles whether the bookmark bar is shown only on the new tab page or on | 52 // Toggles whether the bookmark bar is shown only on the new tab page or on |
53 // all tabs. This is a preference modifier, not a visual modifier. | 53 // all tabs. This is a preference modifier, not a visual modifier. |
54 void ToggleBookmarkBarWhenVisible(content::BrowserContext* browser_context); | 54 void ToggleBookmarkBarWhenVisible(content::BrowserContext* browser_context); |
55 | 55 |
56 // Returns a formatted version of |url| appropriate to display to a user with | 56 // Returns a formatted version of |url| appropriate to display to a user. |
57 // the given |prefs|, which may be NULL. When re-parsing this URL, clients | 57 // When re-parsing this URL, clients should call url_formatter::FixupURL(). |
58 // should call url_formatter::FixupURL(). | |
59 base::string16 FormatBookmarkURLForDisplay(const GURL& url); | 58 base::string16 FormatBookmarkURLForDisplay(const GURL& url); |
60 | 59 |
61 // Returns whether the Apps shortcut is enabled. If true, then the visibility | 60 // Returns whether the Apps shortcut is enabled. If true, then the visibility |
62 // of the Apps shortcut should be controllable via an item in the bookmark | 61 // of the Apps shortcut should be controllable via an item in the bookmark |
63 // context menu. | 62 // context menu. |
64 bool IsAppsShortcutEnabled(Profile* profile); | 63 bool IsAppsShortcutEnabled(Profile* profile); |
65 | 64 |
66 // Returns true if the Apps shortcut should be displayed in the bookmark bar. | 65 // Returns true if the Apps shortcut should be displayed in the bookmark bar. |
67 bool ShouldShowAppsShortcutInBookmarkBar(Profile* profile); | 66 bool ShouldShowAppsShortcutInBookmarkBar(Profile* profile); |
68 | 67 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // color. | 106 // color. |
108 // TODO(estade): If Mac wants to use these, return gfx::Image instead. | 107 // TODO(estade): If Mac wants to use these, return gfx::Image instead. |
109 gfx::ImageSkia GetBookmarkFolderIcon(SkColor text_color); | 108 gfx::ImageSkia GetBookmarkFolderIcon(SkColor text_color); |
110 gfx::ImageSkia GetBookmarkSupervisedFolderIcon(SkColor text_color); | 109 gfx::ImageSkia GetBookmarkSupervisedFolderIcon(SkColor text_color); |
111 gfx::ImageSkia GetBookmarkManagedFolderIcon(SkColor text_color); | 110 gfx::ImageSkia GetBookmarkManagedFolderIcon(SkColor text_color); |
112 #endif | 111 #endif |
113 | 112 |
114 } // namespace chrome | 113 } // namespace chrome |
115 | 114 |
116 #endif // CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_H_ | 115 #endif // CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_H_ |
OLD | NEW |