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

Side by Side Diff: chrome/browser/bookmarks/bookmark_utils.h

Issue 159419: Correctly update drag status for drags over renderer. This makes things look ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: do what Brett says Created 11 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 7
8 #include <string>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/gfx/native_widget_types.h" 11 #include "base/gfx/native_widget_types.h"
11 #include "chrome/browser/bookmarks/bookmark_drag_data.h" 12 #include "chrome/browser/bookmarks/bookmark_drag_data.h"
12 #include "chrome/browser/bookmarks/bookmark_editor.h" 13 #include "chrome/browser/bookmarks/bookmark_editor.h"
13 #include "chrome/browser/history/snippet.h" 14 #include "chrome/browser/history/snippet.h"
14 #include "webkit/glue/window_open_disposition.h" 15 #include "webkit/glue/window_open_disposition.h"
15 16
16 class BookmarkModel; 17 class BookmarkModel;
17 class BookmarkNode; 18 class BookmarkNode;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // Pastes from the clipboard. The new nodes are added to |parent|, unless 97 // Pastes from the clipboard. The new nodes are added to |parent|, unless
97 // |parent| is null in which case this does nothing. The nodes are inserted 98 // |parent| is null in which case this does nothing. The nodes are inserted
98 // at |index|. If |index| is -1 the nodes are added to the end. 99 // at |index|. If |index| is -1 the nodes are added to the end.
99 void PasteFromClipboard(BookmarkModel* model, 100 void PasteFromClipboard(BookmarkModel* model,
100 const BookmarkNode* parent, 101 const BookmarkNode* parent,
101 int index); 102 int index);
102 103
103 // Returns true if the user can copy from the pasteboard. 104 // Returns true if the user can copy from the pasteboard.
104 bool CanPasteFromClipboard(const BookmarkNode* node); 105 bool CanPasteFromClipboard(const BookmarkNode* node);
105 106
107 // Returns a name for the given URL. Used for drags into bookmark areas when
108 // the source doesn't specify a title.
109 std::string GetNameForURL(const GURL& url);
110
106 // Returns a vector containing up to |max_count| of the most recently modified 111 // Returns a vector containing up to |max_count| of the most recently modified
107 // groups. This never returns an empty vector. 112 // groups. This never returns an empty vector.
108 std::vector<const BookmarkNode*> GetMostRecentlyModifiedGroups( 113 std::vector<const BookmarkNode*> GetMostRecentlyModifiedGroups(
109 BookmarkModel* model, size_t max_count); 114 BookmarkModel* model, size_t max_count);
110 115
111 // Returns the most recently added bookmarks. This does not return groups, 116 // Returns the most recently added bookmarks. This does not return groups,
112 // only nodes of type url. 117 // only nodes of type url.
113 void GetMostRecentlyAddedEntries(BookmarkModel* model, 118 void GetMostRecentlyAddedEntries(BookmarkModel* model,
114 size_t count, 119 size_t count,
115 std::vector<const BookmarkNode*>* nodes); 120 std::vector<const BookmarkNode*>* nodes);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // Number of bookmarks we'll open before prompting the user to see if they 183 // Number of bookmarks we'll open before prompting the user to see if they
179 // really want to open all. 184 // really want to open all.
180 // 185 //
181 // NOTE: treat this as a const. It is not const as various tests change the 186 // NOTE: treat this as a const. It is not const as various tests change the
182 // value. 187 // value.
183 extern int num_urls_before_prompting; 188 extern int num_urls_before_prompting;
184 189
185 } // namespace bookmark_utils 190 } // namespace bookmark_utils
186 191
187 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ 192 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_utils.cc » ('j') | chrome/browser/gtk/bookmark_bar_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698