| 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* result) const { |
| 494 // TODO(dcheng): Implement this. |
| 495 NOTIMPLEMENTED(); |
| 496 } |
| 497 |
| 491 void Clipboard::ReadBookmark(string16* title, std::string* url) const { | 498 void Clipboard::ReadBookmark(string16* title, std::string* url) const { |
| 492 // TODO(estade): implement this. | 499 // TODO(estade): implement this. |
| 493 NOTIMPLEMENTED(); | 500 NOTIMPLEMENTED(); |
| 494 } | 501 } |
| 495 | 502 |
| 496 void Clipboard::ReadData(const std::string& format, std::string* result) { | 503 void Clipboard::ReadData(const std::string& format, std::string* result) { |
| 497 GtkSelectionData* data = | 504 GtkSelectionData* data = |
| 498 gtk_clipboard_wait_for_contents(clipboard_, StringToGdkAtom(format)); | 505 gtk_clipboard_wait_for_contents(clipboard_, StringToGdkAtom(format)); |
| 499 if (!data) | 506 if (!data) |
| 500 return; | 507 return; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 return clipboard_; | 554 return clipboard_; |
| 548 case BUFFER_SELECTION: | 555 case BUFFER_SELECTION: |
| 549 return primary_selection_; | 556 return primary_selection_; |
| 550 default: | 557 default: |
| 551 NOTREACHED(); | 558 NOTREACHED(); |
| 552 return NULL; | 559 return NULL; |
| 553 } | 560 } |
| 554 } | 561 } |
| 555 | 562 |
| 556 } // namespace ui | 563 } // namespace ui |
| OLD | NEW |