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

Side by Side Diff: content/test/mock_webclipboard_impl.cc

Issue 2329683002: Rename blobRegistry() functions and methods to getBlobRegistry(). (Closed)
Patch Set: Created 4 years, 3 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/test/mock_webclipboard_impl.h" 5 #include "content/test/mock_webclipboard_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 blink::WebBlobInfo MockWebClipboardImpl::readImage( 101 blink::WebBlobInfo MockWebClipboardImpl::readImage(
102 blink::WebClipboard::Buffer buffer) { 102 blink::WebClipboard::Buffer buffer) {
103 std::vector<unsigned char> output; 103 std::vector<unsigned char> output;
104 const SkBitmap& bitmap = m_image.getSkBitmap(); 104 const SkBitmap& bitmap = m_image.getSkBitmap();
105 if (!gfx::PNGCodec::FastEncodeBGRASkBitmap( 105 if (!gfx::PNGCodec::FastEncodeBGRASkBitmap(
106 bitmap, false /* discard_transparency */, &output)) { 106 bitmap, false /* discard_transparency */, &output)) {
107 return blink::WebBlobInfo(); 107 return blink::WebBlobInfo();
108 } 108 }
109 const WebString& uuid = base::ASCIIToUTF16(base::GenerateGUID()); 109 const WebString& uuid = base::ASCIIToUTF16(base::GenerateGUID());
110 std::unique_ptr<blink::WebBlobRegistry::Builder> blob_builder( 110 std::unique_ptr<blink::WebBlobRegistry::Builder> blob_builder(
111 blink::Platform::current()->blobRegistry()->createBuilder( 111 blink::Platform::current()->getBlobRegistry()->createBuilder(
112 uuid, blink::WebString())); 112 uuid, blink::WebString()));
113 blob_builder->appendData(blink::WebThreadSafeData( 113 blob_builder->appendData(blink::WebThreadSafeData(
114 reinterpret_cast<char*>(output.data()), output.size())); 114 reinterpret_cast<char*>(output.data()), output.size()));
115 blob_builder->build(); 115 blob_builder->build();
116 return blink::WebBlobInfo( 116 return blink::WebBlobInfo(
117 uuid, base::ASCIIToUTF16(ui::Clipboard::kMimeTypePNG), output.size()); 117 uuid, base::ASCIIToUTF16(ui::Clipboard::kMimeTypePNG), output.size());
118 } 118 }
119 119
120 blink::WebImage MockWebClipboardImpl::readRawImage( 120 blink::WebImage MockWebClipboardImpl::readRawImage(
121 blink::WebClipboard::Buffer buffer) { 121 blink::WebClipboard::Buffer buffer) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 void MockWebClipboardImpl::clear() { 204 void MockWebClipboardImpl::clear() {
205 m_plainText = base::NullableString16(); 205 m_plainText = base::NullableString16();
206 m_htmlText = base::NullableString16(); 206 m_htmlText = base::NullableString16();
207 m_image.reset(); 207 m_image.reset();
208 m_customData.clear(); 208 m_customData.clear();
209 m_writeSmartPaste = false; 209 m_writeSmartPaste = false;
210 } 210 }
211 211
212 } // namespace content 212 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.cc ('k') | content/test/test_blink_web_unit_test_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698