| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |