| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/tools/test_shell/mock_webclipboard_impl.h" | 5 #include "webkit/tools/test_shell/mock_webclipboard_impl.h" |
| 6 | 6 |
| 7 #include "app/clipboard/clipboard.h" | 7 #include "app/clipboard/clipboard.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "net/base/escape.h" | 10 #include "net/base/escape.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 default: | 27 default: |
| 28 NOTREACHED(); | 28 NOTREACHED(); |
| 29 return false; | 29 return false; |
| 30 } | 30 } |
| 31 | 31 |
| 32 switch (buffer) { | 32 switch (buffer) { |
| 33 case BufferStandard: | 33 case BufferStandard: |
| 34 break; | 34 break; |
| 35 case BufferSelection: | 35 case BufferSelection: |
| 36 #if defined(OS_LINUX) | 36 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 37 break; | 37 break; |
| 38 #endif | 38 #endif |
| 39 default: | 39 default: |
| 40 NOTREACHED(); | 40 NOTREACHED(); |
| 41 return false; | 41 return false; |
| 42 } | 42 } |
| 43 | 43 |
| 44 return true; | 44 return true; |
| 45 } | 45 } |
| 46 | 46 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 void MockWebClipboardImpl::writeImage(const WebKit::WebImage& image, | 80 void MockWebClipboardImpl::writeImage(const WebKit::WebImage& image, |
| 81 const WebKit::WebURL& url, const WebKit::WebString& title) { | 81 const WebKit::WebURL& url, const WebKit::WebString& title) { |
| 82 if (!image.isNull()) { | 82 if (!image.isNull()) { |
| 83 m_htmlText = WebString::fromUTF8( | 83 m_htmlText = WebString::fromUTF8( |
| 84 webkit_glue::WebClipboardImpl::URLToImageMarkup(url, title)); | 84 webkit_glue::WebClipboardImpl::URLToImageMarkup(url, title)); |
| 85 m_plainText = m_htmlText; | 85 m_plainText = m_htmlText; |
| 86 m_writeSmartPaste = false; | 86 m_writeSmartPaste = false; |
| 87 } | 87 } |
| 88 } | 88 } |
| OLD | NEW |