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

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 | « no previous file | chrome/browser/ui/ash/screenshot_taker.cc » ('j') | chrome/browser/ui/ash/screenshot_taker.cc » ('J')
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..b0a40dbde31607b49dade9eb8f8db508eaa6a9e0 100644
--- a/chrome/browser/ui/ash/screenshot_taker.h
+++ b/chrome/browser/ui/ash/screenshot_taker.h
@@ -5,12 +5,16 @@
#ifndef CHROME_BROWSER_UI_ASH_SCREENSHOT_TAKER_H_
#define CHROME_BROWSER_UI_ASH_SCREENSHOT_TAKER_H_
+#include <map>
+
#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 {
+class RootWindow;
class Window;
} // namespace aura
@@ -21,8 +25,8 @@ 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;
private:
// Flashes the screen to provide visual feedback that a screenshot has
@@ -32,6 +36,11 @@ class ScreenshotTaker : public ash::ScreenshotDelegate {
// Closes the visual feedback layer.
void CloseVisualFeedbackLayer();
+ // The timestamp when the last screenshot was taken for the root window.
+ std::map<aura::RootWindow*, base::Time> last_screenshot_timestamps_;
+
+ // 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 | « no previous file | chrome/browser/ui/ash/screenshot_taker.cc » ('j') | chrome/browser/ui/ash/screenshot_taker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698