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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 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
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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 op == DragOperationEvery); 374 op == DragOperationEvery);
375 return op; 375 return op;
376 } 376 }
377 377
378 void DataTransfer::setSourceOperation(DragOperation op) { 378 void DataTransfer::setSourceOperation(DragOperation op) {
379 DCHECK_NE(op, DragOperationPrivate); 379 DCHECK_NE(op, DragOperationPrivate);
380 m_effectAllowed = convertDragOperationToEffectAllowed(op); 380 m_effectAllowed = convertDragOperationToEffectAllowed(op);
381 } 381 }
382 382
383 void DataTransfer::setDestinationOperation(DragOperation op) { 383 void DataTransfer::setDestinationOperation(DragOperation op) {
384 DCHECK(op == DragOperationCopy || op == DragOperationNone || 384 DCHECK(
385 op == DragOperationLink || op == DragOperationGeneric || 385 op == DragOperationCopy || op == DragOperationNone ||
386 op == DragOperationMove || 386 op == DragOperationLink || op == DragOperationGeneric ||
387 op == static_cast<DragOperation>(DragOperationGeneric | 387 op == DragOperationMove ||
388 DragOperationMove)); 388 op ==
389 static_cast<DragOperation>(DragOperationGeneric | DragOperationMove));
389 m_dropEffect = convertDragOperationToEffectAllowed(op); 390 m_dropEffect = convertDragOperationToEffectAllowed(op);
390 } 391 }
391 392
392 bool DataTransfer::hasDropZoneType(const String& keyword) { 393 bool DataTransfer::hasDropZoneType(const String& keyword) {
393 if (keyword.startsWith("file:")) 394 if (keyword.startsWith("file:"))
394 return hasFileOfType(keyword.substring(5)); 395 return hasFileOfType(keyword.substring(5));
395 396
396 if (keyword.startsWith("string:")) 397 if (keyword.startsWith("string:"))
397 return hasStringOfType(keyword.substring(7)); 398 return hasStringOfType(keyword.substring(7));
398 399
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 } 477 }
477 } 478 }
478 479
479 DEFINE_TRACE(DataTransfer) { 480 DEFINE_TRACE(DataTransfer) {
480 visitor->trace(m_dataObject); 481 visitor->trace(m_dataObject);
481 visitor->trace(m_dragImage); 482 visitor->trace(m_dragImage);
482 visitor->trace(m_dragImageElement); 483 visitor->trace(m_dragImageElement);
483 } 484 }
484 485
485 } // namespace blink 486 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698