OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "views/widget/drop_target_gtk.h" | 5 #include "views/widget/drop_target_gtk.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 | 9 |
10 #include "app/drag_drop_types.h" | 10 #include "app/drag_drop_types.h" |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 gtk_drag_get_data(widget, context, | 295 gtk_drag_get_data(widget, context, |
296 GtkDndUtil::GetAtomForTarget( | 296 GtkDndUtil::GetAtomForTarget( |
297 GtkDndUtil::TEXT_URI_LIST), time); | 297 GtkDndUtil::TEXT_URI_LIST), time); |
298 } | 298 } |
299 } | 299 } |
300 if ((formats & OSExchangeData::FILE_CONTENTS) != 0 && | 300 if ((formats & OSExchangeData::FILE_CONTENTS) != 0 && |
301 (requested_formats_ & OSExchangeData::FILE_CONTENTS) == 0) { | 301 (requested_formats_ & OSExchangeData::FILE_CONTENTS) == 0) { |
302 requested_formats_ |= OSExchangeData::FILE_CONTENTS; | 302 requested_formats_ |= OSExchangeData::FILE_CONTENTS; |
303 NOTIMPLEMENTED(); | 303 NOTIMPLEMENTED(); |
304 } | 304 } |
305 if ((formats & OSExchangeData::FILE_NAME != 0) && | 305 if (((formats & OSExchangeData::FILE_NAME) != 0) && |
306 (requested_formats_ & OSExchangeData::FILE_NAME) == 0) { | 306 (requested_formats_ & OSExchangeData::FILE_NAME) == 0) { |
307 requested_formats_ |= OSExchangeData::FILE_NAME; | 307 requested_formats_ |= OSExchangeData::FILE_NAME; |
308 NOTIMPLEMENTED(); | 308 NOTIMPLEMENTED(); |
309 } | 309 } |
310 if ((formats & OSExchangeData::HTML) != 0 && | 310 if ((formats & OSExchangeData::HTML) != 0 && |
311 (requested_formats_ & OSExchangeData::HTML) == 0) { | 311 (requested_formats_ & OSExchangeData::HTML) == 0) { |
312 requested_formats_ |= OSExchangeData::HTML; | 312 requested_formats_ |= OSExchangeData::HTML; |
313 NOTIMPLEMENTED(); | 313 NOTIMPLEMENTED(); |
314 } | 314 } |
315 for (std::set<GdkAtom>::const_iterator i = custom_formats.begin(); | 315 for (std::set<GdkAtom>::const_iterator i = custom_formats.begin(); |
316 i != custom_formats.end(); ++i) { | 316 i != custom_formats.end(); ++i) { |
317 if (requested_custom_formats_.find(*i) == | 317 if (requested_custom_formats_.find(*i) == |
318 requested_custom_formats_.end()) { | 318 requested_custom_formats_.end()) { |
319 requested_custom_formats_.insert(*i); | 319 requested_custom_formats_.insert(*i); |
320 gtk_drag_get_data(widget, context, *i, time); | 320 gtk_drag_get_data(widget, context, *i, time); |
321 } | 321 } |
322 } | 322 } |
323 } | 323 } |
324 | 324 |
325 OSExchangeDataProviderGtk& DropTargetGtk::data_provider() const { | 325 OSExchangeDataProviderGtk& DropTargetGtk::data_provider() const { |
326 return static_cast<OSExchangeDataProviderGtk&>(data_->provider()); | 326 return static_cast<OSExchangeDataProviderGtk&>(data_->provider()); |
327 } | 327 } |
328 | 328 |
329 } // namespace views | 329 } // namespace views |
OLD | NEW |