screen_capture_observer.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2013 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. #ifndef ASH_SYSTEM_SCREEN_SECURITY_SCREEN_CAPTURE_OBSERVER_H_
  5. #define ASH_SYSTEM_SCREEN_SECURITY_SCREEN_CAPTURE_OBSERVER_H_
  6. #include <string>
  7. #include "base/callback.h"
  8. namespace ash {
  9. class ScreenCaptureObserver {
  10. public:
  11. // Called when screen capture is started.
  12. // |stop_callback| is a callback to stop the stream.
  13. // |source_callback| is a callback to change the desktop capture source.
  14. // These must be base::RepeatingCallbacks so that they can be passed to all
  15. // observers.
  16. virtual void OnScreenCaptureStart(
  17. const base::RepeatingClosure& stop_callback,
  18. const base::RepeatingClosure& source_callback,
  19. const std::u16string& screen_capture_status) = 0;
  20. // Called when screen capture is stopped.
  21. virtual void OnScreenCaptureStop() = 0;
  22. protected:
  23. virtual ~ScreenCaptureObserver() {}
  24. };
  25. } // namespace ash
  26. #endif // ASH_SYSTEM_SCREEN_SECURITY_SCREEN_CAPTURE_OBSERVER_H_