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

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

Issue 693893005: Fix large cursors not to trigger MouseLock (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add an explicit HideMouseCursor() helper. Created 6 years, 1 month 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
« no previous file with comments | « no previous file | remoting/client/plugin/pepper_input_handler.h » ('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 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | remoting/client/plugin/pepper_input_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698