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

Unified Diff: remoting/host/continue_window_linux.cc

Issue 7669045: Make ChromotingHost::ui_strings() immutable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/disconnect_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/continue_window_linux.cc
diff --git a/remoting/host/continue_window_linux.cc b/remoting/host/continue_window_linux.cc
index 3933f21ac41c38083f7f410f3c6181aa86503208..431144d4eb74dba7f2ae861f28c2a6404bce3027 100644
--- a/remoting/host/continue_window_linux.cc
+++ b/remoting/host/continue_window_linux.cc
@@ -8,6 +8,7 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
+#include "base/utf_string_conversions.h"
#include "remoting/host/chromoting_host.h"
#include "remoting/host/ui_strings.h"
#include "ui/base/gtk/gtk_signal.h"
@@ -25,7 +26,7 @@ class ContinueWindowLinux : public remoting::ContinueWindow {
private:
CHROMEGTK_CALLBACK_1(ContinueWindowLinux, void, OnResponse, int);
- void CreateWindow(UiStrings* ui_strings);
+ void CreateWindow(const UiStrings& ui_strings);
ChromotingHost* host_;
GtkWidget* continue_window_;
@@ -41,15 +42,17 @@ ContinueWindowLinux::ContinueWindowLinux()
ContinueWindowLinux::~ContinueWindowLinux() {
}
-void ContinueWindowLinux::CreateWindow(UiStrings* ui_strings) {
+void ContinueWindowLinux::CreateWindow(const UiStrings& ui_strings) {
if (continue_window_) return;
continue_window_ = gtk_dialog_new_with_buttons(
- ui_strings->product_name.c_str(),
+ UTF16ToUTF8(ui_strings.product_name).c_str(),
NULL,
static_cast<GtkDialogFlags>(GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR),
- ui_strings->stop_sharing_button_text.c_str(), GTK_RESPONSE_CANCEL,
- ui_strings->continue_button_text.c_str(), GTK_RESPONSE_OK,
+ UTF16ToUTF8(ui_strings.stop_sharing_button_text).c_str(),
+ GTK_RESPONSE_CANCEL,
+ UTF16ToUTF8(ui_strings.continue_button_text).c_str(),
+ GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response(GTK_DIALOG(continue_window_),
@@ -66,7 +69,8 @@ void ContinueWindowLinux::CreateWindow(UiStrings* ui_strings) {
GtkWidget* content_area =
gtk_dialog_get_content_area(GTK_DIALOG(continue_window_));
- GtkWidget* text_label = gtk_label_new(ui_strings->continue_prompt.c_str());
+ GtkWidget* text_label =
+ gtk_label_new(UTF16ToUTF8(ui_strings.continue_prompt).c_str());
gtk_label_set_line_wrap(GTK_LABEL(text_label), TRUE);
// TODO(lambroslambrou): Fix magic numbers, as in disconnect_window_linux.cc.
gtk_misc_set_padding(GTK_MISC(text_label), 12, 12);
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/disconnect_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698