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

Unified Diff: ui/snapshot/screenshot_grabber_observer.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: Merge and fix gn Created 6 years 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
« no previous file with comments | « ui/snapshot/screenshot_grabber.cc ('k') | ui/snapshot/snapshot.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/snapshot/screenshot_grabber_observer.h
diff --git a/ui/snapshot/screenshot_grabber_observer.h b/ui/snapshot/screenshot_grabber_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..4d90306bb79deca7d2e29d3f277be9d7437d21bd
--- /dev/null
+++ b/ui/snapshot/screenshot_grabber_observer.h
@@ -0,0 +1,39 @@
+// 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 UI_SNAPSHOT_SCREENSHOT_GRABBER_OBSERVER_H_
+#define UI_SNAPSHOT_SCREENSHOT_GRABBER_OBSERVER_H_
+
+#include "base/files/file_path.h"
+#include "ui/snapshot/snapshot_export.h"
+
+namespace ui {
+
+class SNAPSHOT_EXPORT ScreenshotGrabberObserver {
+ public:
+ enum Result {
+ SCREENSHOT_SUCCESS = 0,
+ SCREENSHOT_GRABWINDOW_PARTIAL_FAILED,
+ SCREENSHOT_GRABWINDOW_FULL_FAILED,
+ SCREENSHOT_CREATE_DIR_FAILED,
+ SCREENSHOT_GET_DIR_FAILED,
+ SCREENSHOT_CHECK_DIR_FAILED,
+ SCREENSHOT_CREATE_FILE_FAILED,
+ SCREENSHOT_WRITE_FILE_FAILED,
+ SCREENSHOTS_DISABLED,
+ SCREENSHOT_RESULT_COUNT
+ };
+
+ // Dispatched after attempting to take a screenshot with the |result| and
+ // |screenshot_path| of the taken screenshot (if successful).
+ virtual void OnScreenshotCompleted(Result screenshot_result,
+ const base::FilePath& screenshot_path) = 0;
+
+ protected:
+ virtual ~ScreenshotGrabberObserver() {}
+};
+
+} // namespace ui
+
+#endif // UI_SNAPSHOT_SCREENSHOT_GRABBER_OBSERVER_H_
« no previous file with comments | « ui/snapshot/screenshot_grabber.cc ('k') | ui/snapshot/snapshot.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698