Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4616)

Unified Diff: chrome/browser/ui/ash/chrome_screenshot_taker.h

Issue 706013004: Move non-browser specific ScreenshotTaker code to ui/snapshot. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restrict to use_aura==1 and fix gn build Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698