OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "remoting/host/plugin/host_script_object.h" | 5 #include "remoting/host/plugin/host_script_object.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 void HostNPScriptObject::LocalizeStrings(NPObject* localize_func) { | 745 void HostNPScriptObject::LocalizeStrings(NPObject* localize_func) { |
746 DCHECK(plugin_message_loop_proxy_->BelongsToCurrentThread()); | 746 DCHECK(plugin_message_loop_proxy_->BelongsToCurrentThread()); |
747 | 747 |
748 UiStrings ui_strings; | 748 UiStrings ui_strings; |
749 string16 direction; | 749 string16 direction; |
750 LocalizeString(localize_func, "@@bidi_dir", &direction); | 750 LocalizeString(localize_func, "@@bidi_dir", &direction); |
751 ui_strings.direction = UTF16ToUTF8(direction) == "rtl" ? | 751 ui_strings.direction = UTF16ToUTF8(direction) == "rtl" ? |
752 remoting::UiStrings::RTL : remoting::UiStrings::LTR; | 752 remoting::UiStrings::RTL : remoting::UiStrings::LTR; |
753 LocalizeString(localize_func, /*i18n-content*/"PRODUCT_NAME", | 753 LocalizeString(localize_func, /*i18n-content*/"PRODUCT_NAME", |
754 &ui_strings.product_name); | 754 &ui_strings.product_name); |
755 LocalizeString(localize_func, /*i18n-content*/"DISCONNECT_BUTTON", | 755 LocalizeString(localize_func, /*i18n-content*/"DISCONNECT_OTHER_BUTTON", |
756 &ui_strings.disconnect_button_text); | 756 &ui_strings.disconnect_button_text); |
757 LocalizeString(localize_func, | 757 LocalizeString(localize_func, |
758 #if defined(OS_WIN) | 758 #if defined(OS_WIN) |
759 /*i18n-content*/"DISCONNECT_BUTTON_PLUS_SHORTCUT_WINDOWS", | 759 /*i18n-content*/"DISCONNECT_BUTTON_PLUS_SHORTCUT_WINDOWS", |
760 #elif defined(OS_MACOSX) | 760 #elif defined(OS_MACOSX) |
761 /*i18n-content*/"DISCONNECT_BUTTON_PLUS_SHORTCUT_MAC_OS_X", | 761 /*i18n-content*/"DISCONNECT_BUTTON_PLUS_SHORTCUT_MAC_OS_X", |
762 #else | 762 #else |
763 /*i18n-content*/"DISCONNECT_BUTTON_PLUS_SHORTCUT_LINUX", | 763 /*i18n-content*/"DISCONNECT_BUTTON_PLUS_SHORTCUT_LINUX", |
764 #endif | 764 #endif |
765 &ui_strings.disconnect_button_text_plus_shortcut); | 765 &ui_strings.disconnect_button_text_plus_shortcut); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 uint32_t argCount) { | 817 uint32_t argCount) { |
818 NPVariant np_result; | 818 NPVariant np_result; |
819 bool is_good = g_npnetscape_funcs->invokeDefault(plugin_, func, args, | 819 bool is_good = g_npnetscape_funcs->invokeDefault(plugin_, func, args, |
820 argCount, &np_result); | 820 argCount, &np_result); |
821 if (is_good) | 821 if (is_good) |
822 g_npnetscape_funcs->releasevariantvalue(&np_result); | 822 g_npnetscape_funcs->releasevariantvalue(&np_result); |
823 return is_good; | 823 return is_good; |
824 } | 824 } |
825 | 825 |
826 } // namespace remoting | 826 } // namespace remoting |
OLD | NEW |