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_split.h" | 9 #include "base/strings/string_split.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 0, | 76 0, |
77 NULL)), | 77 NULL)), |
78 atom_cache_(x_display_, kAtomsToCache), | 78 atom_cache_(x_display_, kAtomsToCache), |
79 format_map_(), | 79 format_map_(), |
80 selection_owner_(x_display_, x_window_, | 80 selection_owner_(x_display_, x_window_, |
81 atom_cache_.GetAtom(kDndSelection)) { | 81 atom_cache_.GetAtom(kDndSelection)) { |
82 // We don't know all possible MIME types at compile time. | 82 // We don't know all possible MIME types at compile time. |
83 atom_cache_.allow_uncached_atoms(); | 83 atom_cache_.allow_uncached_atoms(); |
84 | 84 |
85 XStoreName(x_display_, x_window_, "Chromium Drag & Drop Window"); | 85 XStoreName(x_display_, x_window_, "Chromium Drag & Drop Window"); |
| 86 XSelectInput(x_display_, x_window_, PropertyChangeMask); |
86 | 87 |
87 PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); | 88 PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); |
88 } | 89 } |
89 | 90 |
90 OSExchangeDataProviderAuraX11::~OSExchangeDataProviderAuraX11() { | 91 OSExchangeDataProviderAuraX11::~OSExchangeDataProviderAuraX11() { |
91 if (own_window_) { | 92 if (own_window_) { |
92 PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); | 93 PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); |
93 XDestroyWindow(x_display_, x_window_); | 94 XDestroyWindow(x_display_, x_window_); |
94 } | 95 } |
95 } | 96 } |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 | 547 |
547 /////////////////////////////////////////////////////////////////////////////// | 548 /////////////////////////////////////////////////////////////////////////////// |
548 // OSExchangeData, public: | 549 // OSExchangeData, public: |
549 | 550 |
550 // static | 551 // static |
551 OSExchangeData::Provider* OSExchangeData::CreateProvider() { | 552 OSExchangeData::Provider* OSExchangeData::CreateProvider() { |
552 return new OSExchangeDataProviderAuraX11(); | 553 return new OSExchangeDataProviderAuraX11(); |
553 } | 554 } |
554 | 555 |
555 } // namespace ui | 556 } // namespace ui |
OLD | NEW |