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

Side by Side Diff: ui/base/clipboard/clipboard_aurax11.cc

Issue 8775025: Add glue for supporting custom MIME types in DataTransfer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years 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 | Annotate | Revision Log
OLDNEW
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 #include "ui/base/clipboard/clipboard.h" 5 #include "ui/base/clipboard/clipboard.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "third_party/skia/include/core/SkBitmap.h" 9 #include "third_party/skia/include/core/SkBitmap.h"
10 #include "ui/gfx/linux_util.h" 10 #include "ui/gfx/linux_util.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 *pixel = (bitmap[byte_counter] << 0) + /* R */ 233 *pixel = (bitmap[byte_counter] << 0) + /* R */
234 (bitmap[byte_counter + 1] << 8) + /* G */ 234 (bitmap[byte_counter + 1] << 8) + /* G */
235 (bitmap[byte_counter + 2] << 16) + /* B */ 235 (bitmap[byte_counter + 2] << 16) + /* B */
236 (bitmap[byte_counter + 3] << 24); /* A */ 236 (bitmap[byte_counter + 3] << 24); /* A */
237 byte_counter += 4; 237 byte_counter += 4;
238 } 238 }
239 } 239 }
240 return image; 240 return image;
241 } 241 }
242 242
243 void Clipboard::ReadCustomData(Buffer buffer,
244 const string16& data,
sky 2011/12/02 16:06:27 nit: data->type
245 string16* result) const {
246 // TODO(dcheng): Implement this.
247 NOTIMPLEMENTED();
248 }
249
243 void Clipboard::ReadBookmark(string16* title, std::string* url) const { 250 void Clipboard::ReadBookmark(string16* title, std::string* url) const {
244 *title = UTF8ToUTF16(GetClipboardData()->bookmark_title()); 251 *title = UTF8ToUTF16(GetClipboardData()->bookmark_title());
245 *url = GetClipboardData()->bookmark_url(); 252 *url = GetClipboardData()->bookmark_url();
246 } 253 }
247 254
248 void Clipboard::ReadFile(FilePath* file) const { 255 void Clipboard::ReadFile(FilePath* file) const {
249 NOTIMPLEMENTED(); 256 NOTIMPLEMENTED();
250 } 257 }
251 258
252 void Clipboard::ReadFiles(std::vector<FilePath>* files) const { 259 void Clipboard::ReadFiles(std::vector<FilePath>* files) const {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 Clipboard::FormatType Clipboard::GetBitmapFormatType() { 325 Clipboard::FormatType Clipboard::GetBitmapFormatType() {
319 return std::string(kMimeTypeBitmap); 326 return std::string(kMimeTypeBitmap);
320 } 327 }
321 328
322 // static 329 // static
323 Clipboard::FormatType Clipboard::GetWebKitSmartPasteFormatType() { 330 Clipboard::FormatType Clipboard::GetWebKitSmartPasteFormatType() {
324 return std::string(kMimeTypeWebkitSmartPaste); 331 return std::string(kMimeTypeWebkitSmartPaste);
325 } 332 }
326 333
327 } // namespace ui 334 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698