OLD | NEW |
---|---|
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 <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 #include <X11/extensions/Xfixes.h> | 8 #include <X11/extensions/Xfixes.h> |
9 #include <X11/Xatom.h> | 9 #include <X11/Xatom.h> |
10 #include <map> | 10 #include <map> |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
481 false); | 481 false); |
482 { | 482 { |
483 skia::ScopedPlatformPaint scoped_platform_paint(canvas.sk_canvas()); | 483 skia::ScopedPlatformPaint scoped_platform_paint(canvas.sk_canvas()); |
484 cairo_t* context = scoped_platform_paint.GetPlatformSurface(); | 484 cairo_t* context = scoped_platform_paint.GetPlatformSurface(); |
485 gdk_cairo_set_source_pixbuf(context, pixbuf.get(), 0.0, 0.0); | 485 gdk_cairo_set_source_pixbuf(context, pixbuf.get(), 0.0, 0.0); |
486 cairo_paint(context); | 486 cairo_paint(context); |
487 } | 487 } |
488 return canvas.ExtractBitmap(); | 488 return canvas.ExtractBitmap(); |
489 } | 489 } |
490 | 490 |
491 void Clipboard::ReadCustomData(Buffer buffer, | |
492 const string16& type, | |
493 string16* data) const { | |
494 // TODO(dcheng): Implement this. | |
tony
2011/12/02 00:13:29
Nit: NOTIMPLEMENTED()?
dcheng
2011/12/02 00:29:17
Done.
dcheng
2011/12/02 00:29:17
Done.
| |
495 } | |
496 | |
491 void Clipboard::ReadBookmark(string16* title, std::string* url) const { | 497 void Clipboard::ReadBookmark(string16* title, std::string* url) const { |
492 // TODO(estade): implement this. | 498 // TODO(estade): implement this. |
493 NOTIMPLEMENTED(); | 499 NOTIMPLEMENTED(); |
494 } | 500 } |
495 | 501 |
496 void Clipboard::ReadData(const std::string& format, std::string* result) { | 502 void Clipboard::ReadData(const std::string& format, std::string* result) { |
497 GtkSelectionData* data = | 503 GtkSelectionData* data = |
498 gtk_clipboard_wait_for_contents(clipboard_, StringToGdkAtom(format)); | 504 gtk_clipboard_wait_for_contents(clipboard_, StringToGdkAtom(format)); |
499 if (!data) | 505 if (!data) |
500 return; | 506 return; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
547 return clipboard_; | 553 return clipboard_; |
548 case BUFFER_SELECTION: | 554 case BUFFER_SELECTION: |
549 return primary_selection_; | 555 return primary_selection_; |
550 default: | 556 default: |
551 NOTREACHED(); | 557 NOTREACHED(); |
552 return NULL; | 558 return NULL; |
553 } | 559 } |
554 } | 560 } |
555 | 561 |
556 } // namespace ui | 562 } // namespace ui |
OLD | NEW |