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_aurax11.h" | 5 #include "ui/base/clipboard/clipboard_aurax11.h" |
6 | 6 |
| 7 #include <X11/Xatom.h> |
| 8 #include <X11/extensions/Xfixes.h> |
7 #include <stdint.h> | 9 #include <stdint.h> |
8 #include <X11/extensions/Xfixes.h> | |
9 #include <X11/Xatom.h> | |
10 | 10 |
11 #include <limits> | 11 #include <limits> |
12 #include <list> | 12 #include <list> |
| 13 #include <memory> |
13 #include <set> | 14 #include <set> |
14 | 15 |
15 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
16 #include "base/logging.h" | 17 #include "base/logging.h" |
17 #include "base/macros.h" | 18 #include "base/macros.h" |
18 #include "base/memory/ref_counted_memory.h" | 19 #include "base/memory/ref_counted_memory.h" |
19 #include "base/memory/scoped_ptr.h" | |
20 #include "base/memory/singleton.h" | 20 #include "base/memory/singleton.h" |
21 #include "base/metrics/histogram.h" | 21 #include "base/metrics/histogram.h" |
22 #include "base/stl_util.h" | 22 #include "base/stl_util.h" |
23 #include "base/strings/utf_string_conversions.h" | 23 #include "base/strings/utf_string_conversions.h" |
24 #include "third_party/skia/include/core/SkBitmap.h" | 24 #include "third_party/skia/include/core/SkBitmap.h" |
25 #include "ui/base/clipboard/custom_data_helper.h" | 25 #include "ui/base/clipboard/custom_data_helper.h" |
26 #include "ui/base/x/selection_owner.h" | 26 #include "ui/base/x/selection_owner.h" |
27 #include "ui/base/x/selection_requestor.h" | 27 #include "ui/base/x/selection_requestor.h" |
28 #include "ui/base/x/selection_utils.h" | 28 #include "ui/base/x/selection_utils.h" |
29 #include "ui/base/x/x11_util.h" | 29 #include "ui/base/x/x11_util.h" |
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
933 if (format.Equals(GetBitmapFormatType())) | 933 if (format.Equals(GetBitmapFormatType())) |
934 return; | 934 return; |
935 | 935 |
936 std::vector<unsigned char> bytes(data_data, data_data + data_len); | 936 std::vector<unsigned char> bytes(data_data, data_data + data_len); |
937 scoped_refptr<base::RefCountedMemory> mem( | 937 scoped_refptr<base::RefCountedMemory> mem( |
938 base::RefCountedBytes::TakeVector(&bytes)); | 938 base::RefCountedBytes::TakeVector(&bytes)); |
939 aurax11_details_->InsertMapping(format.ToString(), mem); | 939 aurax11_details_->InsertMapping(format.ToString(), mem); |
940 } | 940 } |
941 | 941 |
942 } // namespace ui | 942 } // namespace ui |
OLD | NEW |