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

Side by Side Diff: webkit/tools/test_shell/simple_clipboard_impl.cc

Issue 8491043: Allow linker initialization of lazy instance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: willchan comments + rebase Created 9 years, 1 month 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 "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
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
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
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppapi_interface_factory.cc ('k') | webkit/tools/test_shell/test_shell_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698