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

Unified Diff: chrome/browser/ui/window_snapshot/window_snapshot.cc

Issue 10830135: Revert 149604 - Support calling GrabWindowSnapshot when no BrowserProcess instance is avaliable (eg… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/window_snapshot/window_snapshot.cc
===================================================================
--- chrome/browser/ui/window_snapshot/window_snapshot.cc (revision 149605)
+++ chrome/browser/ui/window_snapshot/window_snapshot.cc (working copy)
@@ -7,17 +7,22 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/pref_names.h"
-#include "ui/window_snapshot/window_snapshot.h"
namespace chrome {
+// Like GrabWindowSnapshot, but does not check if policy settings allow taking
+// screenshots. Implemented in a platform-specific way.
+bool GrabWindowSnapshotImpl(gfx::NativeWindow window,
+ std::vector<unsigned char>* png_representation,
+ const gfx::Rect& snapshot_bounds);
+
bool GrabWindowSnapshot(
gfx::NativeWindow window,
std::vector<unsigned char>* png_representation,
const gfx::Rect& snapshot_bounds) {
if (g_browser_process->local_state()->GetBoolean(prefs::kDisableScreenshots))
return false;
- return ui::GrabWindowSnapshot(window, png_representation, snapshot_bounds);
+ return GrabWindowSnapshotImpl(window, png_representation, snapshot_bounds);
}
void RegisterScreenshotPrefs(PrefService* service) {
« no previous file with comments | « chrome/browser/ui/window_snapshot/window_snapshot.h ('k') | chrome/browser/ui/window_snapshot/window_snapshot_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698