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 <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 #include <X11/extensions/Xfixes.h> | 8 #include <X11/extensions/Xfixes.h> |
9 #include <X11/Xatom.h> | 9 #include <X11/Xatom.h> |
10 #include <map> | 10 #include <map> |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 new_pixels[idx + 2] = pixels[idx]; | 197 new_pixels[idx + 2] = pixels[idx]; |
198 new_pixels[idx + 3] = pixels[idx + 3]; | 198 new_pixels[idx + 3] = pixels[idx + 3]; |
199 } | 199 } |
200 } | 200 } |
201 | 201 |
202 return new_pixels; | 202 return new_pixels; |
203 } | 203 } |
204 | 204 |
205 } // namespace | 205 } // namespace |
206 | 206 |
207 Clipboard::FormatType::FormatType() { | 207 Clipboard::FormatType::FormatType() : data_(GDK_NONE) { |
208 } | 208 } |
209 | 209 |
210 Clipboard::FormatType::FormatType(const std::string& format_string) | 210 Clipboard::FormatType::FormatType(const std::string& format_string) |
211 : data_(StringToGdkAtom(format_string)) { | 211 : data_(StringToGdkAtom(format_string)) { |
212 } | 212 } |
213 | 213 |
214 Clipboard::FormatType::FormatType(const GdkAtom& native_format) | 214 Clipboard::FormatType::FormatType(const GdkAtom& native_format) |
215 : data_(native_format) { | 215 : data_(native_format) { |
216 } | 216 } |
217 | 217 |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 return clipboard_; | 690 return clipboard_; |
691 case BUFFER_SELECTION: | 691 case BUFFER_SELECTION: |
692 return primary_selection_; | 692 return primary_selection_; |
693 default: | 693 default: |
694 NOTREACHED(); | 694 NOTREACHED(); |
695 return NULL; | 695 return NULL; |
696 } | 696 } |
697 } | 697 } |
698 | 698 |
699 } // namespace ui | 699 } // namespace ui |
OLD | NEW |