| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 ASH_TEST_TEST_SCREENSHOT_DELEGATE_H_ | 5 #ifndef ASH_TEST_TEST_SCREENSHOT_DELEGATE_H_ |
| 6 #define ASH_TEST_TEST_SCREENSHOT_DELEGATE_H_ | 6 #define ASH_TEST_TEST_SCREENSHOT_DELEGATE_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 "ui/gfx/rect.h" | 11 #include "ui/gfx/rect.h" |
| 12 | 12 |
| 13 namespace ash { | 13 namespace ash { |
| 14 namespace test { | 14 namespace test { |
| 15 | 15 |
| 16 class TestScreenshotDelegate : public ScreenshotDelegate { | 16 class TestScreenshotDelegate : public ScreenshotDelegate { |
| 17 public: | 17 public: |
| 18 TestScreenshotDelegate(); | 18 TestScreenshotDelegate(); |
| 19 virtual ~TestScreenshotDelegate(); | 19 virtual ~TestScreenshotDelegate(); |
| 20 | 20 |
| 21 // Overridden from ScreenshotDelegate: | 21 // Overridden from ScreenshotDelegate: |
| 22 virtual void HandleTakeScreenshotForAllRootWindows() OVERRIDE; | 22 virtual void HandleTakeScreenshotForAllRootWindows() override; |
| 23 virtual void HandleTakePartialScreenshot( | 23 virtual void HandleTakePartialScreenshot( |
| 24 aura::Window* window, const gfx::Rect& rect) OVERRIDE; | 24 aura::Window* window, const gfx::Rect& rect) override; |
| 25 virtual bool CanTakeScreenshot() OVERRIDE; | 25 virtual bool CanTakeScreenshot() override; |
| 26 | 26 |
| 27 int handle_take_screenshot_count() const { | 27 int handle_take_screenshot_count() const { |
| 28 return handle_take_screenshot_count_; | 28 return handle_take_screenshot_count_; |
| 29 } | 29 } |
| 30 | 30 |
| 31 int handle_take_partial_screenshot_count() const { | 31 int handle_take_partial_screenshot_count() const { |
| 32 return handle_take_partial_screenshot_count_; | 32 return handle_take_partial_screenshot_count_; |
| 33 } | 33 } |
| 34 | 34 |
| 35 const gfx::Rect& last_rect() const { return last_rect_; } | 35 const gfx::Rect& last_rect() const { return last_rect_; } |
| 36 | 36 |
| 37 void set_can_take_screenshot(bool can_take_screenshot) { | 37 void set_can_take_screenshot(bool can_take_screenshot) { |
| 38 can_take_screenshot_ = can_take_screenshot; | 38 can_take_screenshot_ = can_take_screenshot; |
| 39 } | 39 } |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 int handle_take_screenshot_count_; | 42 int handle_take_screenshot_count_; |
| 43 int handle_take_partial_screenshot_count_; | 43 int handle_take_partial_screenshot_count_; |
| 44 gfx::Rect last_rect_; | 44 gfx::Rect last_rect_; |
| 45 bool can_take_screenshot_; | 45 bool can_take_screenshot_; |
| 46 | 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(TestScreenshotDelegate); | 47 DISALLOW_COPY_AND_ASSIGN(TestScreenshotDelegate); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace test | 50 } // namespace test |
| 51 } // namespace ash | 51 } // namespace ash |
| 52 | 52 |
| 53 #endif // ASH_TEST_TEST_SCREENSHOT_DELEGATE_H_ | 53 #endif // ASH_TEST_TEST_SCREENSHOT_DELEGATE_H_ |
| OLD | NEW |