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

Side by Side Diff: ui/snapshot/snapshot_android.cc

Issue 119753007: Add GrabWindowSnapshotAsync tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, compiling Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/snapshot/snapshot.h ('k') | ui/snapshot/snapshot_aura.cc » ('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 "ui/snapshot/snapshot.h" 5 #include "ui/snapshot/snapshot.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "ui/base/android/view_android.h" 8 #include "ui/base/android/view_android.h"
9 #include "ui/base/android/window_android.h" 9 #include "ui/base/android/window_android.h"
10 #include "ui/gfx/display.h" 10 #include "ui/gfx/display.h"
(...skipping 15 matching lines...) Expand all
26 gfx::Display display = 26 gfx::Display display =
27 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay(); 27 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay();
28 gfx::Rect scaled_bounds = 28 gfx::Rect scaled_bounds =
29 gfx::ScaleToEnclosingRect(snapshot_bounds, 29 gfx::ScaleToEnclosingRect(snapshot_bounds,
30 display.device_scale_factor()); 30 display.device_scale_factor());
31 return window->GrabSnapshot( 31 return window->GrabSnapshot(
32 scaled_bounds.x(), scaled_bounds.y(), scaled_bounds.width(), 32 scaled_bounds.x(), scaled_bounds.y(), scaled_bounds.width(),
33 scaled_bounds.height(), png_representation); 33 scaled_bounds.height(), png_representation);
34 } 34 }
35 35
36 SNAPSHOT_EXPORT void GrabWindowSnapshotAsync( 36 void GrabWindowSnapshotAndScaleAsync(
37 gfx::NativeWindow window, 37 gfx::NativeWindow window,
38 const gfx::Rect& snapshot_bounds, 38 const gfx::Rect& snapshot_bounds,
39 const gfx::Size& target_size, 39 const gfx::Size& target_size,
40 scoped_refptr<base::TaskRunner> background_task_runner, 40 scoped_refptr<base::TaskRunner> background_task_runner,
41 GrabWindowSnapshotAsyncCallback callback) { 41 GrabWindowSnapshotAsyncCallback callback) {
42 NOTIMPLEMENTED(); 42 NOTIMPLEMENTED();
43 } 43 }
44 44
45 void GrabWindowSnapshotAsync(
46 gfx::NativeWindow window,
47 const gfx::Rect& source_rect,
48 scoped_refptr<base::TaskRunner> background_task_runner,
49 const GrabWindowSnapshotAsyncCallback& callback) {
50 NOTIMPLEMENTED();
51 }
52
45 } // namespace ui 53 } // namespace ui
OLDNEW
« no previous file with comments | « ui/snapshot/snapshot.h ('k') | ui/snapshot/snapshot_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698