OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 WEBKIT_GLUE_CLIPBOARD_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_CLIPBOARD_CLIENT_H_ |
6 #define WEBKIT_GLUE_CLIPBOARD_CLIENT_H_ | 6 #define CONTENT_RENDERER_CLIPBOARD_CLIENT_H_ |
7 | 7 |
8 #include "ui/base/clipboard/clipboard.h" | 8 #include "ui/base/clipboard/clipboard.h" |
9 | 9 |
10 class GURL; | 10 class GURL; |
11 | 11 |
12 namespace webkit_glue { | 12 namespace content { |
13 | 13 |
14 // Interface for the webkit glue embedder to implement to support clipboard. | 14 // Interface for the content embedder to implement to support clipboard. |
15 class ClipboardClient { | 15 class ClipboardClient { |
16 public: | 16 public: |
17 class WriteContext { | 17 class WriteContext { |
18 public: | 18 public: |
19 virtual ~WriteContext() { } | 19 virtual ~WriteContext() { } |
20 | 20 |
21 // Writes bitmap data into the context, updating the ObjectMap. | 21 // Writes bitmap data into the context, updating the ObjectMap. |
22 virtual void WriteBitmapFromPixels(ui::Clipboard::ObjectMap* objects, | 22 virtual void WriteBitmapFromPixels(ui::Clipboard::ObjectMap* objects, |
23 const void* pixels, | 23 const void* pixels, |
24 const gfx::Size& size) = 0; | 24 const gfx::Size& size) = 0; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 base::string16* data) = 0; | 72 base::string16* data) = 0; |
73 | 73 |
74 // Reads raw data from the clipboard for a given format. | 74 // Reads raw data from the clipboard for a given format. |
75 virtual void ReadData(const ui::Clipboard::FormatType& format, | 75 virtual void ReadData(const ui::Clipboard::FormatType& format, |
76 std::string* data) = 0; | 76 std::string* data) = 0; |
77 | 77 |
78 // Creates a context to write clipboard data. May return NULL. | 78 // Creates a context to write clipboard data. May return NULL. |
79 virtual WriteContext* CreateWriteContext() = 0; | 79 virtual WriteContext* CreateWriteContext() = 0; |
80 }; | 80 }; |
81 | 81 |
82 } // namespace webkit_glue | 82 } // namespace content |
83 | 83 |
84 #endif // WEBKIT_GLUE_CLIPBOARD_CLIENT_H_ | 84 #endif // CONTENT_RENDERER_CLIPBOARD_CLIENT_H_ |
| 85 |
OLD | NEW |