| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 implements the ScopedClipboardWriter class. Documentation on its | 5 // This file implements the ScopedClipboardWriter class. Documentation on its |
| 6 // purpose can be found in base/scoped_clipboard_writer.h. Documentation on the | 6 // purpose can be found in our header. Documentation on the format of the |
| 7 // format of the parameters for each clipboard target can be found in | 7 // parameters for each clipboard target can be found in clipboard.h. |
| 8 // base/clipboard.h. | |
| 9 | 8 |
| 10 #include "base/scoped_clipboard_writer.h" | 9 #include "app/clipboard/scoped_clipboard_writer.h" |
| 11 | 10 |
| 12 #include "base/gfx/size.h" | 11 #include "base/gfx/size.h" |
| 13 #include "base/pickle.h" | 12 #include "base/pickle.h" |
| 14 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 15 | 14 |
| 16 ScopedClipboardWriter::ScopedClipboardWriter(Clipboard* clipboard) | 15 ScopedClipboardWriter::ScopedClipboardWriter(Clipboard* clipboard) |
| 17 : clipboard_(clipboard) { | 16 : clipboard_(clipboard) { |
| 18 } | 17 } |
| 19 | 18 |
| 20 ScopedClipboardWriter::~ScopedClipboardWriter() { | 19 ScopedClipboardWriter::~ScopedClipboardWriter() { |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 utf8_text.end())); | 166 utf8_text.end())); |
| 168 objects_[Clipboard::CBF_TEXT] = parameters; | 167 objects_[Clipboard::CBF_TEXT] = parameters; |
| 169 | 168 |
| 170 if (is_url) { | 169 if (is_url) { |
| 171 url_text_ = utf8_text; | 170 url_text_ = utf8_text; |
| 172 } else { | 171 } else { |
| 173 url_text_.clear(); | 172 url_text_.clear(); |
| 174 } | 173 } |
| 175 } | 174 } |
| 176 | 175 |
| OLD | NEW |