OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Many of these functions are based on those found in | 5 // Many of these functions are based on those found in |
6 // webkit/port/platform/PasteboardWin.cpp | 6 // webkit/port/platform/PasteboardWin.cpp |
7 | 7 |
8 #include "ui/base/clipboard/clipboard.h" | 8 #include "ui/base/clipboard/clipboard.h" |
9 | 9 |
10 #include <shlobj.h> | 10 #include <shlobj.h> |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 bool has_invalid_alpha_channel = bitmap->bmiHeader.biBitCount < 32 || | 537 bool has_invalid_alpha_channel = bitmap->bmiHeader.biBitCount < 32 || |
538 BitmapHasInvalidPremultipliedColors(device_bitmap); | 538 BitmapHasInvalidPremultipliedColors(device_bitmap); |
539 if (has_invalid_alpha_channel) { | 539 if (has_invalid_alpha_channel) { |
540 MakeBitmapOpaque(device_bitmap); | 540 MakeBitmapOpaque(device_bitmap); |
541 } | 541 } |
542 } | 542 } |
543 | 543 |
544 return canvas.ExtractBitmap(); | 544 return canvas.ExtractBitmap(); |
545 } | 545 } |
546 | 546 |
| 547 void Clipboard::ReadCustomData(Buffer buffer, |
| 548 const string16& type, |
| 549 string16* result) const { |
| 550 // TODO(dcheng): Implement this. |
| 551 NOTIMPLEMENTED(); |
| 552 } |
| 553 |
547 void Clipboard::ReadBookmark(string16* title, std::string* url) const { | 554 void Clipboard::ReadBookmark(string16* title, std::string* url) const { |
548 if (title) | 555 if (title) |
549 title->clear(); | 556 title->clear(); |
550 | 557 |
551 if (url) | 558 if (url) |
552 url->clear(); | 559 url->clear(); |
553 | 560 |
554 // Acquire the clipboard. | 561 // Acquire the clipboard. |
555 ScopedClipboard clipboard; | 562 ScopedClipboard clipboard; |
556 if (!clipboard.Acquire(GetClipboardWindow())) | 563 if (!clipboard.Acquire(GetClipboardWindow())) |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 clipboard_owner_ = ::CreateWindow(L"ClipboardOwnerWindowClass", | 744 clipboard_owner_ = ::CreateWindow(L"ClipboardOwnerWindowClass", |
738 L"ClipboardOwnerWindow", | 745 L"ClipboardOwnerWindow", |
739 0, 0, 0, 0, 0, | 746 0, 0, 0, 0, 0, |
740 HWND_MESSAGE, | 747 HWND_MESSAGE, |
741 0, 0, 0); | 748 0, 0, 0); |
742 } | 749 } |
743 return clipboard_owner_; | 750 return clipboard_owner_; |
744 } | 751 } |
745 | 752 |
746 } // namespace ui | 753 } // namespace ui |
OLD | NEW |