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

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

Issue 339533002: setData() of DataTransfer has a void return type (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed unnecessary argument. Created 6 years, 6 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/clipboard/Clipboard.h ('k') | Source/core/clipboard/DataObject.h » ('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) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 if (!canReadData()) 168 if (!canReadData())
169 return String(); 169 return String();
170 170
171 bool convertToURL = false; 171 bool convertToURL = false;
172 String data = m_dataObject->getData(normalizeType(type, &convertToURL)); 172 String data = m_dataObject->getData(normalizeType(type, &convertToURL));
173 if (!convertToURL) 173 if (!convertToURL)
174 return data; 174 return data;
175 return convertURIListToURL(data); 175 return convertURIListToURL(data);
176 } 176 }
177 177
178 bool Clipboard::setData(const String& type, const String& data) 178 void Clipboard::setData(const String& type, const String& data)
179 { 179 {
180 if (!canWriteData()) 180 if (!canWriteData())
181 return false; 181 return;
182 182
183 return m_dataObject->setData(normalizeType(type), data); 183 m_dataObject->setData(normalizeType(type), data);
184 } 184 }
185 185
186 // extensions beyond IE's API 186 // extensions beyond IE's API
187 Vector<String> Clipboard::types() const 187 Vector<String> Clipboard::types() const
188 { 188 {
189 Vector<String> types; 189 Vector<String> types;
190 if (!canReadTypes()) 190 if (!canReadTypes())
191 return types; 191 return types;
192 192
193 ListHashSet<String> typesSet = m_dataObject->types(); 193 ListHashSet<String> typesSet = m_dataObject->types();
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 } 534 }
535 } 535 }
536 536
537 void Clipboard::trace(Visitor* visitor) 537 void Clipboard::trace(Visitor* visitor)
538 { 538 {
539 visitor->trace(m_dataObject); 539 visitor->trace(m_dataObject);
540 visitor->trace(m_dragImageElement); 540 visitor->trace(m_dragImageElement);
541 } 541 }
542 542
543 } // namespace WebCore 543 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/clipboard/Clipboard.h ('k') | Source/core/clipboard/DataObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698