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

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

Issue 596105: Bookmark Manager Drag and Drop backend.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_H_ 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_DRAG_DATA_H_
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_DRAG_DATA_H_ 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_DRAG_DATA_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 // Do we contain valid data? 118 // Do we contain valid data?
119 bool is_valid() const { return !elements.empty(); } 119 bool is_valid() const { return !elements.empty(); }
120 120
121 // Returns true if there is a single url. 121 // Returns true if there is a single url.
122 bool has_single_url() const { return is_valid() && elements[0].is_url; } 122 bool has_single_url() const { return is_valid() && elements[0].is_url; }
123 123
124 // Number of elements. 124 // Number of elements.
125 size_t size() const { return elements.size(); } 125 size_t size() const { return elements.size(); }
126 126
127 // Clears the data.
128 void Clear();
129
127 // Returns true if this data is from the specified profile. 130 // Returns true if this data is from the specified profile.
128 bool IsFromProfile(Profile* profile) const; 131 bool IsFromProfile(Profile* profile) const;
129 132
130 // The actual elements written to the clipboard. 133 // The actual elements written to the clipboard.
131 std::vector<Element> elements; 134 std::vector<Element> elements;
132 135
133 // The MIME type for the clipboard format for BookmarkDragData. 136 // The MIME type for the clipboard format for BookmarkDragData.
134 static const char* kClipboardFormatString; 137 static const char* kClipboardFormatString;
135 138
136 static bool ClipboardContainsBookmarks(); 139 static bool ClipboardContainsBookmarks();
137 140
138 private: 141 private:
139 // Path of the profile we originated from. 142 // Path of the profile we originated from.
140 FilePath::StringType profile_path_; 143 FilePath::StringType profile_path_;
141 }; 144 };
142 145
143 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_DRAG_DATA_H_ 146 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_DRAG_DATA_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_drag_data.cc » ('j') | chrome/browser/extensions/extension_dom_ui.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698