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

Side by Side Diff: remoting/host/android/jni_host.cc

Issue 2179353004: Update Windows It2Me to allow remote users to interact with elevated windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@it2me_uiaccess
Patch Set: Removing the CHECK assertion and replacing it with LOG(ERROR) instead. Created 4 years, 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/android/jni_host.h" 5 #include "remoting/host/android/jni_host.h"
6 6
7 #include "base/android/jni_string.h" 7 #include "base/android/jni_string.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "jni/Host_jni.h" 10 #include "jni/Host_jni.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 81
82 XmppSignalStrategy::XmppServerConfig xmpp_config = xmpp_server_config_; 82 XmppSignalStrategy::XmppServerConfig xmpp_config = xmpp_server_config_;
83 xmpp_config.username = ConvertJavaStringToUTF8(user_name); 83 xmpp_config.username = ConvertJavaStringToUTF8(user_name);
84 xmpp_config.auth_token = ConvertJavaStringToUTF8(auth_token); 84 xmpp_config.auth_token = ConvertJavaStringToUTF8(auth_token);
85 85
86 std::string directory_bot_jid = 86 std::string directory_bot_jid =
87 ServiceUrls::GetInstance()->directory_bot_jid(); 87 ServiceUrls::GetInstance()->directory_bot_jid();
88 88
89 // Create the It2Me host and start connecting. 89 // Create the It2Me host and start connecting.
90 it2me_host_ = factory_->CreateIt2MeHost(host_context_->Copy(), weak_ptr_, 90 it2me_host_ = factory_->CreateIt2MeHost(host_context_->Copy(),
91 /*policy_service=*/nullptr, weak_ptr_,
91 xmpp_config, directory_bot_jid); 92 xmpp_config, directory_bot_jid);
92 it2me_host_->Connect(); 93 it2me_host_->Connect();
93 } 94 }
94 95
95 void JniHost::Disconnect(JNIEnv* env, 96 void JniHost::Disconnect(JNIEnv* env,
96 const base::android::JavaParamRef<jobject>& caller) { 97 const base::android::JavaParamRef<jobject>& caller) {
97 if (it2me_host_) { 98 if (it2me_host_) {
98 it2me_host_->Disconnect(); 99 it2me_host_->Disconnect();
99 it2me_host_ = nullptr; 100 it2me_host_ = nullptr;
100 } 101 }
(...skipping 24 matching lines...) Expand all
125 JNIEnv* env = base::android::AttachCurrentThread(); 126 JNIEnv* env = base::android::AttachCurrentThread();
126 Java_Host_onStateChanged(env, java_host_, state, 127 Java_Host_onStateChanged(env, java_host_, state,
127 ConvertUTF8ToJavaString(env, error_message)); 128 ConvertUTF8ToJavaString(env, error_message));
128 } 129 }
129 130
130 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& caller) { 131 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& caller) {
131 return reinterpret_cast<intptr_t>(new JniHost(env, caller)); 132 return reinterpret_cast<intptr_t>(new JniHost(env, caller));
132 } 133 }
133 134
134 } // namespace remoting 135 } // namespace remoting
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc ('k') | remoting/host/it2me/it2me_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698