| 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/message_loop/message_pump_x11.h" | 9 #include "base/message_loop/message_pump_x11.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 kMimeTypeMozillaURL, | 35 kMimeTypeMozillaURL, |
| 36 Clipboard::kMimeTypeText, | 36 Clipboard::kMimeTypeText, |
| 37 NULL | 37 NULL |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 } // namespace | 40 } // namespace |
| 41 | 41 |
| 42 OSExchangeDataProviderAuraX11::OSExchangeDataProviderAuraX11( | 42 OSExchangeDataProviderAuraX11::OSExchangeDataProviderAuraX11( |
| 43 ::Window x_window, | 43 ::Window x_window, |
| 44 const SelectionFormatMap& selection) | 44 const SelectionFormatMap& selection) |
| 45 : x_display_(GetXDisplay()), | 45 : x_display_(gfx::GetXDisplay()), |
| 46 x_root_window_(DefaultRootWindow(x_display_)), | 46 x_root_window_(DefaultRootWindow(x_display_)), |
| 47 own_window_(false), | 47 own_window_(false), |
| 48 x_window_(x_window), | 48 x_window_(x_window), |
| 49 atom_cache_(x_display_, kAtomsToCache), | 49 atom_cache_(x_display_, kAtomsToCache), |
| 50 format_map_(selection), | 50 format_map_(selection), |
| 51 selection_owner_(x_display_, x_window_, | 51 selection_owner_(x_display_, x_window_, |
| 52 atom_cache_.GetAtom(kDndSelection)) { | 52 atom_cache_.GetAtom(kDndSelection)) { |
| 53 // We don't know all possible MIME types at compile time. | 53 // We don't know all possible MIME types at compile time. |
| 54 atom_cache_.allow_uncached_atoms(); | 54 atom_cache_.allow_uncached_atoms(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 OSExchangeDataProviderAuraX11::OSExchangeDataProviderAuraX11() | 57 OSExchangeDataProviderAuraX11::OSExchangeDataProviderAuraX11() |
| 58 : x_display_(GetXDisplay()), | 58 : x_display_(gfx::GetXDisplay()), |
| 59 x_root_window_(DefaultRootWindow(x_display_)), | 59 x_root_window_(DefaultRootWindow(x_display_)), |
| 60 own_window_(true), | 60 own_window_(true), |
| 61 x_window_(XCreateWindow( | 61 x_window_(XCreateWindow( |
| 62 x_display_, | 62 x_display_, |
| 63 x_root_window_, | 63 x_root_window_, |
| 64 -100, -100, 10, 10, // x, y, width, height | 64 -100, -100, 10, 10, // x, y, width, height |
| 65 0, // border width | 65 0, // border width |
| 66 CopyFromParent, // depth | 66 CopyFromParent, // depth |
| 67 InputOnly, | 67 InputOnly, |
| 68 CopyFromParent, // visual | 68 CopyFromParent, // visual |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 373 |
| 374 /////////////////////////////////////////////////////////////////////////////// | 374 /////////////////////////////////////////////////////////////////////////////// |
| 375 // OSExchangeData, public: | 375 // OSExchangeData, public: |
| 376 | 376 |
| 377 // static | 377 // static |
| 378 OSExchangeData::Provider* OSExchangeData::CreateProvider() { | 378 OSExchangeData::Provider* OSExchangeData::CreateProvider() { |
| 379 return new OSExchangeDataProviderAuraX11(); | 379 return new OSExchangeDataProviderAuraX11(); |
| 380 } | 380 } |
| 381 | 381 |
| 382 } // namespace ui | 382 } // namespace ui |
| OLD | NEW |