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

Side by Side Diff: Source/core/platform/chromium/ChromiumDataObject.cpp

Issue 61773005: Rename WebKit namespace to blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
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 29 matching lines...) Expand all
40 #include "platform/clipboard/ClipboardMimeTypes.h" 40 #include "platform/clipboard/ClipboardMimeTypes.h"
41 #include "platform/clipboard/ClipboardUtilities.h" 41 #include "platform/clipboard/ClipboardUtilities.h"
42 #include "public/platform/Platform.h" 42 #include "public/platform/Platform.h"
43 #include "public/platform/WebClipboard.h" 43 #include "public/platform/WebClipboard.h"
44 44
45 namespace WebCore { 45 namespace WebCore {
46 46
47 PassRefPtr<ChromiumDataObject> ChromiumDataObject::createFromPasteboard(PasteMod e pasteMode) 47 PassRefPtr<ChromiumDataObject> ChromiumDataObject::createFromPasteboard(PasteMod e pasteMode)
48 { 48 {
49 RefPtr<ChromiumDataObject> dataObject = create(); 49 RefPtr<ChromiumDataObject> dataObject = create();
50 WebKit::WebClipboard::Buffer buffer = Pasteboard::generalPasteboard()->buffe r(); 50 blink::WebClipboard::Buffer buffer = Pasteboard::generalPasteboard()->buffer ();
51 uint64_t sequenceNumber = WebKit::Platform::current()->clipboard()->sequence Number(buffer); 51 uint64_t sequenceNumber = blink::Platform::current()->clipboard()->sequenceN umber(buffer);
52 bool ignored; 52 bool ignored;
53 WebKit::WebVector<WebKit::WebString> webTypes = WebKit::Platform::current()- >clipboard()->readAvailableTypes(buffer, &ignored); 53 blink::WebVector<blink::WebString> webTypes = blink::Platform::current()->cl ipboard()->readAvailableTypes(buffer, &ignored);
54 ListHashSet<String> types; 54 ListHashSet<String> types;
55 for (size_t i = 0; i < webTypes.size(); ++i) 55 for (size_t i = 0; i < webTypes.size(); ++i)
56 types.add(webTypes[i]); 56 types.add(webTypes[i]);
57 for (ListHashSet<String>::const_iterator it = types.begin(); it != types.end (); ++it) { 57 for (ListHashSet<String>::const_iterator it = types.begin(); it != types.end (); ++it) {
58 if (pasteMode == PlainTextOnly && *it != mimeTypeTextPlain) 58 if (pasteMode == PlainTextOnly && *it != mimeTypeTextPlain)
59 continue; 59 continue;
60 dataObject->m_itemList.append(ChromiumDataObjectItem::createFromPasteboa rd(*it, sequenceNumber)); 60 dataObject->m_itemList.append(ChromiumDataObjectItem::createFromPasteboa rd(*it, sequenceNumber));
61 } 61 }
62 return dataObject.release(); 62 return dataObject.release();
63 } 63 }
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 return true; 261 return true;
262 } 262 }
263 263
264 void ChromiumDataObject::internalAddFileItem(PassRefPtr<ChromiumDataObjectItem> item) 264 void ChromiumDataObject::internalAddFileItem(PassRefPtr<ChromiumDataObjectItem> item)
265 { 265 {
266 ASSERT(item->kind() == DataTransferItem::kindFile); 266 ASSERT(item->kind() == DataTransferItem::kindFile);
267 m_itemList.append(item); 267 m_itemList.append(item);
268 } 268 }
269 269
270 } // namespace WebCore 270 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698