summaryrefslogtreecommitdiff
path: root/chromium/ui/base/x/selection_utils.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/ui/base/x/selection_utils.h
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ui/base/x/selection_utils.h')
-rw-r--r--chromium/ui/base/x/selection_utils.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/chromium/ui/base/x/selection_utils.h b/chromium/ui/base/x/selection_utils.h
index 5be34cd6414..9ca25b373a0 100644
--- a/chromium/ui/base/x/selection_utils.h
+++ b/chromium/ui/base/x/selection_utils.h
@@ -20,17 +20,17 @@ COMPONENT_EXPORT(UI_BASE_X) extern const char kText[];
COMPONENT_EXPORT(UI_BASE_X) extern const char kUtf8String[];
// Returns a list of all text atoms that we handle.
-COMPONENT_EXPORT(UI_BASE_X) std::vector<::Atom> GetTextAtomsFrom();
+COMPONENT_EXPORT(UI_BASE_X) std::vector<x11::Atom> GetTextAtomsFrom();
-COMPONENT_EXPORT(UI_BASE_X) std::vector<::Atom> GetURLAtomsFrom();
+COMPONENT_EXPORT(UI_BASE_X) std::vector<x11::Atom> GetURLAtomsFrom();
-COMPONENT_EXPORT(UI_BASE_X) std::vector<::Atom> GetURIListAtomsFrom();
+COMPONENT_EXPORT(UI_BASE_X) std::vector<x11::Atom> GetURIListAtomsFrom();
// Places the intersection of |desired| and |offered| into |output|.
COMPONENT_EXPORT(UI_BASE_X)
-void GetAtomIntersection(const std::vector<::Atom>& desired,
- const std::vector<::Atom>& offered,
- std::vector<::Atom>* output);
+void GetAtomIntersection(const std::vector<x11::Atom>& desired,
+ const std::vector<x11::Atom>& offered,
+ std::vector<x11::Atom>* output);
// Takes the raw bytes of the base::string16 and copies them into |bytes|.
COMPONENT_EXPORT(UI_BASE_X)
@@ -56,8 +56,9 @@ base::string16 RefCountedMemoryToString16(
class COMPONENT_EXPORT(UI_BASE_X) SelectionFormatMap {
public:
// Our internal data store, which we only expose through iterators.
- typedef std::map< ::Atom, scoped_refptr<base::RefCountedMemory> > InternalMap;
- typedef InternalMap::const_iterator const_iterator;
+ using InternalMap =
+ std::map<x11::Atom, scoped_refptr<base::RefCountedMemory>>;
+ using const_iterator = InternalMap::const_iterator;
SelectionFormatMap();
SelectionFormatMap(const SelectionFormatMap& other);
@@ -66,19 +67,20 @@ class COMPONENT_EXPORT(UI_BASE_X) SelectionFormatMap {
// Adds the selection in the format |atom|. Ownership of |data| is passed to
// us.
- void Insert(::Atom atom, const scoped_refptr<base::RefCountedMemory>& item);
+ void Insert(x11::Atom atom,
+ const scoped_refptr<base::RefCountedMemory>& item);
// Returns the first of the requested_types or NULL if missing.
ui::SelectionData GetFirstOf(
- const std::vector< ::Atom>& requested_types) const;
+ const std::vector<x11::Atom>& requested_types) const;
// Returns all the selected types.
- std::vector< ::Atom> GetTypes() const;
+ std::vector<x11::Atom> GetTypes() const;
// Pass through to STL map. Only allow non-mutation access.
const_iterator begin() const { return data_.begin(); }
const_iterator end() const { return data_.end(); }
- const_iterator find(::Atom atom) const { return data_.find(atom); }
+ const_iterator find(x11::Atom atom) const { return data_.find(atom); }
size_t size() const { return data_.size(); }
private:
@@ -92,14 +94,14 @@ class COMPONENT_EXPORT(UI_BASE_X) SelectionData {
public:
// |atom_cache| is still owned by caller.
SelectionData();
- SelectionData(::Atom type,
+ SelectionData(x11::Atom type,
const scoped_refptr<base::RefCountedMemory>& memory);
SelectionData(const SelectionData& rhs);
~SelectionData();
SelectionData& operator=(const SelectionData& rhs);
bool IsValid() const;
- ::Atom GetType() const;
+ x11::Atom GetType() const;
const unsigned char* GetData() const;
size_t GetSize() const;
@@ -115,7 +117,7 @@ class COMPONENT_EXPORT(UI_BASE_X) SelectionData {
void AssignTo(base::string16* result) const;
private:
- ::Atom type_;
+ x11::Atom type_;
scoped_refptr<base::RefCountedMemory> memory_;
};