| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/base/dragdrop/os_exchange_data_provider_aurax11.h" | 5 #include "ui/base/dragdrop/os_exchange_data_provider_aurax11.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 return !requested_types.empty(); | 497 return !requested_types.empty(); |
| 498 } | 498 } |
| 499 | 499 |
| 500 void OSExchangeDataProviderAuraX11::SetDragImage( | 500 void OSExchangeDataProviderAuraX11::SetDragImage( |
| 501 const gfx::ImageSkia& image, | 501 const gfx::ImageSkia& image, |
| 502 const gfx::Vector2d& cursor_offset) { | 502 const gfx::Vector2d& cursor_offset) { |
| 503 drag_image_ = image; | 503 drag_image_ = image; |
| 504 drag_image_offset_ = cursor_offset; | 504 drag_image_offset_ = cursor_offset; |
| 505 } | 505 } |
| 506 | 506 |
| 507 const gfx::ImageSkia& OSExchangeDataProviderAuraX11::GetDragImage() const { | 507 gfx::ImageSkia OSExchangeDataProviderAuraX11::GetDragImage() const { |
| 508 return drag_image_; | 508 return drag_image_; |
| 509 } | 509 } |
| 510 | 510 |
| 511 const gfx::Vector2d& OSExchangeDataProviderAuraX11::GetDragImageOffset() const { | 511 gfx::Vector2d OSExchangeDataProviderAuraX11::GetDragImageOffset() const { |
| 512 return drag_image_offset_; | 512 return drag_image_offset_; |
| 513 } | 513 } |
| 514 | 514 |
| 515 bool OSExchangeDataProviderAuraX11::CanDispatchEvent( | 515 bool OSExchangeDataProviderAuraX11::CanDispatchEvent( |
| 516 const PlatformEvent& event) { | 516 const PlatformEvent& event) { |
| 517 return event->xany.window == x_window_; | 517 return event->xany.window == x_window_; |
| 518 } | 518 } |
| 519 | 519 |
| 520 uint32_t OSExchangeDataProviderAuraX11::DispatchEvent( | 520 uint32_t OSExchangeDataProviderAuraX11::DispatchEvent( |
| 521 const PlatformEvent& event) { | 521 const PlatformEvent& event) { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 541 } | 541 } |
| 542 | 542 |
| 543 return false; | 543 return false; |
| 544 } | 544 } |
| 545 | 545 |
| 546 std::vector< ::Atom> OSExchangeDataProviderAuraX11::GetTargets() const { | 546 std::vector< ::Atom> OSExchangeDataProviderAuraX11::GetTargets() const { |
| 547 return format_map_.GetTypes(); | 547 return format_map_.GetTypes(); |
| 548 } | 548 } |
| 549 | 549 |
| 550 } // namespace ui | 550 } // namespace ui |
| OLD | NEW |