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

Side by Side Diff: base/scoped_clipboard_writer.h

Issue 10955: Implement the WebSmartPaste pasteboard type on Mac, stub it out on Linux, rem... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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
« no previous file with comments | « base/clipboard_mac.mm ('k') | base/scoped_clipboard_writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 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 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 #ifndef SCOPED_CLIPBOARD_WRITER_H_ 5 #ifndef SCOPED_CLIPBOARD_WRITER_H_
6 #define SCOPED_CLIPBOARD_WRITER_H_ 6 #define SCOPED_CLIPBOARD_WRITER_H_
7 7
8 #include "base/clipboard.h" 8 #include "base/clipboard.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 22 matching lines...) Expand all
33 void WriteBookmark(const std::wstring& title, const std::string& url); 33 void WriteBookmark(const std::wstring& title, const std::string& url);
34 34
35 // Adds both a bookmark and an HTML hyperlink to the clipboard. It is a 35 // Adds both a bookmark and an HTML hyperlink to the clipboard. It is a
36 // convenience wrapper around WriteBookmark and WriteHTML. 36 // convenience wrapper around WriteBookmark and WriteHTML.
37 void WriteHyperlink(const std::wstring& title, const std::string& url); 37 void WriteHyperlink(const std::wstring& title, const std::string& url);
38 38
39 // Adds a file or group of files to the clipboard. 39 // Adds a file or group of files to the clipboard.
40 void WriteFile(const std::wstring& file); 40 void WriteFile(const std::wstring& file);
41 void WriteFiles(const std::vector<std::wstring>& files); 41 void WriteFiles(const std::vector<std::wstring>& files);
42 42
43 #if defined(OS_WIN)
44 // Used by WebKit to determine whether WebKit wrote the clipboard last 43 // Used by WebKit to determine whether WebKit wrote the clipboard last
45 void WriteWebSmartPaste(); 44 void WriteWebSmartPaste();
46 45
46 #if defined(OS_WIN)
47 // Adds a bitmap to the clipboard 47 // Adds a bitmap to the clipboard
48 // This is the slowest way to copy a bitmap to the clipboard as we must first 48 // This is the slowest way to copy a bitmap to the clipboard as we must first
49 // memcpy the pixels into GDI and the blit the bitmap to the clipboard. 49 // memcpy the pixels into GDI and the blit the bitmap to the clipboard.
50 // Pixel format is assumed to be 32-bit BI_RGB. 50 // Pixel format is assumed to be 32-bit BI_RGB.
51 void WriteBitmapFromPixels(const void* pixels, const gfx::Size& size); 51 void WriteBitmapFromPixels(const void* pixels, const gfx::Size& size);
52 #endif 52 #endif
53 53
54 protected: 54 protected:
55 Clipboard::ObjectMap objects_; 55 Clipboard::ObjectMap objects_;
56 Clipboard* clipboard_; 56 Clipboard* clipboard_;
57 57
58 private: 58 private:
59 DISALLOW_COPY_AND_ASSIGN(ScopedClipboardWriter); 59 DISALLOW_COPY_AND_ASSIGN(ScopedClipboardWriter);
60 }; 60 };
61 61
62 #endif // SCOPED_CLIPBOARD_WRITER_H_ 62 #endif // SCOPED_CLIPBOARD_WRITER_H_
OLDNEW
« no previous file with comments | « base/clipboard_mac.mm ('k') | base/scoped_clipboard_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698