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

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

Issue 12041078: Clear the clipboard closing Incognito window (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge and compilation fixes Created 7 years, 10 months 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
« 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 return &format; 218 return &format;
219 } 219 }
220 220
221 FORMATETC* ClipboardUtil::GetPepperCustomDataFormat() { 221 FORMATETC* ClipboardUtil::GetPepperCustomDataFormat() {
222 static UINT cf = 222 static UINT cf =
223 RegisterClipboardFormat(L"Chromium Pepper MIME Data Format"); 223 RegisterClipboardFormat(L"Chromium Pepper MIME Data Format");
224 static FORMATETC format = {cf, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL}; 224 static FORMATETC format = {cf, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
225 return &format; 225 return &format;
226 } 226 }
227 227
228 FORMATETC* ClipboardUtil::GetSourceTagFormat() {
229 static UINT cf =
230 RegisterClipboardFormat(L"Chromium Source tag Format");
231 static FORMATETC format = {cf, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
232 return &format;
233 }
234
228 bool ClipboardUtil::HasUrl(IDataObject* data_object) { 235 bool ClipboardUtil::HasUrl(IDataObject* data_object) {
229 DCHECK(data_object); 236 DCHECK(data_object);
230 return SUCCEEDED(data_object->QueryGetData(GetMozUrlFormat())) || 237 return SUCCEEDED(data_object->QueryGetData(GetMozUrlFormat())) ||
231 SUCCEEDED(data_object->QueryGetData(GetUrlWFormat())) || 238 SUCCEEDED(data_object->QueryGetData(GetUrlWFormat())) ||
232 SUCCEEDED(data_object->QueryGetData(GetUrlFormat())) || 239 SUCCEEDED(data_object->QueryGetData(GetUrlFormat())) ||
233 SUCCEEDED(data_object->QueryGetData(GetFilenameWFormat())) || 240 SUCCEEDED(data_object->QueryGetData(GetFilenameWFormat())) ||
234 SUCCEEDED(data_object->QueryGetData(GetFilenameFormat())); 241 SUCCEEDED(data_object->QueryGetData(GetFilenameFormat()));
235 } 242 }
236 243
237 bool ClipboardUtil::HasFilenames(IDataObject* data_object) { 244 bool ClipboardUtil::HasFilenames(IDataObject* data_object) {
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 end_fragment_start + end_fragment_str.length())); 599 end_fragment_start + end_fragment_str.length()));
593 } 600 }
594 } else { 601 } else {
595 *fragment_start = cf_html.find('>', tag_start) + 1; 602 *fragment_start = cf_html.find('>', tag_start) + 1;
596 size_t tag_end = cf_html.rfind("<!--EndFragment", std::string::npos); 603 size_t tag_end = cf_html.rfind("<!--EndFragment", std::string::npos);
597 *fragment_end = cf_html.rfind('<', tag_end); 604 *fragment_end = cf_html.rfind('<', tag_end);
598 } 605 }
599 } 606 }
600 607
601 } // namespace ui 608 } // 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