Index: chrome/browser/ui/ash/chrome_screenshot_taker.h |
diff --git a/chrome/browser/ui/ash/chrome_screenshot_taker.h b/chrome/browser/ui/ash/chrome_screenshot_taker.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..62c7bbe97a40f49d18b919cdbd5f0cbee11439af |
--- /dev/null |
+++ b/chrome/browser/ui/ash/chrome_screenshot_taker.h |
@@ -0,0 +1,48 @@ |
+// Copyright 2014 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. |
+ |
+#ifndef CHROME_BROWSER_UI_ASH_CHROME_SCREENSHOT_TAKER_H_ |
+#define CHROME_BROWSER_UI_ASH_CHROME_SCREENSHOT_TAKER_H_ |
+ |
+#include "ash/screenshot_delegate.h" |
+#include "chrome/browser/notifications/notification.h" |
+#include "components/screenshot_taker/screenshot_taker.h" |
+ |
+class ChromeScreenshotTaker : public ash::ScreenshotDelegate, |
+ public ScreenshotTakerClient, |
+ public ScreenshotTakerObserver { |
+ public: |
+ ChromeScreenshotTaker(); |
+ ~ChromeScreenshotTaker() override; |
+ |
+ ScreenshotTaker* screenshot_taker() { return screenshot_taker_.get(); } |
+ |
+ // ash::ScreenshotDelegate: |
+ void HandleTakeScreenshotForAllRootWindows() override; |
+ void HandleTakePartialScreenshot(aura::Window* window, |
+ const gfx::Rect& rect) override; |
+ bool CanTakeScreenshot() override; |
+ |
+ // ScreenshotTakerClient: |
+ void PrepareWritableFileAndRunOnBlockingPool( |
+ const base::FilePath& path, |
+ WritableFileCallback callback_on_blocking_pool) override; |
+ |
+ // ScreenshotTakerObserver: |
+ void OnScreenshotCompleted(ScreenshotTakerObserver::Result result, |
+ const base::FilePath& screenshot_path) override; |
+ |
+ private: |
+#if defined(OS_CHROMEOS) |
+ Notification* CreateNotification( |
+ ScreenshotTakerObserver::Result screenshot_result, |
+ const base::FilePath& screenshot_path); |
+#endif |
+ |
+ scoped_ptr<ScreenshotTaker> screenshot_taker_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ChromeScreenshotTaker); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_ASH_CHROME_SCREENSHOT_TAKER_H_ |