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

Side by Side Diff: Source/core/clipboard/DataObject.cpp

Issue 1115553002: Removing blink::prefix (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 7 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 | « Source/core/animation/css/CSSAnimations.cpp ('k') | Source/core/clipboard/DataObjectItem.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008, 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (c) 2008, 2009, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 26 matching lines...) Expand all
37 #include "platform/clipboard/ClipboardUtilities.h" 37 #include "platform/clipboard/ClipboardUtilities.h"
38 #include "public/platform/Platform.h" 38 #include "public/platform/Platform.h"
39 #include "public/platform/WebClipboard.h" 39 #include "public/platform/WebClipboard.h"
40 #include "public/platform/WebDragData.h" 40 #include "public/platform/WebDragData.h"
41 41
42 namespace blink { 42 namespace blink {
43 43
44 DataObject* DataObject::createFromPasteboard(PasteMode pasteMode) 44 DataObject* DataObject::createFromPasteboard(PasteMode pasteMode)
45 { 45 {
46 DataObject* dataObject = create(); 46 DataObject* dataObject = create();
47 blink::WebClipboard::Buffer buffer = Pasteboard::generalPasteboard()->buffer (); 47 WebClipboard::Buffer buffer = Pasteboard::generalPasteboard()->buffer();
48 uint64_t sequenceNumber = blink::Platform::current()->clipboard()->sequenceN umber(buffer); 48 uint64_t sequenceNumber = Platform::current()->clipboard()->sequenceNumber(b uffer);
49 bool ignored; 49 bool ignored;
50 blink::WebVector<blink::WebString> webTypes = blink::Platform::current()->cl ipboard()->readAvailableTypes(buffer, &ignored); 50 WebVector<WebString> webTypes = Platform::current()->clipboard()->readAvaila bleTypes(buffer, &ignored);
51 ListHashSet<String> types; 51 ListHashSet<String> types;
52 for (size_t i = 0; i < webTypes.size(); ++i) 52 for (size_t i = 0; i < webTypes.size(); ++i)
53 types.add(webTypes[i]); 53 types.add(webTypes[i]);
54 for (const String& type : types) { 54 for (const String& type : types) {
55 if (pasteMode == PlainTextOnly && type != mimeTypeTextPlain) 55 if (pasteMode == PlainTextOnly && type != mimeTypeTextPlain)
56 continue; 56 continue;
57 dataObject->m_itemList.append(DataObjectItem::createFromPasteboard(type, sequenceNumber)); 57 dataObject->m_itemList.append(DataObjectItem::createFromPasteboard(type, sequenceNumber));
58 } 58 }
59 return dataObject; 59 return dataObject;
60 } 60 }
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 339 }
340 item.title = originalItem->title(); 340 item.title = originalItem->title();
341 item.baseURL = originalItem->baseURL(); 341 item.baseURL = originalItem->baseURL();
342 itemList[i] = item; 342 itemList[i] = item;
343 } 343 }
344 data.swapItems(itemList); 344 data.swapItems(itemList);
345 return data; 345 return data;
346 } 346 }
347 347
348 } // namespace blink 348 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/css/CSSAnimations.cpp ('k') | Source/core/clipboard/DataObjectItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698