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 BASE_CLIPBOARD_H_ | 5 #ifndef BASE_CLIPBOARD_H_ |
6 #define BASE_CLIPBOARD_H_ | 6 #define BASE_CLIPBOARD_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 void WriteBitmapFromSharedMemory(const char* bitmap_data, | 161 void WriteBitmapFromSharedMemory(const char* bitmap_data, |
162 const char* size_data, | 162 const char* size_data, |
163 base::ProcessHandle handle); | 163 base::ProcessHandle handle); |
164 | 164 |
165 void WriteBitmapFromHandle(HBITMAP source_hbitmap, | 165 void WriteBitmapFromHandle(HBITMAP source_hbitmap, |
166 const gfx::Size& size); | 166 const gfx::Size& size); |
167 | 167 |
168 // Safely write to system clipboard. Free |handle| on failure. | 168 // Safely write to system clipboard. Free |handle| on failure. |
169 void WriteToClipboard(FormatType format, HANDLE handle); | 169 void WriteToClipboard(FormatType format, HANDLE handle); |
170 | 170 |
171 static void MarkupToHTMLClipboardFormat(const std::string& markup, | |
172 const std::string& src_url, | |
173 std::string* html_fragment); | |
174 | |
175 static void ParseHTMLClipboardFormat(const std::string& html_fragment, | |
176 std::wstring* markup, | |
177 std::string* src_url); | |
178 | |
179 static void ParseBookmarkClipboardFormat(const std::wstring& bookmark, | 171 static void ParseBookmarkClipboardFormat(const std::wstring& bookmark, |
180 std::wstring* title, | 172 std::wstring* title, |
181 std::string* url); | 173 std::string* url); |
182 | 174 |
183 // Free a handle depending on its type (as intuited from format) | 175 // Free a handle depending on its type (as intuited from format) |
184 static void FreeData(FormatType format, HANDLE data); | 176 static void FreeData(FormatType format, HANDLE data); |
185 | 177 |
186 HWND clipboard_owner_; | 178 HWND clipboard_owner_; |
187 #elif defined(OS_LINUX) | 179 #elif defined(OS_LINUX) |
188 // Data is stored in the |clipboard_data_| map until it is saved to the system | 180 // Data is stored in the |clipboard_data_| map until it is saved to the system |
(...skipping 12 matching lines...) Expand all Loading... |
201 | 193 |
202 TargetMap* clipboard_data_; | 194 TargetMap* clipboard_data_; |
203 GtkClipboard* clipboard_; | 195 GtkClipboard* clipboard_; |
204 #endif | 196 #endif |
205 | 197 |
206 DISALLOW_EVIL_CONSTRUCTORS(Clipboard); | 198 DISALLOW_EVIL_CONSTRUCTORS(Clipboard); |
207 }; | 199 }; |
208 | 200 |
209 #endif // BASE_CLIPBOARD_H_ | 201 #endif // BASE_CLIPBOARD_H_ |
210 | 202 |
OLD | NEW |