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

Side by Side Diff: content/browser/media/capture/aura_window_capture_machine.h

Issue 2873243002: Move components/display_compositor to components/viz/display_compositor (Closed)
Patch Set: Rebase Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_AURA_WINDOW_CAPTURE_MACHINE_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_AURA_WINDOW_CAPTURE_MACHINE_H_
6 #define CONTENT_BROWSER_MEDIA_CAPTURE_AURA_WINDOW_CAPTURE_MACHINE_H_ 6 #define CONTENT_BROWSER_MEDIA_CAPTURE_AURA_WINDOW_CAPTURE_MACHINE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "content/browser/media/capture/cursor_renderer_aura.h" 12 #include "content/browser/media/capture/cursor_renderer_aura.h"
13 #include "media/capture/content/screen_capture_device_core.h" 13 #include "media/capture/content/screen_capture_device_core.h"
14 #include "ui/aura/window.h" 14 #include "ui/aura/window.h"
15 #include "ui/aura/window_observer.h" 15 #include "ui/aura/window_observer.h"
16 #include "ui/base/cursor/cursors_aura.h" 16 #include "ui/base/cursor/cursors_aura.h"
17 #include "ui/compositor/compositor.h" 17 #include "ui/compositor/compositor.h"
18 #include "ui/compositor/compositor_animation_observer.h" 18 #include "ui/compositor/compositor_animation_observer.h"
19 19
20 namespace cc { 20 namespace cc {
21 class CopyOutputResult; 21 class CopyOutputResult;
22 } // namespace cc 22 } // namespace cc
23 23
24 namespace device { 24 namespace device {
25 class PowerSaveBlocker; 25 class PowerSaveBlocker;
26 } // namespace device 26 } // namespace device
27 27
28 namespace display_compositor { 28 namespace viz {
29 class ReadbackYUVInterface; 29 class ReadbackYUVInterface;
30 } 30 }
31 31
32 namespace content { 32 namespace content {
33 33
34 class AuraWindowCaptureMachine 34 class AuraWindowCaptureMachine
35 : public media::VideoCaptureMachine, 35 : public media::VideoCaptureMachine,
36 public aura::WindowObserver, 36 public aura::WindowObserver,
37 public ui::CompositorAnimationObserver { 37 public ui::CompositorAnimationObserver {
38 public: 38 public:
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // Whether screen capturing or window capture. 113 // Whether screen capturing or window capture.
114 bool screen_capture_; 114 bool screen_capture_;
115 115
116 // Makes all the decisions about which frames to copy, and how. 116 // Makes all the decisions about which frames to copy, and how.
117 scoped_refptr<media::ThreadSafeCaptureOracle> oracle_proxy_; 117 scoped_refptr<media::ThreadSafeCaptureOracle> oracle_proxy_;
118 118
119 // The capture parameters for this capture. 119 // The capture parameters for this capture.
120 media::VideoCaptureParams capture_params_; 120 media::VideoCaptureParams capture_params_;
121 121
122 // YUV readback pipeline. 122 // YUV readback pipeline.
123 std::unique_ptr<display_compositor::ReadbackYUVInterface> 123 std::unique_ptr<viz::ReadbackYUVInterface> yuv_readback_pipeline_;
124 yuv_readback_pipeline_;
125 124
126 // Renders mouse cursor on frame. 125 // Renders mouse cursor on frame.
127 std::unique_ptr<content::CursorRendererAura> cursor_renderer_; 126 std::unique_ptr<content::CursorRendererAura> cursor_renderer_;
128 127
129 // TODO(jiayl): Remove power_save_blocker_ when there is an API to keep the 128 // TODO(jiayl): Remove power_save_blocker_ when there is an API to keep the
130 // screen from sleeping for the drive-by web. 129 // screen from sleeping for the drive-by web.
131 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_; 130 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_;
132 131
133 // False while frame capture has been suspended. All other aspects of the 132 // False while frame capture has been suspended. All other aspects of the
134 // machine are maintained. 133 // machine are maintained.
135 bool frame_capture_active_; 134 bool frame_capture_active_;
136 135
137 // WeakPtrs are used for the asynchronous capture callbacks passed to external 136 // WeakPtrs are used for the asynchronous capture callbacks passed to external
138 // modules. They are only valid on the UI thread and become invalidated 137 // modules. They are only valid on the UI thread and become invalidated
139 // immediately when InternalStop() is called to ensure that no more captured 138 // immediately when InternalStop() is called to ensure that no more captured
140 // frames will be delivered to the client. 139 // frames will be delivered to the client.
141 base::WeakPtrFactory<AuraWindowCaptureMachine> weak_factory_; 140 base::WeakPtrFactory<AuraWindowCaptureMachine> weak_factory_;
142 141
143 DISALLOW_COPY_AND_ASSIGN(AuraWindowCaptureMachine); 142 DISALLOW_COPY_AND_ASSIGN(AuraWindowCaptureMachine);
144 }; 143 };
145 144
146 } // namespace content 145 } // namespace content
147 146
148 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_AURA_WINDOW_CAPTURE_MACHINE_H_ 147 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_AURA_WINDOW_CAPTURE_MACHINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698