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

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

Issue 8115: Refactors some of the bookmark drag and drop code into a separate... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_drag_data.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_DRAG_DATA_ 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_DRAG_DATA_
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_DRAG_DATA_ 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_DRAG_DATA_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "chrome/browser/history/history.h" 10 #include "chrome/browser/history/history.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // match any nodes or there is more than one node. 89 // match any nodes or there is more than one node.
90 BookmarkNode* GetFirstNode(Profile* profile) const; 90 BookmarkNode* GetFirstNode(Profile* profile) const;
91 91
92 // Do we contain valid data? 92 // Do we contain valid data?
93 bool is_valid() const { return !elements.empty(); } 93 bool is_valid() const { return !elements.empty(); }
94 94
95 // Returns true if there is a single url. 95 // Returns true if there is a single url.
96 bool has_single_url() const { return is_valid() && elements[0].is_url; } 96 bool has_single_url() const { return is_valid() && elements[0].is_url; }
97 97
98 // Number of elements. 98 // Number of elements.
99 size_t size() { return elements.size(); } 99 size_t size() const { return elements.size(); }
100
101 // Returns true if this data is from the specified profile.
102 bool IsFromProfile(Profile* profile) const;
100 103
101 // The actual elements written to the clipboard. 104 // The actual elements written to the clipboard.
102 std::vector<Element> elements; 105 std::vector<Element> elements;
103 106
104 private: 107 private:
105 // Path of the profile we originated from. 108 // Path of the profile we originated from.
106 std::wstring profile_path_; 109 std::wstring profile_path_;
107 }; 110 };
108 111
109 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_DRAG_DATA_ 112 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_DRAG_DATA_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_drag_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698