| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 ASSERT(image); | 83 ASSERT(image); |
| 84 | 84 |
| 85 RefPtr<NativeImageSkia> bitmap = image->nativeImageForCurrentFrame(); | 85 RefPtr<NativeImageSkia> bitmap = image->nativeImageForCurrentFrame(); |
| 86 if (!bitmap) | 86 if (!bitmap) |
| 87 return; | 87 return; |
| 88 | 88 |
| 89 blink::WebImage webImage = bitmap->bitmap(); | 89 blink::WebImage webImage = bitmap->bitmap(); |
| 90 blink::Platform::current()->clipboard()->writeImage(webImage, blink::WebURL(
url), blink::WebString(title)); | 90 blink::Platform::current()->clipboard()->writeImage(webImage, blink::WebURL(
url), blink::WebString(title)); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void Pasteboard::writeDataObject(PassRefPtr<DataObject> dataObject) | 93 void Pasteboard::writeDataObject(PassRefPtrWillBeRawPtr<DataObject> dataObject) |
| 94 { | 94 { |
| 95 blink::Platform::current()->clipboard()->writeDataObject(dataObject); | 95 blink::Platform::current()->clipboard()->writeDataObject(blink::WebDragData(
dataObject)); |
| 96 } | 96 } |
| 97 | 97 |
| 98 bool Pasteboard::canSmartReplace() | 98 bool Pasteboard::canSmartReplace() |
| 99 { | 99 { |
| 100 return blink::Platform::current()->clipboard()->isFormatAvailable(blink::Web
Clipboard::FormatSmartPaste, m_buffer); | 100 return blink::Platform::current()->clipboard()->isFormatAvailable(blink::Web
Clipboard::FormatSmartPaste, m_buffer); |
| 101 } | 101 } |
| 102 | 102 |
| 103 bool Pasteboard::isHTMLAvailable() | 103 bool Pasteboard::isHTMLAvailable() |
| 104 { | 104 { |
| 105 return blink::Platform::current()->clipboard()->isFormatAvailable(blink::Web
Clipboard::FormatHTML, m_buffer); | 105 return blink::Platform::current()->clipboard()->isFormatAvailable(blink::Web
Clipboard::FormatHTML, m_buffer); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 130 String text = plainText; | 130 String text = plainText; |
| 131 #if OS(WIN) | 131 #if OS(WIN) |
| 132 replaceNewlinesWithWindowsStyleNewlines(text); | 132 replaceNewlinesWithWindowsStyleNewlines(text); |
| 133 #endif | 133 #endif |
| 134 replaceNBSPWithSpace(text); | 134 replaceNBSPWithSpace(text); |
| 135 | 135 |
| 136 blink::Platform::current()->clipboard()->writeHTML(markup, documentURL, text
, canSmartCopyOrDelete); | 136 blink::Platform::current()->clipboard()->writeHTML(markup, documentURL, text
, canSmartCopyOrDelete); |
| 137 } | 137 } |
| 138 | 138 |
| 139 } // namespace WebCore | 139 } // namespace WebCore |
| OLD | NEW |