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

Side by Side Diff: chrome/browser/ui/ash/screenshot_taker.h

Issue 13105002: Screenshot effect non-obvious (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: unittest Created 7 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_ASH_SCREENSHOT_TAKER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_SCREENSHOT_TAKER_H_
6 #define CHROME_BROWSER_UI_ASH_SCREENSHOT_TAKER_H_ 6 #define CHROME_BROWSER_UI_ASH_SCREENSHOT_TAKER_H_
7 7
8 #include "ash/screenshot_delegate.h" 8 #include "ash/screenshot_delegate.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/time.h" 11 #include "base/time.h"
12 #include "ui/compositor/layer.h"
13 12
14 namespace aura { 13 namespace aura {
15 class Window; 14 class Window;
16 } // namespace aura 15 } // namespace aura
17 16
18 class ScreenshotTaker : public ash::ScreenshotDelegate { 17 class ScreenshotTaker : public ash::ScreenshotDelegate {
19 public: 18 public:
20 ScreenshotTaker(); 19 ScreenshotTaker();
21 virtual ~ScreenshotTaker(); 20 virtual ~ScreenshotTaker();
22 21
23 // Overridden from ash::ScreenshotDelegate: 22 // Overridden from ash::ScreenshotDelegate:
24 virtual void HandleTakeScreenshotForAllRootWindows() OVERRIDE; 23 virtual void HandleTakeScreenshotForAllRootWindows() OVERRIDE;
25 virtual void HandleTakePartialScreenshot(aura::Window* window, 24 virtual void HandleTakePartialScreenshot(aura::Window* window,
26 const gfx::Rect& rect) OVERRIDE; 25 const gfx::Rect& rect) OVERRIDE;
27 virtual bool CanTakeScreenshot() OVERRIDE; 26 virtual bool CanTakeScreenshot() OVERRIDE;
28 27
29 private: 28 private:
30 // Flashes the screen to provide visual feedback that a screenshot has
31 // been taken.
32 void DisplayVisualFeedback(const gfx::Rect& rect);
33
34 // Closes the visual feedback layer.
35 void CloseVisualFeedbackLayer();
36
37 // The timestamp when the screenshot task was issued last time. 29 // The timestamp when the screenshot task was issued last time.
38 base::Time last_screenshot_timestamp_; 30 base::Time last_screenshot_timestamp_;
39 31
40 // The flashing effect of the screen for the visual feedback when taking a
41 // screenshot.
42 scoped_ptr<ui::Layer> visual_feedback_layer_;
43
44 DISALLOW_COPY_AND_ASSIGN(ScreenshotTaker); 32 DISALLOW_COPY_AND_ASSIGN(ScreenshotTaker);
45 }; 33 };
46 34
47 #endif // CHROME_BROWSER_UI_ASH_SCREENSHOT_TAKER_H_ 35 #endif // CHROME_BROWSER_UI_ASH_SCREENSHOT_TAKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698