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

Side by Side Diff: ui/base/x/selection_utils.cc

Issue 23460052: Move XID, XDisplay, GetXDisplay and a few other types to ui/gfx/x/x11_types.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/x/selection_utils.h" 5 #include "ui/base/x/selection_utils.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/i18n/icu_string_conversions.h" 9 #include "base/i18n/icu_string_conversions.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 for (const_iterator it = data_.begin(); it != data_.end(); ++it) 126 for (const_iterator it = data_.begin(); it != data_.end(); ++it)
127 atoms.push_back(it->first); 127 atoms.push_back(it->first);
128 128
129 return atoms; 129 return atoms;
130 } 130 }
131 131
132 /////////////////////////////////////////////////////////////////////////////// 132 ///////////////////////////////////////////////////////////////////////////////
133 133
134 SelectionData::SelectionData() 134 SelectionData::SelectionData()
135 : type_(None), 135 : type_(None),
136 atom_cache_(ui::GetXDisplay(), kSelectionDataAtoms) { 136 atom_cache_(gfx::GetXDisplay(), kSelectionDataAtoms) {
137 } 137 }
138 138
139 SelectionData::SelectionData( 139 SelectionData::SelectionData(
140 ::Atom type, 140 ::Atom type,
141 const scoped_refptr<base::RefCountedMemory>& memory) 141 const scoped_refptr<base::RefCountedMemory>& memory)
142 : type_(type), 142 : type_(type),
143 memory_(memory), 143 memory_(memory),
144 atom_cache_(ui::GetXDisplay(), kSelectionDataAtoms) { 144 atom_cache_(gfx::GetXDisplay(), kSelectionDataAtoms) {
145 } 145 }
146 146
147 SelectionData::SelectionData(const SelectionData& rhs) 147 SelectionData::SelectionData(const SelectionData& rhs)
148 : type_(rhs.type_), 148 : type_(rhs.type_),
149 memory_(rhs.memory_), 149 memory_(rhs.memory_),
150 atom_cache_(ui::GetXDisplay(), kSelectionDataAtoms) { 150 atom_cache_(gfx::GetXDisplay(), kSelectionDataAtoms) {
151 } 151 }
152 152
153 SelectionData::~SelectionData() {} 153 SelectionData::~SelectionData() {}
154 154
155 SelectionData& SelectionData::operator=(const SelectionData& rhs) { 155 SelectionData& SelectionData::operator=(const SelectionData& rhs) {
156 type_ = rhs.type_; 156 type_ = rhs.type_;
157 memory_ = rhs.memory_; 157 memory_ = rhs.memory_;
158 // TODO(erg): In some future where we have to support multiple X Displays, 158 // TODO(erg): In some future where we have to support multiple X Displays,
159 // the following will also need to deal with the display. 159 // the following will also need to deal with the display.
160 return *this; 160 return *this;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 void SelectionData::AssignTo(std::string* result) const { 225 void SelectionData::AssignTo(std::string* result) const {
226 *result = RefCountedMemoryToString(memory_); 226 *result = RefCountedMemoryToString(memory_);
227 } 227 }
228 228
229 void SelectionData::AssignTo(string16* result) const { 229 void SelectionData::AssignTo(string16* result) const {
230 *result = RefCountedMemoryToString16(memory_); 230 *result = RefCountedMemoryToString16(memory_);
231 } 231 }
232 232
233 } // namespace ui 233 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/x/events_x.cc ('k') | ui/base/x/x11_error_tracker.cc » ('j') | ui/base/x/x11_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698