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

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

Issue 100833002: Add AshDesktopMediaList and enable Desktop Capture API on Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
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 "ui/base/android/view_android.h" 7 #include "ui/base/android/view_android.h"
8 #include "ui/base/android/window_android.h" 8 #include "ui/base/android/window_android.h"
9 #include "ui/gfx/display.h" 9 #include "ui/gfx/display.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 14 matching lines...) Expand all
25 gfx::Display display = 25 gfx::Display display =
26 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay(); 26 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay();
27 gfx::Rect scaled_bounds = 27 gfx::Rect scaled_bounds =
28 gfx::ScaleToEnclosingRect(snapshot_bounds, 28 gfx::ScaleToEnclosingRect(snapshot_bounds,
29 display.device_scale_factor()); 29 display.device_scale_factor());
30 return window->GrabSnapshot( 30 return window->GrabSnapshot(
31 scaled_bounds.x(), scaled_bounds.y(), scaled_bounds.width(), 31 scaled_bounds.x(), scaled_bounds.y(), scaled_bounds.width(),
32 scaled_bounds.height(), png_representation); 32 scaled_bounds.height(), png_representation);
33 } 33 }
34 34
35 SNAPSHOT_EXPORT void GrapWindowSnapshotAsync(
36 gfx::NativeWindow window,
37 const gfx::Rect& snapshot_bounds,
38 const gfx::Size& target_size,
39 scoped_refptr<base::TaskRunner> background_task_runner,
40 GrapWindowSnapshotAsyncCallback callback) {
41 NOTIMPLEMENTED();
42 }
43
35 } // namespace ui 44 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698