OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BOOKMARKS_BOOKMARK_UTILS_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ |
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ | 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 20 matching lines...) Expand all Loading... |
31 // A collection of bookmark utility functions used by various parts of the UI | 31 // A collection of bookmark utility functions used by various parts of the UI |
32 // that show bookmarks: bookmark manager, bookmark bar view ... | 32 // that show bookmarks: bookmark manager, bookmark bar view ... |
33 namespace bookmark_utils { | 33 namespace bookmark_utils { |
34 | 34 |
35 // Calculates the drop operation given |source_operations| and the ideal | 35 // Calculates the drop operation given |source_operations| and the ideal |
36 // set of drop operations (|operations|). This prefers the following ordering: | 36 // set of drop operations (|operations|). This prefers the following ordering: |
37 // COPY, LINK then MOVE. | 37 // COPY, LINK then MOVE. |
38 int PreferredDropOperation(int source_operations, int operations); | 38 int PreferredDropOperation(int source_operations, int operations); |
39 | 39 |
40 // Returns the drag operations for the specified node. | 40 // Returns the drag operations for the specified node. |
41 int BookmarkDragOperation(const BookmarkNode* node); | 41 int BookmarkDragOperation(Profile* profile, const BookmarkNode* node); |
42 | 42 |
43 // Returns the preferred drop operation on a bookmark menu/bar. | 43 // Returns the preferred drop operation on a bookmark menu/bar. |
44 // |parent| is the parent node the drop is to occur on and |index| the index the | 44 // |parent| is the parent node the drop is to occur on and |index| the index the |
45 // drop is over. | 45 // drop is over. |
46 int BookmarkDropOperation(Profile* profile, | 46 int BookmarkDropOperation(Profile* profile, |
47 const views::DropTargetEvent& event, | 47 const views::DropTargetEvent& event, |
48 const BookmarkNodeData& data, | 48 const BookmarkNodeData& data, |
49 const BookmarkNode* parent, | 49 const BookmarkNode* parent, |
50 int index); | 50 int index); |
51 | 51 |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 // Number of bookmarks we'll open before prompting the user to see if they | 214 // Number of bookmarks we'll open before prompting the user to see if they |
215 // really want to open all. | 215 // really want to open all. |
216 // | 216 // |
217 // NOTE: treat this as a const. It is not const as various tests change the | 217 // NOTE: treat this as a const. It is not const as various tests change the |
218 // value. | 218 // value. |
219 extern int num_urls_before_prompting; | 219 extern int num_urls_before_prompting; |
220 | 220 |
221 } // namespace bookmark_utils | 221 } // namespace bookmark_utils |
222 | 222 |
223 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ | 223 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ |
OLD | NEW |