OLD | NEW |
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/client/plugin/chromoting_instance.h" | 5 #include "remoting/client/plugin/chromoting_instance.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 !data.GetString("item", &item)) { | 797 !data.GetString("item", &item)) { |
798 LOG(ERROR) << "Invalid sendClipboardItem data."; | 798 LOG(ERROR) << "Invalid sendClipboardItem data."; |
799 return; | 799 return; |
800 } | 800 } |
801 if (!IsConnected()) { | 801 if (!IsConnected()) { |
802 return; | 802 return; |
803 } | 803 } |
804 protocol::ClipboardEvent event; | 804 protocol::ClipboardEvent event; |
805 event.set_mime_type(mime_type); | 805 event.set_mime_type(mime_type); |
806 event.set_data(item); | 806 event.set_data(item); |
807 host_connection_->clipboard_stub()->InjectClipboardEvent(event); | 807 host_connection_->clipboard_forwarder()->InjectClipboardEvent(event); |
808 } | 808 } |
809 | 809 |
810 void ChromotingInstance::HandleNotifyClientResolution( | 810 void ChromotingInstance::HandleNotifyClientResolution( |
811 const base::DictionaryValue& data) { | 811 const base::DictionaryValue& data) { |
812 int width = 0; | 812 int width = 0; |
813 int height = 0; | 813 int height = 0; |
814 int x_dpi = kDefaultDPI; | 814 int x_dpi = kDefaultDPI; |
815 int y_dpi = kDefaultDPI; | 815 int y_dpi = kDefaultDPI; |
816 if (!data.GetInteger("width", &width) || | 816 if (!data.GetInteger("width", &width) || |
817 !data.GetInteger("height", &height) || | 817 !data.GetInteger("height", &height) || |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 pp::VarArrayBuffer array_buffer(buffer_size); | 1144 pp::VarArrayBuffer array_buffer(buffer_size); |
1145 void* data_ptr = array_buffer.Map(); | 1145 void* data_ptr = array_buffer.Map(); |
1146 memcpy(data_ptr, buffer, buffer_size); | 1146 memcpy(data_ptr, buffer, buffer_size); |
1147 array_buffer.Unmap(); | 1147 array_buffer.Unmap(); |
1148 pp::VarDictionary data_dictionary; | 1148 pp::VarDictionary data_dictionary; |
1149 data_dictionary.Set(pp::Var("buffer"), array_buffer); | 1149 data_dictionary.Set(pp::Var("buffer"), array_buffer); |
1150 PostChromotingMessage("mediaSourceData", data_dictionary); | 1150 PostChromotingMessage("mediaSourceData", data_dictionary); |
1151 } | 1151 } |
1152 | 1152 |
1153 } // namespace remoting | 1153 } // namespace remoting |
OLD | NEW |