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

Side by Side Diff: remoting/host/disconnect_window_gtk.cc

Issue 121123002: Update uses of UTF conversions in ppapi/, printing/, remoting/, rlz/, sandbox/, skia/, sql/, sync/,… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months 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 | « remoting/host/desktop_session_win.cc ('k') | remoting/host/disconnect_window_mac.mm » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <gtk/gtk.h> 5 #include <gtk/gtk.h>
6 #include <math.h> 6 #include <math.h>
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 PangoAttribute* text_color = pango_attr_foreground_new(0, 0, 0); 154 PangoAttribute* text_color = pango_attr_foreground_new(0, 0, 0);
155 pango_attr_list_insert(attributes, text_color); 155 pango_attr_list_insert(attributes, text_color);
156 gtk_label_set_attributes(GTK_LABEL(message_), attributes); 156 gtk_label_set_attributes(GTK_LABEL(message_), attributes);
157 pango_attr_list_unref(attributes); 157 pango_attr_list_unref(attributes);
158 158
159 gtk_widget_show_all(disconnect_window_); 159 gtk_widget_show_all(disconnect_window_);
160 160
161 // Extract the user name from the JID. 161 // Extract the user name from the JID.
162 std::string client_jid = client_session_control_->client_jid(); 162 std::string client_jid = client_session_control_->client_jid();
163 base::string16 username = 163 base::string16 username =
164 UTF8ToUTF16(client_jid.substr(0, client_jid.find('/'))); 164 base::UTF8ToUTF16(client_jid.substr(0, client_jid.find('/')));
165 gtk_label_set_text( 165 gtk_label_set_text(
166 GTK_LABEL(message_), 166 GTK_LABEL(message_),
167 l10n_util::GetStringFUTF8(IDR_MESSAGE_SHARED, username).c_str()); 167 l10n_util::GetStringFUTF8(IDR_MESSAGE_SHARED, username).c_str());
168 gtk_window_present(window); 168 gtk_window_present(window);
169 } 169 }
170 170
171 void DisconnectWindowGtk::OnClicked(GtkWidget* button) { 171 void DisconnectWindowGtk::OnClicked(GtkWidget* button) {
172 DCHECK(CalledOnValidThread()); 172 DCHECK(CalledOnValidThread());
173 173
174 if (client_session_control_.get()) 174 if (client_session_control_.get())
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 286
287 } // namespace 287 } // namespace
288 288
289 // static 289 // static
290 scoped_ptr<HostWindow> HostWindow::CreateDisconnectWindow() { 290 scoped_ptr<HostWindow> HostWindow::CreateDisconnectWindow() {
291 return scoped_ptr<HostWindow>(new DisconnectWindowGtk()); 291 return scoped_ptr<HostWindow>(new DisconnectWindowGtk());
292 } 292 }
293 293
294 } // namespace remoting 294 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_session_win.cc ('k') | remoting/host/disconnect_window_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698