| 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 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 void* dst = array_buffer.Map(); | 622 void* dst = array_buffer.Map(); |
| 623 memcpy(dst, cursor_image->data(), buffer_size); | 623 memcpy(dst, cursor_image->data(), buffer_size); |
| 624 array_buffer.Unmap(); | 624 array_buffer.Unmap(); |
| 625 pp::VarDictionary dictionary; | 625 pp::VarDictionary dictionary; |
| 626 dictionary.Set(pp::Var("width"), width); | 626 dictionary.Set(pp::Var("width"), width); |
| 627 dictionary.Set(pp::Var("height"), height); | 627 dictionary.Set(pp::Var("height"), height); |
| 628 dictionary.Set(pp::Var("hotspotX"), cursor_hotspot.x()); | 628 dictionary.Set(pp::Var("hotspotX"), cursor_hotspot.x()); |
| 629 dictionary.Set(pp::Var("hotspotY"), cursor_hotspot.y()); | 629 dictionary.Set(pp::Var("hotspotY"), cursor_hotspot.y()); |
| 630 dictionary.Set(pp::Var("data"), array_buffer); | 630 dictionary.Set(pp::Var("data"), array_buffer); |
| 631 PostChromotingMessage("setCursorShape", dictionary); | 631 PostChromotingMessage("setCursorShape", dictionary); |
| 632 input_handler_.SetMouseCursor(nullptr, cursor_hotspot); | 632 input_handler_.HideMouseCursor(); |
| 633 } else { | 633 } else { |
| 634 if (delegate_large_cursors_) { | 634 if (delegate_large_cursors_) { |
| 635 pp::VarDictionary dictionary; | 635 pp::VarDictionary dictionary; |
| 636 PostChromotingMessage("unsetCursorShape", dictionary); | 636 PostChromotingMessage("unsetCursorShape", dictionary); |
| 637 } | 637 } |
| 638 input_handler_.SetMouseCursor(cursor_image.Pass(), cursor_hotspot); | 638 input_handler_.SetMouseCursor(cursor_image.Pass(), cursor_hotspot); |
| 639 } | 639 } |
| 640 } | 640 } |
| 641 | 641 |
| 642 void ChromotingInstance::OnFirstFrameReceived() { | 642 void ChromotingInstance::OnFirstFrameReceived() { |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1239 void* data_ptr = array_buffer.Map(); | 1239 void* data_ptr = array_buffer.Map(); |
| 1240 memcpy(data_ptr, buffer, buffer_size); | 1240 memcpy(data_ptr, buffer, buffer_size); |
| 1241 array_buffer.Unmap(); | 1241 array_buffer.Unmap(); |
| 1242 pp::VarDictionary data_dictionary; | 1242 pp::VarDictionary data_dictionary; |
| 1243 data_dictionary.Set(pp::Var("buffer"), array_buffer); | 1243 data_dictionary.Set(pp::Var("buffer"), array_buffer); |
| 1244 data_dictionary.Set(pp::Var("keyframe"), keyframe); | 1244 data_dictionary.Set(pp::Var("keyframe"), keyframe); |
| 1245 PostChromotingMessage("mediaSourceData", data_dictionary); | 1245 PostChromotingMessage("mediaSourceData", data_dictionary); |
| 1246 } | 1246 } |
| 1247 | 1247 |
| 1248 } // namespace remoting | 1248 } // namespace remoting |
| OLD | NEW |