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

Unified Diff: ui/snapshot/snapshot_android.cc

Issue 2595263002: Introduce ViewRoot forwarding input/view events to native (Closed)
Patch Set: addressed comments Created 3 years, 11 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.cc ('K') | « ui/snapshot/DEPS ('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..4feb0b13e108a97e845fc929283b55a0872a4f03 100644
--- a/ui/snapshot/snapshot_android.cc
+++ b/ui/snapshot/snapshot_android.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "cc/output/copy_output_request.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/android/display_android_manager.h"
#include "ui/android/view_android.h"
#include "ui/android/window_android.h"
#include "ui/android/window_android_compositor.h"
@@ -42,8 +43,10 @@ static void MakeAsyncCopyRequest(
std::unique_ptr<cc::CopyOutputRequest> request =
cc::CopyOutputRequest::CreateBitmapRequest(callback);
+ DisplayAndroidManager* display_manager =
+ static_cast<DisplayAndroidManager*>(display::Screen::GetScreen());
boliu 2017/01/04 18:58:06 cast should happen in DisplayAndroidManager, maybe
Jinsuk Kim 2017/01/05 11:03:13 Done.
const display::Display& display =
- display::Screen::GetScreen()->GetDisplayNearestWindow(window);
+ display_manager->GetDisplayNearestWindowAndroid(window);
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.cc ('K') | « ui/snapshot/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698