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

Unified Diff: remoting/client/plugin/chromoting_instance.cc

Issue 13932020: Set the initial resolution of an RDP session to the client screen resolution if it is available. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Clang Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/plugin/chromoting_instance.h ('k') | remoting/host/basic_desktop_environment.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/chromoting_instance.cc
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 45671e49573e9853d4657edc79bd68c01f3de1fd..bc204ca8c46091586fffa4bc4c2799fab7610664 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -137,12 +137,15 @@ logging::LogMessageHandlerFunction g_logging_old_handler = NULL;
} // namespace
-// String sent in the "hello" message to the plugin to describe features.
+// String sent in the "hello" message to the webapp to describe features.
const char ChromotingInstance::kApiFeatures[] =
"highQualityScaling injectKeyEvent sendClipboardItem remapKey trapKey "
"notifyClientDimensions notifyClientResolution pauseVideo pauseAudio "
"asyncPin thirdPartyAuth";
+const char ChromotingInstance::kRequestedCapabilities[] = "";
+const char ChromotingInstance::kSupportedCapabilities[] = "";
+
bool ChromotingInstance::ParseAuthMethods(const std::string& auth_methods_str,
ClientConfig* config) {
std::vector<std::string> auth_methods;
@@ -191,6 +194,9 @@ ChromotingInstance::ChromotingInstance(PP_Instance pp_instance)
data->SetInteger("apiVersion", kApiVersion);
data->SetString("apiFeatures", kApiFeatures);
data->SetInteger("apiMinVersion", kApiMinMessagingVersion);
+ data->SetString("requestedCapabilities", kRequestedCapabilities);
+ data->SetString("supportedCapabilities", kSupportedCapabilities);
+
PostChromotingMessage("hello", data.Pass());
}
@@ -297,6 +303,15 @@ void ChromotingInstance::HandleMessage(const pp::Var& message) {
config.fetch_secret_callback =
base::Bind(&ChromotingInstance::FetchSecretFromString, shared_secret);
}
+
+ // Read the list of capabilities, if any.
+ if (data->HasKey("capabilities")) {
+ if (!data->GetString("capabilities", &config.capabilities)) {
+ LOG(ERROR) << "Invalid connect() data.";
+ return;
+ }
+ }
+
Connect(config);
} else if (method == "disconnect") {
Disconnect();
@@ -478,6 +493,12 @@ void ChromotingInstance::OnConnectionReady(bool ready) {
PostChromotingMessage("onConnectionReady", data.Pass());
}
+void ChromotingInstance::SetCapabilities(const std::string& capabilities) {
+ scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue());
+ data->SetString("capabilities", capabilities);
+ PostChromotingMessage("setCapabilities", data.Pass());
+}
+
void ChromotingInstance::FetchSecretFromDialog(
const protocol::SecretFetchedCallback& secret_fetched_callback) {
// Once the Session object calls this function, it won't continue the
« no previous file with comments | « remoting/client/plugin/chromoting_instance.h ('k') | remoting/host/basic_desktop_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698