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

Side by Side Diff: content/renderer/renderer_clipboard_client.cc

Issue 12210030: Linux/ChromeOS Chromium style checker cleanup, content/ edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_thread_impl_unittest.cc ('k') | content/renderer/web_ui_extension.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This file provides the embedder's side of random webkit glue functions. 5 // This file provides the embedder's side of random webkit glue functions.
6 6
7 #include "content/renderer/renderer_clipboard_client.h" 7 #include "content/renderer/renderer_clipboard_client.h"
8 8
9 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
11 #include "content/common/clipboard_messages.h" 11 #include "content/common/clipboard_messages.h"
12 #include "content/public/renderer/content_renderer_client.h" 12 #include "content/public/renderer/content_renderer_client.h"
13 #include "content/renderer/render_thread_impl.h" 13 #include "content/renderer/render_thread_impl.h"
14 #include "ui/base/clipboard/clipboard.h" 14 #include "ui/base/clipboard/clipboard.h"
15 #include "ui/gfx/size.h" 15 #include "ui/gfx/size.h"
16 #include "webkit/glue/scoped_clipboard_writer_glue.h" 16 #include "webkit/glue/scoped_clipboard_writer_glue.h"
17 17
18 namespace content { 18 namespace content {
19 19
20 namespace { 20 namespace {
21 21
22 class RendererClipboardWriteContext : 22 class RendererClipboardWriteContext :
23 public webkit_glue::ClipboardClient::WriteContext { 23 public webkit_glue::ClipboardClient::WriteContext {
24 public: 24 public:
25 RendererClipboardWriteContext(); 25 RendererClipboardWriteContext();
26 virtual ~RendererClipboardWriteContext(); 26 virtual ~RendererClipboardWriteContext();
27 virtual void WriteBitmapFromPixels(ui::Clipboard::ObjectMap* objects, 27 virtual void WriteBitmapFromPixels(ui::Clipboard::ObjectMap* objects,
28 const void* pixels, 28 const void* pixels,
29 const gfx::Size& size); 29 const gfx::Size& size) OVERRIDE;
30 virtual void Flush(const ui::Clipboard::ObjectMap& objects); 30 virtual void Flush(const ui::Clipboard::ObjectMap& objects) OVERRIDE;
31 31
32 private: 32 private:
33 scoped_ptr<base::SharedMemory> shared_buf_; 33 scoped_ptr<base::SharedMemory> shared_buf_;
34 DISALLOW_COPY_AND_ASSIGN(RendererClipboardWriteContext); 34 DISALLOW_COPY_AND_ASSIGN(RendererClipboardWriteContext);
35 }; 35 };
36 36
37 RendererClipboardWriteContext::RendererClipboardWriteContext() { 37 RendererClipboardWriteContext::RendererClipboardWriteContext() {
38 } 38 }
39 39
40 RendererClipboardWriteContext::~RendererClipboardWriteContext() { 40 RendererClipboardWriteContext::~RendererClipboardWriteContext() {
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 RenderThreadImpl::current()->Send( 183 RenderThreadImpl::current()->Send(
184 new ClipboardHostMsg_ReadData(format, data)); 184 new ClipboardHostMsg_ReadData(format, data));
185 } 185 }
186 186
187 webkit_glue::ClipboardClient::WriteContext* 187 webkit_glue::ClipboardClient::WriteContext*
188 RendererClipboardClient::CreateWriteContext() { 188 RendererClipboardClient::CreateWriteContext() {
189 return new RendererClipboardWriteContext; 189 return new RendererClipboardWriteContext;
190 } 190 }
191 191
192 } // namespace content 192 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl_unittest.cc ('k') | content/renderer/web_ui_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698