Updating XTBs based on .GRDs from branch master
[chromium-blink-merge.git] / ash / test / test_screenshot_delegate.h
blob075b8032284f4126765e317ba94f37139b8f8e13
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/geometry/rect.h"
13 namespace ash {
14 namespace test {
16 class TestScreenshotDelegate : public ScreenshotDelegate {
17 public:
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;
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_