| OLD | NEW | 
|---|
| 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_REQUESTOR_H_ | 5 #ifndef UI_BASE_X_SELECTION_REQUESTOR_H_ | 
| 6 #define UI_BASE_X_SELECTION_REQUESTOR_H_ | 6 #define UI_BASE_X_SELECTION_REQUESTOR_H_ | 
| 7 | 7 | 
| 8 #include <stddef.h> | 8 #include <stddef.h> | 
| 9 | 9 | 
| 10 #include <vector> | 10 #include <vector> | 
| 11 | 11 | 
| 12 #include "base/callback.h" | 12 #include "base/callback.h" | 
| 13 #include "base/event_types.h" | 13 #include "base/event_types.h" | 
| 14 #include "base/macros.h" | 14 #include "base/macros.h" | 
| 15 #include "base/memory/ref_counted_memory.h" | 15 #include "base/memory/ref_counted_memory.h" | 
| 16 #include "base/time/time.h" | 16 #include "base/time/time.h" | 
| 17 #include "base/timer/timer.h" | 17 #include "base/timer/timer.h" | 
| 18 #include "ui/base/ui_base_export.h" | 18 #include "ui/base/ui_base_export.h" | 
| 19 #include "ui/gfx/x/x11_atom_cache.h" |  | 
| 20 #include "ui/gfx/x/x11_types.h" | 19 #include "ui/gfx/x/x11_types.h" | 
| 21 | 20 | 
| 22 namespace ui { | 21 namespace ui { | 
| 23 class PlatformEventDispatcher; | 22 class PlatformEventDispatcher; | 
| 24 class SelectionData; | 23 class SelectionData; | 
| 25 | 24 | 
| 26 // Requests and later receives data from the X11 server through the selection | 25 // Requests and later receives data from the X11 server through the selection | 
| 27 // system. | 26 // system. | 
| 28 // | 27 // | 
| 29 // X11 uses a system called "selections" to implement clipboards and drag and | 28 // X11 uses a system called "selections" to implement clipboards and drag and | 
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 143   std::vector<Request*> requests_; | 142   std::vector<Request*> requests_; | 
| 144 | 143 | 
| 145   // The index of the currently active request in |requests_|. The active | 144   // The index of the currently active request in |requests_|. The active | 
| 146   // request is the request for which XConvertSelection() has been | 145   // request is the request for which XConvertSelection() has been | 
| 147   // called and for which we are waiting for a SelectionNotify response. | 146   // called and for which we are waiting for a SelectionNotify response. | 
| 148   size_t current_request_index_; | 147   size_t current_request_index_; | 
| 149 | 148 | 
| 150   // Used to abort requests if the selection owner takes too long to respond. | 149   // Used to abort requests if the selection owner takes too long to respond. | 
| 151   base::RepeatingTimer abort_timer_; | 150   base::RepeatingTimer abort_timer_; | 
| 152 | 151 | 
| 153   X11AtomCache atom_cache_; |  | 
| 154 |  | 
| 155   DISALLOW_COPY_AND_ASSIGN(SelectionRequestor); | 152   DISALLOW_COPY_AND_ASSIGN(SelectionRequestor); | 
| 156 }; | 153 }; | 
| 157 | 154 | 
| 158 }  // namespace ui | 155 }  // namespace ui | 
| 159 | 156 | 
| 160 #endif  // UI_BASE_X_SELECTION_REQUESTOR_H_ | 157 #endif  // UI_BASE_X_SELECTION_REQUESTOR_H_ | 
| OLD | NEW | 
|---|