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 UI_SNAPSHOT_SCREENSHOT_GRABBER_OBSERVER_H_ |
| 6 #define UI_SNAPSHOT_SCREENSHOT_GRABBER_OBSERVER_H_ |
| 7 |
| 8 #include "base/files/file_path.h" |
| 9 #include "ui/snapshot/snapshot_export.h" |
| 10 |
| 11 namespace ui { |
| 12 |
| 13 class SNAPSHOT_EXPORT ScreenshotGrabberObserver { |
| 14 public: |
| 15 enum Result { |
| 16 SCREENSHOT_SUCCESS = 0, |
| 17 SCREENSHOT_GRABWINDOW_PARTIAL_FAILED, |
| 18 SCREENSHOT_GRABWINDOW_FULL_FAILED, |
| 19 SCREENSHOT_CREATE_DIR_FAILED, |
| 20 SCREENSHOT_GET_DIR_FAILED, |
| 21 SCREENSHOT_CHECK_DIR_FAILED, |
| 22 SCREENSHOT_CREATE_FILE_FAILED, |
| 23 SCREENSHOT_WRITE_FILE_FAILED, |
| 24 SCREENSHOTS_DISABLED, |
| 25 SCREENSHOT_RESULT_COUNT |
| 26 }; |
| 27 |
| 28 // Dispatched after attempting to take a screenshot with the |result| and |
| 29 // |screenshot_path| of the taken screenshot (if successful). |
| 30 virtual void OnScreenshotCompleted(Result screenshot_result, |
| 31 const base::FilePath& screenshot_path) = 0; |
| 32 |
| 33 protected: |
| 34 virtual ~ScreenshotGrabberObserver() {} |
| 35 }; |
| 36 |
| 37 } // namespace ui |
| 38 |
| 39 #endif // UI_SNAPSHOT_SCREENSHOT_GRABBER_OBSERVER_H_ |
OLD | NEW |