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

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

Issue 928103002: Remove some unused functions in core (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: git cl try Created 5 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 | « Source/core/clipboard/DataTransfer.h ('k') | Source/core/css/CSSPropertySourceData.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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 372
373 String str = text; 373 String str = text;
374 #if OS(WIN) 374 #if OS(WIN)
375 replaceNewlinesWithWindowsStyleNewlines(str); 375 replaceNewlinesWithWindowsStyleNewlines(str);
376 #endif 376 #endif
377 replaceNBSPWithSpace(str); 377 replaceNBSPWithSpace(str);
378 378
379 m_dataObject->setData(mimeTypeTextPlain, str); 379 m_dataObject->setData(mimeTypeTextPlain, str);
380 } 380 }
381 381
382 bool DataTransfer::hasData()
383 {
384 ASSERT(isForDragAndDrop());
385
386 return m_dataObject->length() > 0;
387 }
388
389 void DataTransfer::setAccessPolicy(DataTransferAccessPolicy policy) 382 void DataTransfer::setAccessPolicy(DataTransferAccessPolicy policy)
390 { 383 {
391 // once you go numb, can never go back 384 // once you go numb, can never go back
392 ASSERT(m_policy != DataTransferNumb || policy == DataTransferNumb); 385 ASSERT(m_policy != DataTransferNumb || policy == DataTransferNumb);
393 m_policy = policy; 386 m_policy = policy;
394 } 387 }
395 388
396 bool DataTransfer::canReadTypes() const 389 bool DataTransfer::canReadTypes() const
397 { 390 {
398 return m_policy == DataTransferReadable || m_policy == DataTransferTypesRead able || m_policy == DataTransferWritable; 391 return m_policy == DataTransferReadable || m_policy == DataTransferTypesRead able || m_policy == DataTransferWritable;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 } 524 }
532 } 525 }
533 526
534 void DataTransfer::trace(Visitor* visitor) 527 void DataTransfer::trace(Visitor* visitor)
535 { 528 {
536 visitor->trace(m_dataObject); 529 visitor->trace(m_dataObject);
537 visitor->trace(m_dragImageElement); 530 visitor->trace(m_dragImageElement);
538 } 531 }
539 532
540 } // namespace blink 533 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/clipboard/DataTransfer.h ('k') | Source/core/css/CSSPropertySourceData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698