| OLD | NEW |
| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 } | 70 } |
| 71 uint64 primary_sequence_number() const { return primary_sequence_number_; } | 71 uint64 primary_sequence_number() const { return primary_sequence_number_; } |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 friend struct DefaultSingletonTraits<SelectionChangeObserver>; | 74 friend struct DefaultSingletonTraits<SelectionChangeObserver>; |
| 75 | 75 |
| 76 SelectionChangeObserver(); | 76 SelectionChangeObserver(); |
| 77 virtual ~SelectionChangeObserver(); | 77 virtual ~SelectionChangeObserver(); |
| 78 | 78 |
| 79 // ui::PlatformEventObserver: | 79 // ui::PlatformEventObserver: |
| 80 virtual void WillProcessEvent(const ui::PlatformEvent& event) OVERRIDE; | 80 virtual void WillProcessEvent(const ui::PlatformEvent& event) override; |
| 81 virtual void DidProcessEvent(const ui::PlatformEvent& event) OVERRIDE {} | 81 virtual void DidProcessEvent(const ui::PlatformEvent& event) override {} |
| 82 | 82 |
| 83 int event_base_; | 83 int event_base_; |
| 84 Atom clipboard_atom_; | 84 Atom clipboard_atom_; |
| 85 uint64 clipboard_sequence_number_; | 85 uint64 clipboard_sequence_number_; |
| 86 uint64 primary_sequence_number_; | 86 uint64 primary_sequence_number_; |
| 87 | 87 |
| 88 DISALLOW_COPY_AND_ASSIGN(SelectionChangeObserver); | 88 DISALLOW_COPY_AND_ASSIGN(SelectionChangeObserver); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 SelectionChangeObserver::SelectionChangeObserver() | 91 SelectionChangeObserver::SelectionChangeObserver() |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 | 283 |
| 284 // Clears a certain clipboard type, whether we own it or not. | 284 // Clears a certain clipboard type, whether we own it or not. |
| 285 void Clear(ClipboardType type); | 285 void Clear(ClipboardType type); |
| 286 | 286 |
| 287 // If we own the CLIPBOARD selection, requests the clipboard manager to take | 287 // If we own the CLIPBOARD selection, requests the clipboard manager to take |
| 288 // ownership of it. | 288 // ownership of it. |
| 289 void StoreCopyPasteDataAndWait(); | 289 void StoreCopyPasteDataAndWait(); |
| 290 | 290 |
| 291 private: | 291 private: |
| 292 // PlatformEventDispatcher: | 292 // PlatformEventDispatcher: |
| 293 virtual bool CanDispatchEvent(const PlatformEvent& event) OVERRIDE; | 293 virtual bool CanDispatchEvent(const PlatformEvent& event) override; |
| 294 virtual uint32_t DispatchEvent(const PlatformEvent& event) OVERRIDE; | 294 virtual uint32_t DispatchEvent(const PlatformEvent& event) override; |
| 295 | 295 |
| 296 // Our X11 state. | 296 // Our X11 state. |
| 297 Display* x_display_; | 297 Display* x_display_; |
| 298 ::Window x_root_window_; | 298 ::Window x_root_window_; |
| 299 | 299 |
| 300 // Input-only window used as a selection owner. | 300 // Input-only window used as a selection owner. |
| 301 ::Window x_window_; | 301 ::Window x_window_; |
| 302 | 302 |
| 303 X11AtomCache atom_cache_; | 303 X11AtomCache atom_cache_; |
| 304 | 304 |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 return type; | 911 return type; |
| 912 } | 912 } |
| 913 | 913 |
| 914 // static | 914 // static |
| 915 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() { | 915 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() { |
| 916 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypePepperCustomData)); | 916 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypePepperCustomData)); |
| 917 return type; | 917 return type; |
| 918 } | 918 } |
| 919 | 919 |
| 920 } // namespace ui | 920 } // namespace ui |
| OLD | NEW |