Index: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc |
index 21cd3ff1ba9aed6775f1c1d80df4ccfb3ea27545..862d806f43ff6c45b4404d6f83496adc631b9798 100644 |
--- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc |
+++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc |
@@ -24,7 +24,6 @@ |
#include "ui/base/dragdrop/os_exchange_data.h" |
#include "ui/base/x/x11_util.h" |
#include "ui/events/event_utils.h" |
-#include "ui/gfx/x/x11_atom_cache.h" |
#include "ui/gfx/x/x11_types.h" |
#include "ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h" |
#include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h" |
@@ -38,18 +37,6 @@ namespace views { |
namespace { |
-const char* kAtomsToCache[] = { |
- "XdndActionCopy", |
- "XdndDrop", |
- "XdndEnter", |
- "XdndFinished", |
- "XdndLeave", |
- "XdndPosition", |
- "XdndStatus", |
- "XdndTypeList", |
- NULL |
-}; |
- |
class TestDragDropClient; |
// Collects messages which would otherwise be sent to |xid_| via |
@@ -195,8 +182,6 @@ class TestDragDropClient : public SimpleTestDragDropClient { |
// for that window. |
std::map< ::Window, ClientMessageEventCollector*> collectors_; |
- ui::X11AtomCache atom_cache_; |
- |
DISALLOW_COPY_AND_ASSIGN(TestDragDropClient); |
}; |
@@ -310,20 +295,18 @@ TestDragDropClient::TestDragDropClient( |
aura::Window* window, |
DesktopNativeCursorManager* cursor_manager) |
: SimpleTestDragDropClient(window, cursor_manager), |
- source_xid_(window->GetHost()->GetAcceleratedWidget()), |
- atom_cache_(gfx::GetXDisplay(), kAtomsToCache) { |
-} |
+ source_xid_(window->GetHost()->GetAcceleratedWidget()) {} |
TestDragDropClient::~TestDragDropClient() { |
} |
Atom TestDragDropClient::GetAtom(const char* name) { |
- return atom_cache_.GetAtom(name); |
+ return ui::GetAtom(name); |
} |
bool TestDragDropClient::MessageHasType(const XClientMessageEvent& event, |
const char* type) { |
- return event.message_type == atom_cache_.GetAtom(type); |
+ return event.message_type == GetAtom(type); |
} |
void TestDragDropClient::SetEventCollectorFor( |
@@ -339,7 +322,7 @@ void TestDragDropClient::OnStatus(XID target_window, |
bool will_accept_drop, |
::Atom accepted_action) { |
XClientMessageEvent event; |
- event.message_type = atom_cache_.GetAtom("XdndStatus"); |
+ event.message_type = GetAtom("XdndStatus"); |
event.format = 32; |
event.window = source_xid_; |
event.data.l[0] = target_window; |
@@ -354,7 +337,7 @@ void TestDragDropClient::OnFinished(XID target_window, |
bool accepted_drop, |
::Atom performed_action) { |
XClientMessageEvent event; |
- event.message_type = atom_cache_.GetAtom("XdndFinished"); |
+ event.message_type = GetAtom("XdndFinished"); |
event.format = 32; |
event.window = source_xid_; |
event.data.l[0] = target_window; |