Chromium Code Reviews| Index: remoting/client/plugin/chromoting_instance.cc |
| diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc |
| index 1671d71f7fa0c6bd493aea1d976410f4bb4c35fc..4adf99b6def6984ee539dc393df16ea5d0ec492a 100644 |
| --- a/remoting/client/plugin/chromoting_instance.cc |
| +++ b/remoting/client/plugin/chromoting_instance.cc |
| @@ -102,7 +102,8 @@ static base::LazyInstance<base::Lock>::Leaky |
| // String sent in the "hello" message to the plugin to describe features. |
| const char ChromotingInstance::kApiFeatures[] = |
| - "highQualityScaling injectKeyEvent sendClipboardItem remapKey trapKey"; |
| + "highQualityScaling injectKeyEvent sendClipboardItem remapKey trapKey" |
|
Do not use (sergeyu)
2012/05/01 00:48:39
I think you are missing a space here.
|
| + "notifyClientDimensions"; |
| bool ChromotingInstance::ParseAuthMethods(const std::string& auth_methods_str, |
| ClientConfig* config) { |
| @@ -299,6 +300,15 @@ void ChromotingInstance::HandleMessage(const pp::Var& message) { |
| return; |
| } |
| SendClipboardItem(mime_type, item); |
| + } else if (method == "notifyClientDimensions") { |
| + int width = 0; |
| + int height = 0; |
| + if (!data->GetInteger("width", &width) || |
| + !data->GetInteger("height", &height)) { |
| + LOG(ERROR) << "Invalid notifyClientDimensions."; |
| + return; |
| + } |
| + NotifyClientDimensions(width, height); |
| } |
| } |
| @@ -472,6 +482,16 @@ void ChromotingInstance::SendClipboardItem(const std::string& mime_type, |
| host_connection_->clipboard_stub()->InjectClipboardEvent(event); |
| } |
| +void ChromotingInstance::NotifyClientDimensions(int width, int height) { |
| + if (!host_connection_.get()) { |
| + return; |
| + } |
| + protocol::ClientDimensions client_dimensions; |
| + client_dimensions.set_width(width); |
| + client_dimensions.set_height(height); |
| + host_connection_->host_stub()->NotifyClientDimensions(client_dimensions); |
| +} |
| + |
| ChromotingStats* ChromotingInstance::GetStats() { |
| if (!client_.get()) |
| return NULL; |