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

Unified Diff: media/capture/video/chromeos/display_rotation_observer.h

Issue 2936373002: Revert of media: add video capture device for ARC++ camera HAL v3 (Closed)
Patch Set: Created 3 years, 6 months 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
Index: media/capture/video/chromeos/display_rotation_observer.h
diff --git a/media/capture/video/chromeos/display_rotation_observer.h b/media/capture/video/chromeos/display_rotation_observer.h
deleted file mode 100644
index 4cdb873969d114cd582591ac2f3c5ba5b8da0044..0000000000000000000000000000000000000000
--- a/media/capture/video/chromeos/display_rotation_observer.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2017 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 MEDIA_CAPTURE_VIDEO_CHROMEOS_DISPLAY_ROTATION_OBSERVER_H_
-#define MEDIA_CAPTURE_VIDEO_CHROMEOS_DISPLAY_ROTATION_OBSERVER_H_
-
-#include "base/memory/ref_counted.h"
-#include "base/single_thread_task_runner.h"
-#include "ui/display/display.h"
-#include "ui/display/display_observer.h"
-#include "ui/display/screen.h"
-
-namespace media {
-
-class DisplayRotationObserver {
- public:
- virtual void SetDisplayRotation(const display::Display& display) = 0;
-};
-
-// Registers itself as an observer at |display::Screen::GetScreen()| and
-// forwards rotation change events to the given DisplayRotationObserver on the
-// thread where ScreenObserverDelegate was created.
-class ScreenObserverDelegate
- : public display::DisplayObserver,
- public base::RefCountedThreadSafe<ScreenObserverDelegate> {
- public:
- ScreenObserverDelegate(
- DisplayRotationObserver* observer,
- scoped_refptr<base::SingleThreadTaskRunner> display_task_runner);
-
- // The user must call RemoveObserver() to drop the reference to |observer_| in
- // ScreenObserverDelegate before deleting |observer_|.
- void RemoveObserver();
-
- private:
- friend class base::RefCountedThreadSafe<ScreenObserverDelegate>;
-
- ~ScreenObserverDelegate() override;
-
- // DisplayObserver implementations.
- void OnDisplayAdded(const display::Display& /*new_display*/) override;
- void OnDisplayRemoved(const display::Display& /*old_display*/) override;
- void OnDisplayMetricsChanged(const display::Display& display,
- uint32_t metrics) override;
-
- void AddObserverOnDisplayThread();
- void RemoveObserverOnDisplayThread();
-
- // Post the screen rotation change from the display thread to capture thread
- void SendDisplayRotation(const display::Display& display);
- void SendDisplayRotationOnCaptureThread(const display::Display& display);
-
- DisplayRotationObserver* observer_;
- // The task runner where the calls to display::Display must be serialized on.
- const scoped_refptr<base::SingleThreadTaskRunner> display_task_runner_;
- // The task runner on which the ScreenObserverDelegate is created.
- const scoped_refptr<base::SingleThreadTaskRunner> delegate_task_runner_;
- DISALLOW_IMPLICIT_CONSTRUCTORS(ScreenObserverDelegate);
-};
-
-} // namespace media
-
-#endif // MEDIA_CAPTURE_VIDEO_CHROMEOS_DISPLAY_ROTATION_OBSERVER_H_
« no previous file with comments | « media/capture/video/chromeos/camera_metadata_utils.cc ('k') | media/capture/video/chromeos/display_rotation_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698