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

Side by Side Diff: ui/snapshot/snapshot_gtk.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 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/snapshot/snapshot_aura.cc ('k') | ui/snapshot/snapshot_ios.mm » ('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 <gdk/gdkx.h> 7 #include <gdk/gdkx.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "base/callback.h"
10 #include "base/logging.h" 11 #include "base/logging.h"
11 #include "ui/base/x/x11_util.h" 12 #include "ui/base/x/x11_util.h"
12 #include "ui/gfx/rect.h" 13 #include "ui/gfx/rect.h"
13 14
14 namespace { 15 namespace {
15 16
16 cairo_status_t SnapshotCallback(void* closure, 17 cairo_status_t SnapshotCallback(void* closure,
17 const unsigned char* data, 18 const unsigned char* data,
18 unsigned int length) { 19 unsigned int length) {
19 std::vector<unsigned char>* png_representation = 20 std::vector<unsigned char>* png_representation =
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 return true; 76 return true;
76 } 77 }
77 78
78 bool GrabWindowSnapshot(gfx::NativeWindow window_handle, 79 bool GrabWindowSnapshot(gfx::NativeWindow window_handle,
79 std::vector<unsigned char>* png_representation, 80 std::vector<unsigned char>* png_representation,
80 const gfx::Rect& snapshot_bounds) { 81 const gfx::Rect& snapshot_bounds) {
81 return GrabViewSnapshot(GTK_WIDGET(window_handle), png_representation, 82 return GrabViewSnapshot(GTK_WIDGET(window_handle), png_representation,
82 snapshot_bounds); 83 snapshot_bounds);
83 } 84 }
84 85
86 SNAPSHOT_EXPORT void GrapWindowSnapshotAsync(
87 gfx::NativeWindow window,
88 const gfx::Rect& snapshot_bounds,
89 const gfx::Size& target_size,
90 scoped_refptr<base::TaskRunner> background_task_runner,
91 GrapWindowSnapshotAsyncCallback callback) {
92 NOTIMPLEMENTED();
93 }
94
85 } // namespace ui 95 } // namespace ui
OLDNEW
« no previous file with comments | « ui/snapshot/snapshot_aura.cc ('k') | ui/snapshot/snapshot_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698