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

Unified Diff: content/browser/media/capture/desktop_capture_device_aura.cc

Issue 278873002: Adjust cursor position to take multiple screens into consideration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@multi-display-2
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/capture/desktop_capture_device_aura.cc
diff --git a/content/browser/media/capture/desktop_capture_device_aura.cc b/content/browser/media/capture/desktop_capture_device_aura.cc
index 1da46043098b34e8f53a440481a88cc46288b69e..432a1854019aab49d9876a3fe646b0bb31fe9ff5 100644
--- a/content/browser/media/capture/desktop_capture_device_aura.cc
+++ b/content/browser/media/capture/desktop_capture_device_aura.cc
@@ -19,6 +19,7 @@
#include "media/video/capture/video_capture_types.h"
#include "skia/ext/image_operations.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/env.h"
#include "ui/aura/window.h"
#include "ui/aura/window_observer.h"
@@ -458,6 +459,8 @@ gfx::Point DesktopVideoCaptureMachine::UpdateCursorState(
}
gfx::Point cursor_position = aura::Env::GetInstance()->last_mouse_location();
+ aura::client::GetScreenPositionClient(desktop_window_->GetRootWindow())->
+ ConvertPointFromScreen(desktop_window_, &cursor_position);
const gfx::Point hot_point_in_dip = ui::ConvertPointToDIP(
desktop_layer_, cursor_hot_point_);
cursor_position.Offset(-desktop_bounds.x() - hot_point_in_dip.x(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698