OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 DEFINE_STATIC_LOCAL(const String, kind_string, ("string")); | 52 DEFINE_STATIC_LOCAL(const String, kind_string, ("string")); |
53 DEFINE_STATIC_LOCAL(const String, kind_file, ("file")); | 53 DEFINE_STATIC_LOCAL(const String, kind_file, ("file")); |
54 if (!data_transfer_->CanReadTypes()) | 54 if (!data_transfer_->CanReadTypes()) |
55 return String(); | 55 return String(); |
56 switch (item_->Kind()) { | 56 switch (item_->Kind()) { |
57 case DataObjectItem::kStringKind: | 57 case DataObjectItem::kStringKind: |
58 return kind_string; | 58 return kind_string; |
59 case DataObjectItem::kFileKind: | 59 case DataObjectItem::kFileKind: |
60 return kind_file; | 60 return kind_file; |
61 } | 61 } |
62 ASSERT_NOT_REACHED(); | 62 NOTREACHED(); |
63 return String(); | 63 return String(); |
64 } | 64 } |
65 | 65 |
66 String DataTransferItem::type() const { | 66 String DataTransferItem::type() const { |
67 if (!data_transfer_->CanReadTypes()) | 67 if (!data_transfer_->CanReadTypes()) |
68 return String(); | 68 return String(); |
69 return item_->GetType(); | 69 return item_->GetType(); |
70 } | 70 } |
71 | 71 |
72 static void RunGetAsStringTask(ExecutionContext* context, | 72 static void RunGetAsStringTask(ExecutionContext* context, |
(...skipping 29 matching lines...) Expand all Loading... |
102 DataTransferItem::DataTransferItem(DataTransfer* data_transfer, | 102 DataTransferItem::DataTransferItem(DataTransfer* data_transfer, |
103 DataObjectItem* item) | 103 DataObjectItem* item) |
104 : data_transfer_(data_transfer), item_(item) {} | 104 : data_transfer_(data_transfer), item_(item) {} |
105 | 105 |
106 DEFINE_TRACE(DataTransferItem) { | 106 DEFINE_TRACE(DataTransferItem) { |
107 visitor->Trace(data_transfer_); | 107 visitor->Trace(data_transfer_); |
108 visitor->Trace(item_); | 108 visitor->Trace(item_); |
109 } | 109 } |
110 | 110 |
111 } // namespace blink | 111 } // namespace blink |
OLD | NEW |