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

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

Issue 8802004: Enable custom MIME types in web copy/paste. (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
« no previous file with comments | « ui/base/clipboard/clipboard.h ('k') | ui/base/clipboard/clipboard_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "ui/gfx/size.h" 11 #include "ui/gfx/size.h"
12 12
13 namespace ui { 13 namespace ui {
14 14
15 namespace { 15 namespace {
16 const char kMimeTypeBitmap[] = "image/bmp"; 16 const char kMimeTypeBitmap[] = "image/bmp";
17 const char kMimeTypeWebkitSmartPaste[] = "chromium/x-webkit-paste"; 17 const char kMimeTypeWebkitSmartPaste[] = "chromium/x-webkit-paste";
18 // TODO(dcheng): This name is temporary. See crbug.com/106449
19 const char kMimeTypeWebCustomData[] = "chromium/x-web-custom-data";
18 20
19 // ClipboardData contains data copied to the Clipboard for a variety of formats. 21 // ClipboardData contains data copied to the Clipboard for a variety of formats.
20 // It mostly just provides APIs to cleanly access and manipulate this data. 22 // It mostly just provides APIs to cleanly access and manipulate this data.
21 class ClipboardData { 23 class ClipboardData {
22 public: 24 public:
23 ClipboardData() 25 ClipboardData()
24 : bitmap_data_(), 26 : bitmap_data_(),
25 custom_data_data_(), 27 custom_data_data_(),
26 custom_data_len_(0), 28 custom_data_len_(0),
27 web_smart_paste_(false) {} 29 web_smart_paste_(false) {}
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 // static 326 // static
325 Clipboard::FormatType Clipboard::GetBitmapFormatType() { 327 Clipboard::FormatType Clipboard::GetBitmapFormatType() {
326 return std::string(kMimeTypeBitmap); 328 return std::string(kMimeTypeBitmap);
327 } 329 }
328 330
329 // static 331 // static
330 Clipboard::FormatType Clipboard::GetWebKitSmartPasteFormatType() { 332 Clipboard::FormatType Clipboard::GetWebKitSmartPasteFormatType() {
331 return std::string(kMimeTypeWebkitSmartPaste); 333 return std::string(kMimeTypeWebkitSmartPaste);
332 } 334 }
333 335
336 // static
337 Clipboard::FormatType Clipboard::GetWebCustomDataFormatType() {
338 return std::string(kMimeTypeWebCustomData);
339 }
340
334 } // namespace ui 341 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard.h ('k') | ui/base/clipboard/clipboard_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698