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_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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // ID of the node. | 64 // ID of the node. |
65 int id_; | 65 int id_; |
66 }; | 66 }; |
67 | 67 |
68 BookmarkDragData() { } | 68 BookmarkDragData() { } |
69 | 69 |
70 // Created a BookmarkDragData populated from the arguments. | 70 // Created a BookmarkDragData populated from the arguments. |
71 explicit BookmarkDragData(BookmarkNode* node); | 71 explicit BookmarkDragData(BookmarkNode* node); |
72 explicit BookmarkDragData(const std::vector<BookmarkNode*>& nodes); | 72 explicit BookmarkDragData(const std::vector<BookmarkNode*>& nodes); |
73 | 73 |
74 #if defined(OS_WIN) | 74 #if defined(TOOLKIT_VIEWS) |
75 // Writes elements to data. If there is only one element and it is a URL | 75 // Writes elements to data. If there is only one element and it is a URL |
76 // the URL and title are written to the clipboard in a format other apps can | 76 // the URL and title are written to the clipboard in a format other apps can |
77 // use. | 77 // use. |
78 // |profile| is used to identify which profile the data came from. Use a | 78 // |profile| is used to identify which profile the data came from. Use a |
79 // value of null to indicate the data is not associated with any profile. | 79 // value of null to indicate the data is not associated with any profile. |
80 void Write(Profile* profile, OSExchangeData* data) const; | 80 void Write(Profile* profile, OSExchangeData* data) const; |
81 | 81 |
82 // Restores this data from the clipboard, returning true on success. | 82 // Restores this data from the clipboard, returning true on success. |
83 bool Read(const OSExchangeData& data); | 83 bool Read(const OSExchangeData& data); |
84 #endif | 84 #endif |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 private: | 117 private: |
118 // Path of the profile we originated from. | 118 // Path of the profile we originated from. |
119 #if defined(WCHAR_T_IS_UTF16) | 119 #if defined(WCHAR_T_IS_UTF16) |
120 std::wstring profile_path_; | 120 std::wstring profile_path_; |
121 #elif defined(WCHAR_T_IS_UTF32) | 121 #elif defined(WCHAR_T_IS_UTF32) |
122 std::string profile_path_; | 122 std::string profile_path_; |
123 #endif | 123 #endif |
124 }; | 124 }; |
125 | 125 |
126 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_DRAG_DATA_H_ | 126 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_DRAG_DATA_H_ |
OLD | NEW |