| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_DATA_H_ | 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_DATA_H_ |
| 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_DATA_H_ | 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_DATA_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 explicit BookmarkNodeData(const std::vector<const BookmarkNode*>& nodes); | 93 explicit BookmarkNodeData(const std::vector<const BookmarkNode*>& nodes); |
| 94 | 94 |
| 95 ~BookmarkNodeData(); | 95 ~BookmarkNodeData(); |
| 96 | 96 |
| 97 #if defined(TOOLKIT_VIEWS) | 97 #if defined(TOOLKIT_VIEWS) |
| 98 static const ui::OSExchangeData::CustomFormat& GetBookmarkCustomFormat(); | 98 static const ui::OSExchangeData::CustomFormat& GetBookmarkCustomFormat(); |
| 99 #endif | 99 #endif |
| 100 | 100 |
| 101 static bool ClipboardContainsBookmarks(); | 101 static bool ClipboardContainsBookmarks(); |
| 102 | 102 |
| 103 static bool ClipboardContainsURLs(); |
| 104 |
| 105 // Writes bookmark to clipboard from URL present in clipboard. |
| 106 static bool WriteBookmarkToClipboardFromURL(); |
| 107 |
| 103 // Reads bookmarks from the given vector. | 108 // Reads bookmarks from the given vector. |
| 104 bool ReadFromVector(const std::vector<const BookmarkNode*>& nodes); | 109 bool ReadFromVector(const std::vector<const BookmarkNode*>& nodes); |
| 105 | 110 |
| 106 // Creates a single-bookmark DragData from url/title pair. | 111 // Creates a single-bookmark DragData from url/title pair. |
| 107 bool ReadFromTuple(const GURL& url, const base::string16& title); | 112 bool ReadFromTuple(const GURL& url, const base::string16& title); |
| 108 | 113 |
| 109 // Writes bookmarks to the specified clipboard. | 114 // Writes bookmarks to the specified clipboard. |
| 110 void WriteToClipboard(ui::ClipboardType type); | 115 void WriteToClipboard(ui::ClipboardType type); |
| 111 | 116 |
| 112 // Reads bookmarks from the specified clipboard. Prefers data written via | 117 // Reads bookmarks from the specified clipboard. Prefers data written via |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 std::vector<Element> elements; | 174 std::vector<Element> elements; |
| 170 | 175 |
| 171 private: | 176 private: |
| 172 // Path of the profile we originated from. | 177 // Path of the profile we originated from. |
| 173 base::FilePath profile_path_; | 178 base::FilePath profile_path_; |
| 174 }; | 179 }; |
| 175 | 180 |
| 176 } // namespace bookmarks | 181 } // namespace bookmarks |
| 177 | 182 |
| 178 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_DATA_H_ | 183 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_DATA_H_ |
| OLD | NEW |