Cleanup: merge separate implementaions of ScreenshotDelegate for tests.
BUG=None
R=oshima@chromium.org
TEST=ash_unittests
Review URL: https://codereview.chromium.org/24257015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226118 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ash/test/test_screenshot_delegate.cc b/ash/test/test_screenshot_delegate.cc
new file mode 100644
index 0000000..7ade6ba
--- /dev/null
+++ b/ash/test/test_screenshot_delegate.cc
@@ -0,0 +1,34 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/test/test_screenshot_delegate.h"
+
+namespace ash {
+namespace test {
+
+TestScreenshotDelegate::TestScreenshotDelegate()
+ : handle_take_screenshot_count_(0),
+ handle_take_partial_screenshot_count_(0),
+ can_take_screenshot_(true) {
+}
+
+TestScreenshotDelegate::~TestScreenshotDelegate() {
+}
+
+void TestScreenshotDelegate::HandleTakeScreenshotForAllRootWindows() {
+ handle_take_screenshot_count_++;
+}
+
+void TestScreenshotDelegate::HandleTakePartialScreenshot(
+ aura::Window* window, const gfx::Rect& rect) {
+ handle_take_partial_screenshot_count_++;
+ last_rect_ = rect;
+}
+
+bool TestScreenshotDelegate::CanTakeScreenshot() {
+ return can_take_screenshot_;
+}
+
+} // namespace test
+} // namespace ash