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

Unified Diff: chrome/browser/ui/ash/screenshot_taker.h

Issue 10802046: Ignores screenshot taking invocations if it's too close to the previous one. (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
« no previous file with comments | « ash/screenshot_delegate.h ('k') | chrome/browser/ui/ash/screenshot_taker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/screenshot_taker.h
diff --git a/chrome/browser/ui/ash/screenshot_taker.h b/chrome/browser/ui/ash/screenshot_taker.h
index e0540c2607e29c4b976153575e192544433e6dfc..04cda36ab38df215a986ee11ff77e0a3f533090d 100644
--- a/chrome/browser/ui/ash/screenshot_taker.h
+++ b/chrome/browser/ui/ash/screenshot_taker.h
@@ -8,6 +8,7 @@
#include "ash/screenshot_delegate.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/time.h"
#include "ui/compositor/layer.h"
namespace aura {
@@ -21,8 +22,9 @@ class ScreenshotTaker : public ash::ScreenshotDelegate {
// Overridden from ash::ScreenshotDelegate:
virtual void HandleTakeScreenshot(aura::Window* window) OVERRIDE;
- virtual void HandleTakePartialScreenshot(
- aura::Window* window, const gfx::Rect& rect) OVERRIDE;
+ virtual void HandleTakePartialScreenshot(aura::Window* window,
+ const gfx::Rect& rect) OVERRIDE;
+ virtual bool CanTakeScreenshot() OVERRIDE;
private:
// Flashes the screen to provide visual feedback that a screenshot has
@@ -32,6 +34,11 @@ class ScreenshotTaker : public ash::ScreenshotDelegate {
// Closes the visual feedback layer.
void CloseVisualFeedbackLayer();
+ // The timestamp when the screenshot task was issued last time.
+ base::Time last_screenshot_timestamp_;
+
+ // The flashing effect of the screen for the visual feedback when taking a
+ // screenshot.
scoped_ptr<ui::Layer> visual_feedback_layer_;
DISALLOW_COPY_AND_ASSIGN(ScreenshotTaker);
« no previous file with comments | « ash/screenshot_delegate.h ('k') | chrome/browser/ui/ash/screenshot_taker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698