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

Unified Diff: ui/snapshot/snapshot_android.cc

Issue 2595263002: Introduce ViewRoot forwarding input/view events to native (Closed)
Patch Set: tests Created 3 years, 12 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
« ui/android/view_root.h ('K') | « ui/android/window_android.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/snapshot/snapshot_android.cc
diff --git a/ui/snapshot/snapshot_android.cc b/ui/snapshot/snapshot_android.cc
index 557a325db03b1682b79613561520a3070ea4bfb0..bf07e43f91e632ffe45ea15031fb3ac032a0ad89 100644
--- a/ui/snapshot/snapshot_android.cc
+++ b/ui/snapshot/snapshot_android.cc
@@ -42,8 +42,11 @@ static void MakeAsyncCopyRequest(
std::unique_ptr<cc::CopyOutputRequest> request =
cc::CopyOutputRequest::CreateBitmapRequest(callback);
+ ViewAndroid view;
+ view.SetWindowAndroid(window);
boliu 2017/01/03 19:16:11 err, this is just wrong.. This code can talk to D
Jinsuk Kim 2017/01/04 10:45:02 I have a problem getting this to build(undefined r
boliu 2017/01/04 18:58:05 Need to add UI_ANDROID_EXPORT to DisplayAndroidMan
Jinsuk Kim 2017/01/05 11:03:12 Ah
+
const display::Display& display =
- display::Screen::GetScreen()->GetDisplayNearestWindow(window);
+ display::Screen::GetScreen()->GetDisplayNearestWindow(&view);
float device_scale_factor = display.device_scale_factor();
gfx::Rect source_rect_in_pixel =
gfx::ScaleToEnclosingRect(source_rect, device_scale_factor);
« ui/android/view_root.h ('K') | « ui/android/window_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698