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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 ASSERT(image); | 82 ASSERT(image); |
83 | 83 |
84 SkBitmap bitmap; | 84 SkBitmap bitmap; |
85 if (!image->bitmapForCurrentFrame(&bitmap)) | 85 if (!image->bitmapForCurrentFrame(&bitmap)) |
86 return; | 86 return; |
87 | 87 |
88 blink::WebImage webImage = bitmap; | 88 blink::WebImage webImage = bitmap; |
89 blink::Platform::current()->clipboard()->writeImage(webImage, blink::WebURL(
url), blink::WebString(title)); | 89 blink::Platform::current()->clipboard()->writeImage(webImage, blink::WebURL(
url), blink::WebString(title)); |
90 } | 90 } |
91 | 91 |
92 void Pasteboard::writeDataObject(PassRefPtrWillBeRawPtr<DataObject> dataObject) | 92 void Pasteboard::writeDataObject(DataObject* dataObject) |
93 { | 93 { |
94 blink::Platform::current()->clipboard()->writeDataObject(dataObject->toWebDr
agData()); | 94 blink::Platform::current()->clipboard()->writeDataObject(dataObject->toWebDr
agData()); |
95 } | 95 } |
96 | 96 |
97 bool Pasteboard::canSmartReplace() | 97 bool Pasteboard::canSmartReplace() |
98 { | 98 { |
99 return blink::Platform::current()->clipboard()->isFormatAvailable(blink::Web
Clipboard::FormatSmartPaste, m_buffer); | 99 return blink::Platform::current()->clipboard()->isFormatAvailable(blink::Web
Clipboard::FormatSmartPaste, m_buffer); |
100 } | 100 } |
101 | 101 |
102 bool Pasteboard::isHTMLAvailable() | 102 bool Pasteboard::isHTMLAvailable() |
(...skipping 26 matching lines...) Expand all Loading... |
129 String text = plainText; | 129 String text = plainText; |
130 #if OS(WIN) | 130 #if OS(WIN) |
131 replaceNewlinesWithWindowsStyleNewlines(text); | 131 replaceNewlinesWithWindowsStyleNewlines(text); |
132 #endif | 132 #endif |
133 replaceNBSPWithSpace(text); | 133 replaceNBSPWithSpace(text); |
134 | 134 |
135 blink::Platform::current()->clipboard()->writeHTML(markup, documentURL, text
, canSmartCopyOrDelete); | 135 blink::Platform::current()->clipboard()->writeHTML(markup, documentURL, text
, canSmartCopyOrDelete); |
136 } | 136 } |
137 | 137 |
138 } // namespace blink | 138 } // namespace blink |
OLD | NEW |