Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: ui/aura/window_tree_host_x11.cc

Issue 2924343002: Move ui::GetAtom to gfx::GetAtom (Closed)
Patch Set: fix CrOs build Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/test/ui_controls_factory_aurax11.cc ('k') | ui/base/clipboard/clipboard_aurax11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_tree_host_x11.cc
diff --git a/ui/aura/window_tree_host_x11.cc b/ui/aura/window_tree_host_x11.cc
index f59d99ecee569cdff01cbcc1ad6a9fb2c619c73f..0635b7a65ff21e4b22f58649ced937e831269c81 100644
--- a/ui/aura/window_tree_host_x11.cc
+++ b/ui/aura/window_tree_host_x11.cc
@@ -51,6 +51,7 @@
#include "ui/events/platform/platform_event_observer.h"
#include "ui/events/platform/platform_event_source.h"
#include "ui/events/platform/x11/x11_event_source.h"
+#include "ui/gfx/x/x11_atom_cache.h"
using std::max;
using std::min;
@@ -145,8 +146,8 @@ WindowTreeHostX11::WindowTreeHostX11(const gfx::Rect& bounds)
// should listen for activation events and anything else that GTK+ listens
// for, and do something useful.
::Atom protocols[2];
- protocols[0] = ui::GetAtom("WM_DELETE_WINDOW");
- protocols[1] = ui::GetAtom("_NET_WM_PING");
+ protocols[0] = gfx::GetAtom("WM_DELETE_WINDOW");
+ protocols[1] = gfx::GetAtom("_NET_WM_PING");
XSetWMProtocols(xdisplay_, xwindow_, protocols, 2);
// We need a WM_CLIENT_MACHINE and WM_LOCALE_NAME value so we integrate with
@@ -160,7 +161,7 @@ WindowTreeHostX11::WindowTreeHostX11(const gfx::Rect& bounds)
static_assert(sizeof(long) >= sizeof(pid_t),
"pid_t should not be larger than long");
long pid = getpid();
- XChangeProperty(xdisplay_, xwindow_, ui::GetAtom("_NET_WM_PID"), XA_CARDINAL,
+ XChangeProperty(xdisplay_, xwindow_, gfx::GetAtom("_NET_WM_PID"), XA_CARDINAL,
32, PropModeReplace, reinterpret_cast<unsigned char*>(&pid),
1);
@@ -307,10 +308,10 @@ uint32_t WindowTreeHostX11::DispatchEvent(const ui::PlatformEvent& event) {
break;
case ClientMessage: {
Atom message_type = static_cast<Atom>(xev->xclient.data.l[0]);
- if (message_type == ui::GetAtom("WM_DELETE_WINDOW")) {
+ if (message_type == gfx::GetAtom("WM_DELETE_WINDOW")) {
// We have received a close message from the window manager.
OnHostCloseRequested();
- } else if (message_type == ui::GetAtom("_NET_WM_PING")) {
+ } else if (message_type == gfx::GetAtom("_NET_WM_PING")) {
XEvent reply_event = *xev;
reply_event.xclient.window = x_root_window_;
« no previous file with comments | « ui/aura/test/ui_controls_factory_aurax11.cc ('k') | ui/base/clipboard/clipboard_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698