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/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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 if (clipboard_owner_.CanDispatchPropertyEvent(*xev)) | 564 if (clipboard_owner_.CanDispatchPropertyEvent(*xev)) |
565 clipboard_owner_.OnPropertyEvent(*xev); | 565 clipboard_owner_.OnPropertyEvent(*xev); |
566 if (selection_requestor_.CanDispatchPropertyEvent(*xev)) | 566 if (selection_requestor_.CanDispatchPropertyEvent(*xev)) |
567 selection_requestor_.OnPropertyEvent(*xev); | 567 selection_requestor_.OnPropertyEvent(*xev); |
568 break; | 568 break; |
569 } | 569 } |
570 default: | 570 default: |
571 break; | 571 break; |
572 } | 572 } |
573 | 573 |
574 return POST_DISPATCH_NONE; | 574 return kPostDispatchNone; |
575 } | 575 } |
576 | 576 |
577 /////////////////////////////////////////////////////////////////////////////// | 577 /////////////////////////////////////////////////////////////////////////////// |
578 // Various predefined FormatTypes. | 578 // Various predefined FormatTypes. |
579 // static | 579 // static |
580 Clipboard::FormatType Clipboard::GetFormatType( | 580 Clipboard::FormatType Clipboard::GetFormatType( |
581 const std::string& format_string) { | 581 const std::string& format_string) { |
582 return FormatType::Deserialize(format_string); | 582 return FormatType::Deserialize(format_string); |
583 } | 583 } |
584 | 584 |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 if (format.Equals(GetBitmapFormatType())) | 929 if (format.Equals(GetBitmapFormatType())) |
930 return; | 930 return; |
931 | 931 |
932 std::vector<unsigned char> bytes(data_data, data_data + data_len); | 932 std::vector<unsigned char> bytes(data_data, data_data + data_len); |
933 scoped_refptr<base::RefCountedMemory> mem( | 933 scoped_refptr<base::RefCountedMemory> mem( |
934 base::RefCountedBytes::TakeVector(&bytes)); | 934 base::RefCountedBytes::TakeVector(&bytes)); |
935 aurax11_details_->InsertMapping(format.ToString(), mem); | 935 aurax11_details_->InsertMapping(format.ToString(), mem); |
936 } | 936 } |
937 | 937 |
938 } // namespace ui | 938 } // namespace ui |
OLD | NEW |