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 "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/ref_counted_memory.h" | 8 #include "base/memory/ref_counted_memory.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 | 505 |
506 const gfx::Vector2d& OSExchangeDataProviderAuraX11::GetDragImageOffset() const { | 506 const gfx::Vector2d& OSExchangeDataProviderAuraX11::GetDragImageOffset() const { |
507 return drag_image_offset_; | 507 return drag_image_offset_; |
508 } | 508 } |
509 | 509 |
510 bool OSExchangeDataProviderAuraX11::CanDispatchEvent( | 510 bool OSExchangeDataProviderAuraX11::CanDispatchEvent( |
511 const PlatformEvent& event) { | 511 const PlatformEvent& event) { |
512 return event->xany.window == x_window_; | 512 return event->xany.window == x_window_; |
513 } | 513 } |
514 | 514 |
515 uint32_t OSExchangeDataProviderAuraX11::DispatchEvent( | 515 ui::PostDispatchAction OSExchangeDataProviderAuraX11::DispatchEvent( |
516 const PlatformEvent& event) { | 516 const PlatformEvent& event) { |
517 XEvent* xev = event; | 517 XEvent* xev = event; |
518 switch (xev->type) { | 518 switch (xev->type) { |
519 case SelectionRequest: | 519 case SelectionRequest: |
520 selection_owner_.OnSelectionRequest(*xev); | 520 selection_owner_.OnSelectionRequest(*xev); |
521 return ui::POST_DISPATCH_STOP_PROPAGATION; | 521 return ui::POST_DISPATCH_STOP_PROPAGATION; |
522 default: | 522 default: |
523 NOTIMPLEMENTED(); | 523 NOTIMPLEMENTED(); |
524 } | 524 } |
525 return ui::POST_DISPATCH_NONE; | 525 return ui::POST_DISPATCH_NONE; |
(...skipping 18 matching lines...) Expand all Loading... |
544 | 544 |
545 /////////////////////////////////////////////////////////////////////////////// | 545 /////////////////////////////////////////////////////////////////////////////// |
546 // OSExchangeData, public: | 546 // OSExchangeData, public: |
547 | 547 |
548 // static | 548 // static |
549 OSExchangeData::Provider* OSExchangeData::CreateProvider() { | 549 OSExchangeData::Provider* OSExchangeData::CreateProvider() { |
550 return new OSExchangeDataProviderAuraX11(); | 550 return new OSExchangeDataProviderAuraX11(); |
551 } | 551 } |
552 | 552 |
553 } // namespace ui | 553 } // namespace ui |
OLD | NEW |