Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: Source/core/clipboard/Pasteboard.cpp

Issue 925913002: Fixed WebDragData's wrong dependency. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(PassRefPtrWillBeRawPtr<DataObject> dataObject) 93 void Pasteboard::writeDataObject(PassRefPtrWillBeRawPtr<DataObject> dataObject)
94 { 94 {
95 blink::Platform::current()->clipboard()->writeDataObject(blink::WebDragData( dataObject)); 95 blink::Platform::current()->clipboard()->writeDataObject(dataObject->toWebDr agData());
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
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 blink 139 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698