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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 void GetURLAndTitleToBookmark(content::WebContents* web_contents, | 84 void GetURLAndTitleToBookmark(content::WebContents* web_contents, |
85 GURL* url, | 85 GURL* url, |
86 base::string16* title); | 86 base::string16* title); |
87 | 87 |
88 // Toggles whether the bookmark bar is shown only on the new tab page or on | 88 // Toggles whether the bookmark bar is shown only on the new tab page or on |
89 // all tabs. This is a preference modifier, not a visual modifier. | 89 // all tabs. This is a preference modifier, not a visual modifier. |
90 void ToggleBookmarkBarWhenVisible(content::BrowserContext* browser_context); | 90 void ToggleBookmarkBarWhenVisible(content::BrowserContext* browser_context); |
91 | 91 |
92 // Returns a formatted version of |url| appropriate to display to a user with | 92 // Returns a formatted version of |url| appropriate to display to a user with |
93 // the given |prefs|, which may be NULL. When re-parsing this URL, clients | 93 // the given |prefs|, which may be NULL. When re-parsing this URL, clients |
94 // should call URLFixerUpper::FixupURL(). | 94 // should call url_fixer::FixupURL(). |
95 base::string16 FormatBookmarkURLForDisplay(const GURL& url, | 95 base::string16 FormatBookmarkURLForDisplay(const GURL& url, |
96 const PrefService* prefs); | 96 const PrefService* prefs); |
97 | 97 |
98 // Returns whether the Apps shortcut is enabled. If true, then the visibility | 98 // Returns whether the Apps shortcut is enabled. If true, then the visibility |
99 // of the Apps shortcut should be controllable via an item in the bookmark | 99 // of the Apps shortcut should be controllable via an item in the bookmark |
100 // context menu. | 100 // context menu. |
101 bool IsAppsShortcutEnabled(Profile* profile, | 101 bool IsAppsShortcutEnabled(Profile* profile, |
102 chrome::HostDesktopType host_desktop_type); | 102 chrome::HostDesktopType host_desktop_type); |
103 | 103 |
104 // Returns true if the Apps shortcut should be displayed in the bookmark bar. | 104 // Returns true if the Apps shortcut should be displayed in the bookmark bar. |
105 bool ShouldShowAppsShortcutInBookmarkBar( | 105 bool ShouldShowAppsShortcutInBookmarkBar( |
106 Profile* profile, | 106 Profile* profile, |
107 chrome::HostDesktopType host_desktop_type); | 107 chrome::HostDesktopType host_desktop_type); |
108 | 108 |
109 // Whether the menu item and shortcut to bookmark a page should be removed from | 109 // Whether the menu item and shortcut to bookmark a page should be removed from |
110 // the user interface. | 110 // the user interface. |
111 bool ShouldRemoveBookmarkThisPageUI(Profile* profile); | 111 bool ShouldRemoveBookmarkThisPageUI(Profile* profile); |
112 | 112 |
113 // Whether the menu item and shortcut to bookmark open pages should be removed | 113 // Whether the menu item and shortcut to bookmark open pages should be removed |
114 // from the user interface. | 114 // from the user interface. |
115 bool ShouldRemoveBookmarkOpenPagesUI(Profile* profile); | 115 bool ShouldRemoveBookmarkOpenPagesUI(Profile* profile); |
116 | 116 |
117 } // namespace chrome | 117 } // namespace chrome |
118 | 118 |
119 #endif // CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_H_ | 119 #endif // CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_UTILS_H_ |
OLD | NEW |