Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBCLIPBOARD_IMPL_H_ | 5 #ifndef WEBCLIPBOARD_IMPL_H_ |
| 6 #define WEBCLIPBOARD_IMPL_H_ | 6 #define WEBCLIPBOARD_IMPL_H_ |
| 7 | 7 |
| 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebClipboard.h" | 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebClipboard.h" |
| 9 #include "ui/base/clipboard/clipboard.h" | 9 #include "ui/base/clipboard/clipboard.h" |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 namespace webkit_glue { | 13 namespace webkit_glue { |
| 14 class ClipboardClient; | |
| 14 | 15 |
| 15 class WebClipboardImpl : public WebKit::WebClipboard { | 16 class WebClipboardImpl : public WebKit::WebClipboard { |
| 16 public: | 17 public: |
| 17 static std::string URLToMarkup(const WebKit::WebURL& url, | 18 static std::string URLToMarkup(const WebKit::WebURL& url, |
| 18 const WebKit::WebString& title); | 19 const WebKit::WebString& title); |
| 19 static std::string URLToImageMarkup(const WebKit::WebURL& url, | 20 static std::string URLToImageMarkup(const WebKit::WebURL& url, |
| 20 const WebKit::WebString& title); | 21 const WebKit::WebString& title); |
| 21 | 22 |
| 23 WebClipboardImpl(ClipboardClient* client); | |
|
sky
2011/11/21 15:13:17
explicit
piman
2011/11/21 20:27:14
Done.
| |
| 24 | |
| 22 virtual ~WebClipboardImpl(); | 25 virtual ~WebClipboardImpl(); |
| 23 | 26 |
| 24 // WebClipboard methods: | 27 // WebClipboard methods: |
| 25 virtual uint64 getSequenceNumber(); | 28 virtual uint64 getSequenceNumber(); |
| 26 virtual uint64 sequenceNumber(Buffer buffer); | 29 virtual uint64 sequenceNumber(Buffer buffer); |
| 27 virtual bool isFormatAvailable(Format format, Buffer buffer); | 30 virtual bool isFormatAvailable(Format format, Buffer buffer); |
| 28 virtual WebKit::WebVector<WebKit::WebString> readAvailableTypes( | 31 virtual WebKit::WebVector<WebKit::WebString> readAvailableTypes( |
| 29 Buffer buffer, bool* contains_filenames); | 32 Buffer buffer, bool* contains_filenames); |
| 30 virtual WebKit::WebString readPlainText(Buffer buffer); | 33 virtual WebKit::WebString readPlainText(Buffer buffer); |
| 31 virtual WebKit::WebString readHTML( | 34 virtual WebKit::WebString readHTML( |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 43 virtual void writeURL( | 46 virtual void writeURL( |
| 44 const WebKit::WebURL& url, | 47 const WebKit::WebURL& url, |
| 45 const WebKit::WebString& title); | 48 const WebKit::WebString& title); |
| 46 virtual void writeImage( | 49 virtual void writeImage( |
| 47 const WebKit::WebImage& image, | 50 const WebKit::WebImage& image, |
| 48 const WebKit::WebURL& source_url, | 51 const WebKit::WebURL& source_url, |
| 49 const WebKit::WebString& title); | 52 const WebKit::WebString& title); |
| 50 | 53 |
| 51 private: | 54 private: |
| 52 bool ConvertBufferType(Buffer, ui::Clipboard::Buffer*); | 55 bool ConvertBufferType(Buffer, ui::Clipboard::Buffer*); |
| 56 ClipboardClient* client_; | |
| 53 }; | 57 }; |
| 54 | 58 |
| 55 } // namespace webkit_glue | 59 } // namespace webkit_glue |
| 56 | 60 |
| 57 #endif // WEBCLIPBOARD_IMPL_H_ | 61 #endif // WEBCLIPBOARD_IMPL_H_ |
| OLD | NEW |