| 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 "webkit/glue/webkit_glue.h" | 5 #include "webkit/glue/webkit_glue.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 void ScopedClipboardWriterGlue::WriteBitmapFromPixels( | 22 void ScopedClipboardWriterGlue::WriteBitmapFromPixels( |
| 23 const void* pixels, const gfx::Size& size) { | 23 const void* pixels, const gfx::Size& size) { |
| 24 ScopedClipboardWriter::WriteBitmapFromPixels(pixels, size); | 24 ScopedClipboardWriter::WriteBitmapFromPixels(pixels, size); |
| 25 } | 25 } |
| 26 | 26 |
| 27 ScopedClipboardWriterGlue::~ScopedClipboardWriterGlue() { | 27 ScopedClipboardWriterGlue::~ScopedClipboardWriterGlue() { |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace webkit_glue { | 30 namespace webkit_glue { |
| 31 | 31 |
| 32 base::LazyInstance<ui::Clipboard> clipboard(base::LINKER_INITIALIZED); | 32 base::LazyInstance<ui::Clipboard> clipboard = LAZY_INSTANCE_INITIALIZER; |
| 33 | 33 |
| 34 ui::Clipboard* ClipboardGetClipboard() { | 34 ui::Clipboard* ClipboardGetClipboard() { |
| 35 return clipboard.Pointer(); | 35 return clipboard.Pointer(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 uint64 ClipboardGetSequenceNumber(ui::Clipboard::Buffer buffer) { | 38 uint64 ClipboardGetSequenceNumber(ui::Clipboard::Buffer buffer) { |
| 39 return ClipboardGetClipboard()->GetSequenceNumber(buffer); | 39 return ClipboardGetClipboard()->GetSequenceNumber(buffer); |
| 40 } | 40 } |
| 41 | 41 |
| 42 bool ClipboardIsFormatAvailable(const ui::Clipboard::FormatType& format, | 42 bool ClipboardIsFormatAvailable(const ui::Clipboard::FormatType& format, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 false, | 84 false, |
| 85 std::vector<gfx::PNGCodec::Comment>(), | 85 std::vector<gfx::PNGCodec::Comment>(), |
| 86 Z_BEST_SPEED, | 86 Z_BEST_SPEED, |
| 87 &png_data)) { | 87 &png_data)) { |
| 88 data->assign(reinterpret_cast<char*>(vector_as_array(&png_data)), | 88 data->assign(reinterpret_cast<char*>(vector_as_array(&png_data)), |
| 89 png_data.size()); | 89 png_data.size()); |
| 90 } | 90 } |
| 91 } | 91 } |
| 92 | 92 |
| 93 } // namespace webkit_glue | 93 } // namespace webkit_glue |
| OLD | NEW |