OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_ASH_CHROME_SCREENSHOT_TAKER_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_CHROME_SCREENSHOT_TAKER_H_ |
| 7 |
| 8 #include "ash/screenshot_delegate.h" |
| 9 #include "chrome/browser/notifications/notification.h" |
| 10 #include "components/screenshot_taker/screenshot_taker.h" |
| 11 |
| 12 class ChromeScreenshotTaker : public ash::ScreenshotDelegate, |
| 13 public ScreenshotTakerClient, |
| 14 public ScreenshotTakerObserver { |
| 15 public: |
| 16 ChromeScreenshotTaker(); |
| 17 ~ChromeScreenshotTaker() override; |
| 18 |
| 19 ScreenshotTaker* screenshot_taker() { return screenshot_taker_.get(); } |
| 20 |
| 21 // ash::ScreenshotDelegate: |
| 22 void HandleTakeScreenshotForAllRootWindows() override; |
| 23 void HandleTakePartialScreenshot(aura::Window* window, |
| 24 const gfx::Rect& rect) override; |
| 25 bool CanTakeScreenshot() override; |
| 26 |
| 27 // ScreenshotTakerClient: |
| 28 void PrepareWritableFileAndRunOnBlockingPool( |
| 29 const base::FilePath& path, |
| 30 WritableFileCallback callback_on_blocking_pool) override; |
| 31 |
| 32 // ScreenshotTakerObserver: |
| 33 void OnScreenshotCompleted(ScreenshotTakerObserver::Result result, |
| 34 const base::FilePath& screenshot_path) override; |
| 35 |
| 36 private: |
| 37 #if defined(OS_CHROMEOS) |
| 38 Notification* CreateNotification( |
| 39 ScreenshotTakerObserver::Result screenshot_result, |
| 40 const base::FilePath& screenshot_path); |
| 41 #endif |
| 42 |
| 43 scoped_ptr<ScreenshotTaker> screenshot_taker_; |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(ChromeScreenshotTaker); |
| 46 }; |
| 47 |
| 48 #endif // CHROME_BROWSER_UI_ASH_CHROME_SCREENSHOT_TAKER_H_ |
OLD | NEW |