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

Side by Side Diff: remoting/host/plugin/host_script_object.cc

Issue 10161034: Making sure that UAC promts fired by the Chromoting plugin get focus (instead of being shown in the… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback Created 8 years, 8 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/plugin/host_script_object.h ('k') | no next file » | 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 "remoting/host/plugin/host_script_object.h" 5 #include "remoting/host/plugin/host_script_object.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 return; 949 return;
950 } 950 }
951 951
952 // Always post (even if we're already on the correct thread) so that debug 952 // Always post (even if we're already on the correct thread) so that debug
953 // log messages are shown in the correct order. 953 // log messages are shown in the correct order.
954 plugin_message_loop_proxy_->PostTask( 954 plugin_message_loop_proxy_->PostTask(
955 FROM_HERE, base::Bind(&HostNPScriptObject::LogDebugInfo, 955 FROM_HERE, base::Bind(&HostNPScriptObject::LogDebugInfo,
956 base::Unretained(this), message)); 956 base::Unretained(this), message));
957 } 957 }
958 958
959 void HostNPScriptObject::SetWindow(NPWindow* np_window) {
960 daemon_controller_->SetWindow(np_window->window);
961 }
962
959 void HostNPScriptObject::LocalizeStrings(NPObject* localize_func) { 963 void HostNPScriptObject::LocalizeStrings(NPObject* localize_func) {
960 DCHECK(plugin_message_loop_proxy_->BelongsToCurrentThread()); 964 DCHECK(plugin_message_loop_proxy_->BelongsToCurrentThread());
961 965
962 UiStrings ui_strings; 966 UiStrings ui_strings;
963 string16 direction; 967 string16 direction;
964 LocalizeString(localize_func, "@@bidi_dir", &direction); 968 LocalizeString(localize_func, "@@bidi_dir", &direction);
965 ui_strings.direction = UTF16ToUTF8(direction) == "rtl" ? 969 ui_strings.direction = UTF16ToUTF8(direction) == "rtl" ?
966 remoting::UiStrings::RTL : remoting::UiStrings::LTR; 970 remoting::UiStrings::RTL : remoting::UiStrings::LTR;
967 LocalizeString(localize_func, /*i18n-content*/"PRODUCT_NAME", 971 LocalizeString(localize_func, /*i18n-content*/"PRODUCT_NAME",
968 &ui_strings.product_name); 972 &ui_strings.product_name);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 return is_good; 1123 return is_good;
1120 } 1124 }
1121 1125
1122 void HostNPScriptObject::SetException(const std::string& exception_string) { 1126 void HostNPScriptObject::SetException(const std::string& exception_string) {
1123 DCHECK(plugin_message_loop_proxy_->BelongsToCurrentThread()); 1127 DCHECK(plugin_message_loop_proxy_->BelongsToCurrentThread());
1124 g_npnetscape_funcs->setexception(parent_, exception_string.c_str()); 1128 g_npnetscape_funcs->setexception(parent_, exception_string.c_str());
1125 LOG(INFO) << exception_string; 1129 LOG(INFO) << exception_string;
1126 } 1130 }
1127 1131
1128 } // namespace remoting 1132 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/plugin/host_script_object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698