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

Side by Side Diff: webkit/glue/simple_clipboard_impl.cc

Issue 100144: Move simple_clipboard_impl.cc to webkit/tools/test_shell where it belongs. (Closed)
Patch Set: vcproj Created 11 years, 7 months 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
« no previous file with comments | « no previous file | webkit/tools/test_shell/simple_clipboard_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/glue/webkit_glue.h"
6
7 #include <string>
8
9 #include "base/clipboard.h"
10 #include "base/lazy_instance.h"
11 #include "base/string16.h"
12 #include "googleurl/src/gurl.h"
13 #include "webkit/glue/scoped_clipboard_writer_glue.h"
14
15 #include "SkBitmap.h"
16
17 // Clipboard glue
18
19 #if defined(OS_WIN)
20 void ScopedClipboardWriterGlue::WriteBitmapFromPixels(
21 const void* pixels, const gfx::Size& size) {
22 ScopedClipboardWriter::WriteBitmapFromPixels(pixels, size);
23 }
24 #endif
25
26 ScopedClipboardWriterGlue::~ScopedClipboardWriterGlue() {
27 }
28
29 namespace webkit_glue {
30
31 base::LazyInstance<Clipboard> clipboard(base::LINKER_INITIALIZED);
32
33 Clipboard* ClipboardGetClipboard() {
34 return clipboard.Pointer();
35 }
36
37 bool ClipboardIsFormatAvailable(const Clipboard::FormatType& format) {
38 return ClipboardGetClipboard()->IsFormatAvailable(format);
39 }
40
41 void ClipboardReadText(string16* result) {
42 ClipboardGetClipboard()->ReadText(result);
43 }
44
45 void ClipboardReadAsciiText(std::string* result) {
46 ClipboardGetClipboard()->ReadAsciiText(result);
47 }
48
49 void ClipboardReadHTML(string16* markup, GURL* url) {
50 std::string url_str;
51 ClipboardGetClipboard()->ReadHTML(markup, url ? &url_str : NULL);
52 if (url)
53 *url = GURL(url_str);
54 }
55
56 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « no previous file | webkit/tools/test_shell/simple_clipboard_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698