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

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: 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
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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 !data.GetString("item", &item)) { 776 !data.GetString("item", &item)) {
777 LOG(ERROR) << "Invalid sendClipboardItem data."; 777 LOG(ERROR) << "Invalid sendClipboardItem data.";
778 return; 778 return;
779 } 779 }
780 if (!IsConnected()) { 780 if (!IsConnected()) {
781 return; 781 return;
782 } 782 }
783 protocol::ClipboardEvent event; 783 protocol::ClipboardEvent event;
784 event.set_mime_type(mime_type); 784 event.set_mime_type(mime_type);
785 event.set_data(item); 785 event.set_data(item);
786 host_connection_->clipboard_stub()->InjectClipboardEvent(event); 786 host_connection_->clipboard_forwarder()->InjectClipboardEvent(event);
787 } 787 }
788 788
789 void ChromotingInstance::HandleNotifyClientResolution( 789 void ChromotingInstance::HandleNotifyClientResolution(
790 const base::DictionaryValue& data) { 790 const base::DictionaryValue& data) {
791 int width = 0; 791 int width = 0;
792 int height = 0; 792 int height = 0;
793 int x_dpi = kDefaultDPI; 793 int x_dpi = kDefaultDPI;
794 int y_dpi = kDefaultDPI; 794 int y_dpi = kDefaultDPI;
795 if (!data.GetInteger("width", &width) || 795 if (!data.GetInteger("width", &width) ||
796 !data.GetInteger("height", &height) || 796 !data.GetInteger("height", &height) ||
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 pp::VarArrayBuffer array_buffer(buffer_size); 1123 pp::VarArrayBuffer array_buffer(buffer_size);
1124 void* data_ptr = array_buffer.Map(); 1124 void* data_ptr = array_buffer.Map();
1125 memcpy(data_ptr, buffer, buffer_size); 1125 memcpy(data_ptr, buffer, buffer_size);
1126 array_buffer.Unmap(); 1126 array_buffer.Unmap();
1127 pp::VarDictionary data_dictionary; 1127 pp::VarDictionary data_dictionary;
1128 data_dictionary.Set(pp::Var("buffer"), array_buffer); 1128 data_dictionary.Set(pp::Var("buffer"), array_buffer);
1129 PostChromotingMessage("mediaSourceData", data_dictionary); 1129 PostChromotingMessage("mediaSourceData", data_dictionary);
1130 } 1130 }
1131 1131
1132 } // namespace remoting 1132 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698