Temporary allocation of 20Mb before and after call to ServiceProcessControl::GetHisto...
[chromium-blink-merge.git] / ash / test / test_screenshot_delegate.h
blob74c57250f1e38ace4f76fdd86e564ce696d6513d
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef ASH_TEST_TEST_SCREENSHOT_DELEGATE_H_
6 #define ASH_TEST_TEST_SCREENSHOT_DELEGATE_H_
8 #include "ash/screenshot_delegate.h"
9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h"
11 #include "ui/gfx/rect.h"
13 namespace ash {
14 namespace test {
16 class TestScreenshotDelegate : public ScreenshotDelegate {
17 public:
18 TestScreenshotDelegate();
19 virtual ~TestScreenshotDelegate();
21 // Overridden from ScreenshotDelegate:
22 virtual void HandleTakeScreenshotForAllRootWindows() OVERRIDE;
23 virtual void HandleTakePartialScreenshot(
24 aura::Window* window, const gfx::Rect& rect) OVERRIDE;
25 virtual bool CanTakeScreenshot() OVERRIDE;
27 int handle_take_screenshot_count() const {
28 return handle_take_screenshot_count_;
31 int handle_take_partial_screenshot_count() const {
32 return handle_take_partial_screenshot_count_;
35 const gfx::Rect& last_rect() const { return last_rect_; }
37 void set_can_take_screenshot(bool can_take_screenshot) {
38 can_take_screenshot_ = can_take_screenshot;
41 private:
42 int handle_take_screenshot_count_;
43 int handle_take_partial_screenshot_count_;
44 gfx::Rect last_rect_;
45 bool can_take_screenshot_;
47 DISALLOW_COPY_AND_ASSIGN(TestScreenshotDelegate);
50 } // namespace test
51 } // namespace ash
53 #endif // ASH_TEST_TEST_SCREENSHOT_DELEGATE_H_