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

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

Issue 392153002: Remove X11/Xlib.h include from selection_requestor.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/x/selection_requestor.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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 // We should not get requests for the CLIPBOARD_MANAGER selection 539 // We should not get requests for the CLIPBOARD_MANAGER selection
540 // because we never take ownership of it. 540 // because we never take ownership of it.
541 DCHECK_EQ(GetCopyPasteSelection(), xev->xselectionrequest.selection); 541 DCHECK_EQ(GetCopyPasteSelection(), xev->xselectionrequest.selection);
542 clipboard_owner_.OnSelectionRequest(xev->xselectionrequest); 542 clipboard_owner_.OnSelectionRequest(xev->xselectionrequest);
543 } 543 }
544 break; 544 break;
545 } 545 }
546 case SelectionNotify: { 546 case SelectionNotify: {
547 ::Atom selection = xev->xselection.selection; 547 ::Atom selection = xev->xselection.selection;
548 if (selection == XA_PRIMARY) 548 if (selection == XA_PRIMARY)
549 primary_requestor_.OnSelectionNotify(xev->xselection); 549 primary_requestor_.OnSelectionNotify(*xev);
550 else if (selection == GetCopyPasteSelection()) 550 else if (selection == GetCopyPasteSelection())
551 clipboard_requestor_.OnSelectionNotify(xev->xselection); 551 clipboard_requestor_.OnSelectionNotify(*xev);
552 else if (selection == atom_cache_.GetAtom(kClipboardManager)) 552 else if (selection == atom_cache_.GetAtom(kClipboardManager))
553 clipboard_manager_requestor_.OnSelectionNotify(xev->xselection); 553 clipboard_manager_requestor_.OnSelectionNotify(*xev);
554 break; 554 break;
555 } 555 }
556 case SelectionClear: { 556 case SelectionClear: {
557 if (xev->xselectionclear.selection == XA_PRIMARY) { 557 if (xev->xselectionclear.selection == XA_PRIMARY) {
558 primary_owner_.OnSelectionClear(xev->xselectionclear); 558 primary_owner_.OnSelectionClear(xev->xselectionclear);
559 } else { 559 } else {
560 // We should not get requests for the CLIPBOARD_MANAGER selection 560 // We should not get requests for the CLIPBOARD_MANAGER selection
561 // because we never take ownership of it. 561 // because we never take ownership of it.
562 DCHECK_EQ(GetCopyPasteSelection(), xev->xselection.selection); 562 DCHECK_EQ(GetCopyPasteSelection(), xev->xselection.selection);
563 clipboard_owner_.OnSelectionClear(xev->xselectionclear); 563 clipboard_owner_.OnSelectionClear(xev->xselectionclear);
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 return type; 914 return type;
915 } 915 }
916 916
917 // static 917 // static
918 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() { 918 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() {
919 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypePepperCustomData)); 919 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypePepperCustomData));
920 return type; 920 return type;
921 } 921 }
922 922
923 } // namespace ui 923 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/base/x/selection_requestor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698