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

Side by Side Diff: remoting/client/plugin/chromoting_instance.cc

Issue 279273002: Move ConnectionToHost parameters out from Connect() call. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 6 years, 7 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/client/chromoting_client.cc ('k') | remoting/host/it2me/it2me_host.cc » ('j') | 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/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
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
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
OLDNEW
« no previous file with comments | « remoting/client/chromoting_client.cc ('k') | remoting/host/it2me/it2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698