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

Side by Side Diff: ui/base/clipboard/clipboard_util_win.cc

Issue 11225021: Move flash clipboard to the new proxy and add custom format support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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
« no previous file with comments | « ui/base/clipboard/clipboard_util_win.h ('k') | ui/base/clipboard/clipboard_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ui/base/clipboard/clipboard_util_win.h" 5 #include "ui/base/clipboard/clipboard_util_win.h"
6 6
7 #include <shellapi.h> 7 #include <shellapi.h>
8 #include <shlwapi.h> 8 #include <shlwapi.h>
9 #include <wininet.h> // For INTERNET_MAX_URL_LENGTH. 9 #include <wininet.h> // For INTERNET_MAX_URL_LENGTH.
10 10
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 } 211 }
212 212
213 FORMATETC* ClipboardUtil::GetWebCustomDataFormat() { 213 FORMATETC* ClipboardUtil::GetWebCustomDataFormat() {
214 // TODO(dcheng): This name is temporary. See crbug.com/106449 214 // TODO(dcheng): This name is temporary. See crbug.com/106449
215 static UINT cf = 215 static UINT cf =
216 RegisterClipboardFormat(L"Chromium Web Custom MIME Data Format"); 216 RegisterClipboardFormat(L"Chromium Web Custom MIME Data Format");
217 static FORMATETC format = {cf, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL}; 217 static FORMATETC format = {cf, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
218 return &format; 218 return &format;
219 } 219 }
220 220
221 FORMATETC* ClipboardUtil::GetPepperCustomDataFormat() {
222 static UINT cf =
223 RegisterClipboardFormat(L"Chromium Pepper MIME Data Format");
224 static FORMATETC format = {cf, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
225 return &format;
226 }
221 227
222 bool ClipboardUtil::HasUrl(IDataObject* data_object) { 228 bool ClipboardUtil::HasUrl(IDataObject* data_object) {
223 DCHECK(data_object); 229 DCHECK(data_object);
224 return SUCCEEDED(data_object->QueryGetData(GetMozUrlFormat())) || 230 return SUCCEEDED(data_object->QueryGetData(GetMozUrlFormat())) ||
225 SUCCEEDED(data_object->QueryGetData(GetUrlWFormat())) || 231 SUCCEEDED(data_object->QueryGetData(GetUrlWFormat())) ||
226 SUCCEEDED(data_object->QueryGetData(GetUrlFormat())) || 232 SUCCEEDED(data_object->QueryGetData(GetUrlFormat())) ||
227 SUCCEEDED(data_object->QueryGetData(GetFilenameWFormat())) || 233 SUCCEEDED(data_object->QueryGetData(GetFilenameWFormat())) ||
228 SUCCEEDED(data_object->QueryGetData(GetFilenameFormat())); 234 SUCCEEDED(data_object->QueryGetData(GetFilenameFormat()));
229 } 235 }
230 236
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 end_fragment_start + end_fragment_str.length())); 592 end_fragment_start + end_fragment_str.length()));
587 } 593 }
588 } else { 594 } else {
589 *fragment_start = cf_html.find('>', tag_start) + 1; 595 *fragment_start = cf_html.find('>', tag_start) + 1;
590 size_t tag_end = cf_html.rfind("<!--EndFragment", std::string::npos); 596 size_t tag_end = cf_html.rfind("<!--EndFragment", std::string::npos);
591 *fragment_end = cf_html.rfind('<', tag_end); 597 *fragment_end = cf_html.rfind('<', tag_end);
592 } 598 }
593 } 599 }
594 600
595 } // namespace ui 601 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_util_win.h ('k') | ui/base/clipboard/clipboard_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698