Index: chrome/browser/ui/window_snapshot/window_snapshot.cc |
diff --git a/chrome/browser/ui/window_snapshot/window_snapshot.cc b/chrome/browser/ui/window_snapshot/window_snapshot.cc |
index ed0419745fa222d4aa4190e24faaae10fad1d6e2..7d922b6131f3dcc34ef7186e4177b316d08500ec 100644 |
--- a/chrome/browser/ui/window_snapshot/window_snapshot.cc |
+++ b/chrome/browser/ui/window_snapshot/window_snapshot.cc |
@@ -8,6 +8,12 @@ |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/common/pref_names.h" |
+#if defined(USE_AURA) |
+#include "chrome/browser/ui/window_snapshot/window_snapshot_aura.h" |
+#else |
+#include "ui/base/snapshot/snapshot.h" |
+#endif |
+ |
namespace chrome { |
bool GrabWindowSnapshotForUser( |
@@ -24,4 +30,19 @@ void RegisterScreenshotPrefs(PrefService* service) { |
service->RegisterBooleanPref(prefs::kDisableScreenshots, false); |
} |
-} // namespace browser |
+namespace internal { |
+ |
+bool GrabWindowSnapshot(gfx::NativeWindow window, |
+ std::vector<unsigned char>* png_representation, |
+ const gfx::Rect& snapshot_bounds) { |
+#if defined(USE_AURA) |
+ return chrome::GrabAuraCompositorSnapshot(window, png_representation, |
+ snapshot_bounds); |
+#else |
+ return ui::GrabWindowSnapshot(window, png_representation, |
+ snapshot_bounds); |
+#endif |
+} |
+ |
+} // namespace internal |
+} // namespace chrome |