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

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

Issue 129113004: linux_aura: Implement file drag and drop in content area. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
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 #ifndef UI_BASE_X_SELECTION_UTILS_H_ 5 #ifndef UI_BASE_X_SELECTION_UTILS_H_
6 #define UI_BASE_X_SELECTION_UTILS_H_ 6 #define UI_BASE_X_SELECTION_UTILS_H_
7 7
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 9
10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. 10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class.
(...skipping 16 matching lines...) Expand all
27 extern const char kText[]; 27 extern const char kText[];
28 extern const char kUtf8String[]; 28 extern const char kUtf8String[];
29 29
30 // Returns a list of all text atoms that we handle. 30 // Returns a list of all text atoms that we handle.
31 UI_BASE_EXPORT std::vector< ::Atom> GetTextAtomsFrom( 31 UI_BASE_EXPORT std::vector< ::Atom> GetTextAtomsFrom(
32 const X11AtomCache* atom_cache); 32 const X11AtomCache* atom_cache);
33 33
34 UI_BASE_EXPORT std::vector< ::Atom> GetURLAtomsFrom( 34 UI_BASE_EXPORT std::vector< ::Atom> GetURLAtomsFrom(
35 const X11AtomCache* atom_cache); 35 const X11AtomCache* atom_cache);
36 36
37 UI_BASE_EXPORT std::vector< ::Atom> GetURIListAtomsFrom(
38 const X11AtomCache* atom_cache);
39
37 // Places the intersection of |desired| and |offered| into |output|. 40 // Places the intersection of |desired| and |offered| into |output|.
38 UI_BASE_EXPORT void GetAtomIntersection(const std::vector< ::Atom>& desired, 41 UI_BASE_EXPORT void GetAtomIntersection(const std::vector< ::Atom>& desired,
39 const std::vector< ::Atom>& offered, 42 const std::vector< ::Atom>& offered,
40 std::vector< ::Atom>* output); 43 std::vector< ::Atom>* output);
41 44
42 // Takes the raw bytes of the base::string16 and copies them into |bytes|. 45 // Takes the raw bytes of the base::string16 and copies them into |bytes|.
43 UI_BASE_EXPORT void AddString16ToVector(const base::string16& str, 46 UI_BASE_EXPORT void AddString16ToVector(const base::string16& str,
44 std::vector<unsigned char>* bytes); 47 std::vector<unsigned char>* bytes);
48
49 // Tokenizes and parses the Selection Data as if it is a URI List.
50 UI_BASE_EXPORT std::vector<std::string> ParseURIList(const SelectionData& data);
45 51
46 UI_BASE_EXPORT std::string RefCountedMemoryToString( 52 UI_BASE_EXPORT std::string RefCountedMemoryToString(
47 const scoped_refptr<base::RefCountedMemory>& memory); 53 const scoped_refptr<base::RefCountedMemory>& memory);
48 54
49 UI_BASE_EXPORT base::string16 RefCountedMemoryToString16( 55 UI_BASE_EXPORT base::string16 RefCountedMemoryToString16(
50 const scoped_refptr<base::RefCountedMemory>& memory); 56 const scoped_refptr<base::RefCountedMemory>& memory);
51 57
52 /////////////////////////////////////////////////////////////////////////////// 58 ///////////////////////////////////////////////////////////////////////////////
53 59
54 // Represents the selection in different data formats. Binary data passed in is 60 // Represents the selection in different data formats. Binary data passed in is
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 private: 122 private:
117 ::Atom type_; 123 ::Atom type_;
118 scoped_refptr<base::RefCountedMemory> memory_; 124 scoped_refptr<base::RefCountedMemory> memory_;
119 125
120 X11AtomCache atom_cache_; 126 X11AtomCache atom_cache_;
121 }; 127 };
122 128
123 } // namespace ui 129 } // namespace ui
124 130
125 #endif // UI_BASE_X_SELECTION_UTILS_H_ 131 #endif // UI_BASE_X_SELECTION_UTILS_H_
OLDNEW
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_aurax11_unittest.cc ('k') | ui/base/x/selection_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698