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

Side by Side Diff: base/clipboard.h

Issue 10895: Add Terminate() to the Process object, have RenderProcessHost use this to avo... (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 | « no previous file | base/clipboard_win.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 BASE_CLIPBOARD_H_ 5 #ifndef BASE_CLIPBOARD_H_
6 #define BASE_CLIPBOARD_H_ 6 #define BASE_CLIPBOARD_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // Write a bunch of objects to the system clipboard. Copies are made of the 83 // Write a bunch of objects to the system clipboard. Copies are made of the
84 // contents of |objects|. On Windows they are copied to the system clipboard. 84 // contents of |objects|. On Windows they are copied to the system clipboard.
85 // On linux they are copied into a structure owned by the Clipboard object and 85 // On linux they are copied into a structure owned by the Clipboard object and
86 // kept until the system clipboard is set again. 86 // kept until the system clipboard is set again.
87 void WriteObjects(const ObjectMap& objects); 87 void WriteObjects(const ObjectMap& objects);
88 88
89 // Behaves as above. If there is some shared memory handle passed as one of 89 // Behaves as above. If there is some shared memory handle passed as one of
90 // the objects, it came from the process designated by |process|. This will 90 // the objects, it came from the process designated by |process|. This will
91 // assist in turning it into a shared memory region that the current process 91 // assist in turning it into a shared memory region that the current process
92 // can use. 92 // can use.
93 void WriteObjects(const ObjectMap& objects, ProcessHandle process); 93 void WriteObjects(const ObjectMap& objects, base::ProcessHandle process);
94 94
95 // Tests whether the clipboard contains a certain format 95 // Tests whether the clipboard contains a certain format
96 bool IsFormatAvailable(FormatType format) const; 96 bool IsFormatAvailable(FormatType format) const;
97 97
98 // Reads UNICODE text from the clipboard, if available. 98 // Reads UNICODE text from the clipboard, if available.
99 void ReadText(std::wstring* result) const; 99 void ReadText(std::wstring* result) const;
100 100
101 // Reads ASCII text from the clipboard, if available. 101 // Reads ASCII text from the clipboard, if available.
102 void ReadAsciiText(std::string* result) const; 102 void ReadAsciiText(std::string* result) const;
103 103
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 void WriteWebSmartPaste(); 153 void WriteWebSmartPaste();
154 154
155 void WriteFiles(const char* file_data, size_t file_len); 155 void WriteFiles(const char* file_data, size_t file_len);
156 156
157 void DispatchObject(ObjectType type, const ObjectMapParams& params); 157 void DispatchObject(ObjectType type, const ObjectMapParams& params);
158 #if defined(OS_WIN) 158 #if defined(OS_WIN)
159 void WriteBitmap(const char* pixel_data, const char* size_data); 159 void WriteBitmap(const char* pixel_data, const char* size_data);
160 160
161 void WriteBitmapFromSharedMemory(const char* bitmap_data, 161 void WriteBitmapFromSharedMemory(const char* bitmap_data,
162 const char* size_data, 162 const char* size_data,
163 ProcessHandle handle); 163 base::ProcessHandle handle);
164 164
165 void WriteBitmapFromHandle(HBITMAP source_hbitmap, 165 void WriteBitmapFromHandle(HBITMAP source_hbitmap,
166 const gfx::Size& size); 166 const gfx::Size& size);
167 167
168 // Safely write to system clipboard. Free |handle| on failure. 168 // Safely write to system clipboard. Free |handle| on failure.
169 void WriteToClipboard(FormatType format, HANDLE handle); 169 void WriteToClipboard(FormatType format, HANDLE handle);
170 170
171 static void MarkupToHTMLClipboardFormat(const std::string& markup, 171 static void MarkupToHTMLClipboardFormat(const std::string& markup,
172 const std::string& src_url, 172 const std::string& src_url,
173 std::string* html_fragment); 173 std::string* html_fragment);
(...skipping 27 matching lines...) Expand all
201 201
202 TargetMap* clipboard_data_; 202 TargetMap* clipboard_data_;
203 GtkClipboard* clipboard_; 203 GtkClipboard* clipboard_;
204 #endif 204 #endif
205 205
206 DISALLOW_EVIL_CONSTRUCTORS(Clipboard); 206 DISALLOW_EVIL_CONSTRUCTORS(Clipboard);
207 }; 207 };
208 208
209 #endif // BASE_CLIPBOARD_H_ 209 #endif // BASE_CLIPBOARD_H_
210 210
OLDNEW
« no previous file with comments | « no previous file | base/clipboard_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698