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

Side by Side Diff: ui/base/clipboard/clipboard_aurax11.cc

Issue 16271006: Drag on linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Document Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/base/dragdrop/desktop_selection_provider_aurax11.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/clipboard/clipboard.h" 5 #include "ui/base/clipboard/clipboard.h"
6 6
7 #include <X11/extensions/Xfixes.h> 7 #include <X11/extensions/Xfixes.h>
8 #include <X11/Xatom.h> 8 #include <X11/Xatom.h>
9 #include <list> 9 #include <list>
10 #include <set> 10 #include <set>
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 if (XGetSelectionOwner(x_display_, selection_name) == x_window_) { 392 if (XGetSelectionOwner(x_display_, selection_name) == x_window_) {
393 // We can local fastpath instead of playing the nested message loop game 393 // We can local fastpath instead of playing the nested message loop game
394 // with the X server. 394 // with the X server.
395 SelectionFormatMap* format_map = LookupStorageForAtom(selection_name); 395 SelectionFormatMap* format_map = LookupStorageForAtom(selection_name);
396 DCHECK(format_map); 396 DCHECK(format_map);
397 397
398 for (std::vector< ::Atom>::const_iterator it = types.begin(); 398 for (std::vector< ::Atom>::const_iterator it = types.begin();
399 it != types.end(); ++it) { 399 it != types.end(); ++it) {
400 SelectionFormatMap::const_iterator format_map_it = format_map->find(*it); 400 SelectionFormatMap::const_iterator format_map_it = format_map->find(*it);
401 if (format_map_it != format_map->end()) { 401 if (format_map_it != format_map->end()) {
402 scoped_ptr<SelectionData> data_out(new SelectionData(x_display_)); 402 scoped_ptr<SelectionData> data_out(new SelectionData);
403 data_out->Set(format_map_it->first, format_map_it->second.first, 403 data_out->Set(format_map_it->first, format_map_it->second.first,
404 format_map_it->second.second, false); 404 format_map_it->second.second, false);
405 return data_out.Pass(); 405 return data_out.Pass();
406 } 406 }
407 } 407 }
408 } else { 408 } else {
409 TargetList targets = WaitAndGetTargetsList(buffer); 409 TargetList targets = WaitAndGetTargetsList(buffer);
410 SelectionRequestor* receiver = GetSelectionRequestorForBuffer(buffer); 410 SelectionRequestor* receiver = GetSelectionRequestorForBuffer(buffer);
411 411
412 std::vector< ::Atom> intersection; 412 std::vector< ::Atom> intersection;
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 return type; 848 return type;
849 } 849 }
850 850
851 // static 851 // static
852 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() { 852 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() {
853 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypePepperCustomData)); 853 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypePepperCustomData));
854 return type; 854 return type;
855 } 855 }
856 856
857 } // namespace ui 857 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/base/dragdrop/desktop_selection_provider_aurax11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698