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

Unified Diff: ui/base/x/selection_owner.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/base/idle/screensaver_window_finder_x11.cc ('k') | ui/base/x/selection_requestor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/x/selection_owner.cc
diff --git a/ui/base/x/selection_owner.cc b/ui/base/x/selection_owner.cc
index fa8c32179e2d41383b7846af31af0789d79cbcb2..76e6d9febc54d7b89322c3a8fc3ce4a0d5b75105 100644
--- a/ui/base/x/selection_owner.cc
+++ b/ui/base/x/selection_owner.cc
@@ -11,9 +11,9 @@
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "ui/base/x/selection_utils.h"
-#include "ui/base/x/x11_util.h"
#include "ui/base/x/x11_window_event_manager.h"
#include "ui/events/platform/x11/x11_event_source.h"
+#include "ui/gfx/x/x11_atom_cache.h"
namespace ui {
@@ -144,7 +144,7 @@ void SelectionOwner::OnSelectionRequest(const XEvent& event) {
reply.xselection.property = None; // Indicates failure
reply.xselection.time = event.xselectionrequest.time;
- if (requested_target == GetAtom(kMultiple)) {
+ if (requested_target == gfx::GetAtom(kMultiple)) {
// The contents of |requested_property| should be a list of
// <target,property> pairs.
std::vector<std::pair<XAtom,XAtom> > conversions;
@@ -164,8 +164,8 @@ void SelectionOwner::OnSelectionRequest(const XEvent& event) {
// Set the property to indicate which conversions succeeded. This matches
// what GTK does.
XChangeProperty(
- x_display_, requestor, requested_property, GetAtom(kAtomPair), 32,
- PropModeReplace,
+ x_display_, requestor, requested_property, gfx::GetAtom(kAtomPair),
+ 32, PropModeReplace,
reinterpret_cast<const unsigned char*>(&conversion_results.front()),
conversion_results.size());
@@ -206,10 +206,10 @@ void SelectionOwner::OnPropertyEvent(const XEvent& event) {
bool SelectionOwner::ProcessTarget(XAtom target,
XID requestor,
XAtom property) {
- XAtom multiple_atom = GetAtom(kMultiple);
- XAtom save_targets_atom = GetAtom(kSaveTargets);
- XAtom targets_atom = GetAtom(kTargets);
- XAtom timestamp_atom = GetAtom(kTimestamp);
+ XAtom multiple_atom = gfx::GetAtom(kMultiple);
+ XAtom save_targets_atom = gfx::GetAtom(kSaveTargets);
+ XAtom targets_atom = gfx::GetAtom(kTargets);
+ XAtom timestamp_atom = gfx::GetAtom(kTimestamp);
if (target == multiple_atom || target == save_targets_atom)
return false;
@@ -246,7 +246,7 @@ bool SelectionOwner::ProcessTarget(XAtom target,
// the size of X requests. Notify the selection requestor that the data
// will be sent incrementally by returning data of type "INCR".
long length = it->second->size();
- XChangeProperty(x_display_, requestor, property, GetAtom(kIncr), 32,
+ XChangeProperty(x_display_, requestor, property, gfx::GetAtom(kIncr), 32,
PropModeReplace,
reinterpret_cast<unsigned char*>(&length), 1);
« no previous file with comments | « ui/base/idle/screensaver_window_finder_x11.cc ('k') | ui/base/x/selection_requestor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698