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

Side by Side Diff: app/clipboard/scoped_clipboard_writer.cc

Issue 465065: Use utf_string_conversions header in more places. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: rebased Created 11 years 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 | « no previous file | app/gtk_dnd_util.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) 2009 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 our header. Documentation on the format of the 6 // purpose can be found in our header. Documentation on the format of the
7 // parameters for each clipboard target can be found in clipboard.h. 7 // parameters for each clipboard target can be found in clipboard.h.
8 8
9 #include "app/clipboard/scoped_clipboard_writer.h" 9 #include "app/clipboard/scoped_clipboard_writer.h"
10 10
11 #include "base/gfx/size.h" 11 #include "base/gfx/size.h"
12 #include "base/pickle.h" 12 #include "base/pickle.h"
13 #include "base/string_util.h" 13 #include "base/utf_string_conversions.h"
14 14
15 ScopedClipboardWriter::ScopedClipboardWriter(Clipboard* clipboard) 15 ScopedClipboardWriter::ScopedClipboardWriter(Clipboard* clipboard)
16 : clipboard_(clipboard) { 16 : clipboard_(clipboard) {
17 } 17 }
18 18
19 ScopedClipboardWriter::~ScopedClipboardWriter() { 19 ScopedClipboardWriter::~ScopedClipboardWriter() {
20 if (!objects_.empty() && clipboard_) { 20 if (!objects_.empty() && clipboard_) {
21 clipboard_->WriteObjects(objects_); 21 clipboard_->WriteObjects(objects_);
22 if (url_text_.length()) 22 if (url_text_.length())
23 clipboard_->DidWriteURL(url_text_); 23 clipboard_->DidWriteURL(url_text_);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 utf8_text.end())); 128 utf8_text.end()));
129 objects_[Clipboard::CBF_TEXT] = parameters; 129 objects_[Clipboard::CBF_TEXT] = parameters;
130 130
131 if (is_url) { 131 if (is_url) {
132 url_text_ = utf8_text; 132 url_text_ = utf8_text;
133 } else { 133 } else {
134 url_text_.clear(); 134 url_text_.clear();
135 } 135 }
136 } 136 }
137 137
OLDNEW
« no previous file with comments | « no previous file | app/gtk_dnd_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698