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"
16 class TestScreenshotDelegate
: public ScreenshotDelegate
{
18 TestScreenshotDelegate();
19 ~TestScreenshotDelegate() override
;
21 // Overridden from ScreenshotDelegate:
22 void HandleTakeScreenshotForAllRootWindows() override
;
23 void HandleTakePartialScreenshot(aura::Window
* window
,
24 const gfx::Rect
& rect
) override
;
25 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
;
42 int handle_take_screenshot_count_
;
43 int handle_take_partial_screenshot_count_
;
45 bool can_take_screenshot_
;
47 DISALLOW_COPY_AND_ASSIGN(TestScreenshotDelegate
);
53 #endif // ASH_TEST_TEST_SCREENSHOT_DELEGATE_H_