Index: chrome/browser/ui/views/ash/screenshot_taker.cc |
diff --git a/chrome/browser/ui/views/ash/screenshot_taker.cc b/chrome/browser/ui/views/ash/screenshot_taker.cc |
index 9549e2c964b6939ee9d18296c559c61aa3bc6e39..03d4f461c223fb8e4fcfce539427a2b1201517b0 100644 |
--- a/chrome/browser/ui/views/ash/screenshot_taker.cc |
+++ b/chrome/browser/ui/views/ash/screenshot_taker.cc |
@@ -18,6 +18,7 @@ |
#include "base/memory/ref_counted_memory.h" |
#include "base/stringprintf.h" |
#include "base/time.h" |
+#include "chrome/browser/browser_process.h" |
#include "chrome/browser/download/download_prefs.h" |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/profiles/profile.h" |
@@ -113,6 +114,12 @@ bool GrabWindowSnapshot(aura::Window* window, |
const gfx::Rect& snapshot_bounds, |
std::vector<unsigned char>* png_data) { |
#if defined(OS_LINUX) |
+ // browser::GrabWindowSnapshot checks this too, but RootWindow::GrabSnapshot |
+ // does not. The statement below is only to support linux-specific XGetImage |
+ // optimization. |
+ if (g_browser_process->local_state()->GetBoolean(prefs::kDisableScreenshots)) |
+ return false; |
sky
2012/07/17 22:05:57
This is going to result in a LOG(ERROR) on line 18
qfel
2012/07/18 09:24:27
In any case, I think we should leave GrabWindowSna
|
+ |
// We use XGetImage() for Linux/ChromeOS for performance reasons. |
// See crbug.com/119492 |
// TODO(mukai): remove this when the performance issue has been fixed. |