summaryrefslogtreecommitdiff
path: root/chromium/ui/snapshot/screenshot_grabber_observer.h
blob: 4d90306bb79deca7d2e29d3f277be9d7437d21bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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_