OLD | NEW |
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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 return policy_ == kDataTransferWritable; | 373 return policy_ == kDataTransferWritable; |
374 } | 374 } |
375 | 375 |
376 bool DataTransfer::CanSetDragImage() const { | 376 bool DataTransfer::CanSetDragImage() const { |
377 return policy_ == kDataTransferImageWritable || | 377 return policy_ == kDataTransferImageWritable || |
378 policy_ == kDataTransferWritable; | 378 policy_ == kDataTransferWritable; |
379 } | 379 } |
380 | 380 |
381 DragOperation DataTransfer::SourceOperation() const { | 381 DragOperation DataTransfer::SourceOperation() const { |
382 DragOperation op = ConvertEffectAllowedToDragOperation(effect_allowed_); | 382 DragOperation op = ConvertEffectAllowedToDragOperation(effect_allowed_); |
383 ASSERT(op != kDragOperationPrivate); | 383 DCHECK_NE(op, kDragOperationPrivate); |
384 return op; | 384 return op; |
385 } | 385 } |
386 | 386 |
387 DragOperation DataTransfer::DestinationOperation() const { | 387 DragOperation DataTransfer::DestinationOperation() const { |
388 DragOperation op = ConvertEffectAllowedToDragOperation(drop_effect_); | 388 DragOperation op = ConvertEffectAllowedToDragOperation(drop_effect_); |
389 ASSERT(op == kDragOperationCopy || op == kDragOperationNone || | 389 ASSERT(op == kDragOperationCopy || op == kDragOperationNone || |
390 op == kDragOperationLink || | 390 op == kDragOperationLink || |
391 op == (DragOperation)(kDragOperationGeneric | kDragOperationMove) || | 391 op == (DragOperation)(kDragOperationGeneric | kDragOperationMove) || |
392 op == kDragOperationEvery); | 392 op == kDragOperationEvery); |
393 return op; | 393 return op; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 } | 498 } |
499 } | 499 } |
500 | 500 |
501 DEFINE_TRACE(DataTransfer) { | 501 DEFINE_TRACE(DataTransfer) { |
502 visitor->Trace(data_object_); | 502 visitor->Trace(data_object_); |
503 visitor->Trace(drag_image_); | 503 visitor->Trace(drag_image_); |
504 visitor->Trace(drag_image_element_); | 504 visitor->Trace(drag_image_element_); |
505 } | 505 } |
506 | 506 |
507 } // namespace blink | 507 } // namespace blink |
OLD | NEW |