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

Side by Side Diff: remoting/host/chromeos/aura_desktop_capturer.h

Issue 543243003: Remote Assistance on Chrome OS Part I - Aura Desktop Capturer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
(Empty)
1 // Copyright 2014 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
5 #ifndef REMOTING_HOST_CHROMEOS_AURA_DESKTOP_CAPTURER_H_
6 #define REMOTING_HOST_CHROMEOS_AURA_DESKTOP_CAPTURER_H_
7
8 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h"
9 #include "ui/aura/window.h"
10
11 namespace cc {
12 class CopyOutputResult;
13 } // namespace
14
15 namespace remoting {
16
17 // A webrtc desktop capturer that captures pixels from the root window of the
Sergey Ulanov 2014/09/06 02:03:25 s/webrtc desktop capturer/webrtc::DesktopCapturer/
kelvinp 2014/09/09 21:19:46 Done.
18 // Aura Shell.
19 class AuraDesktopCapturer : public webrtc::DesktopCapturer {
20 public:
21 AuraDesktopCapturer();
22 virtual ~AuraDesktopCapturer();
23
24 // Called at the beginning of a capturing session. |callback| must remain
Sergey Ulanov 2014/09/06 02:03:25 This duplicates comments from the interface defini
kelvinp 2014/09/09 21:19:46 Done.
25 // valid until capturer is destroyed. Must be called on the browser UI
Sergey Ulanov 2014/09/06 02:03:25 This doesn't look right. normally we use DesktopCa
kelvinp 2014/09/09 21:19:46 Yes, the capturer thread will be mapped to the UI
26 // thread.
27 virtual void Start(webrtc::DesktopCapturer::Callback* callback) OVERRIDE;
28
29 // Captures the next frame. In Aura, this is implemented by requesting the
30 // layer and its substree to be rendered to a given data structure. |region|
31 // specifies region of the capture target that should be fresh in the
32 // resulting frame. Since Aura doesn't support partial capturing, the entire
33 // region of the captured frame will always be fresh. Pending capture
34 // operations are cancelled when DesktopCapturer is deleted.
35 virtual void Capture(const webrtc::DesktopRegion& region) OVERRIDE;
36
37 // Sets the window to be excluded from the captured image in the future
38 // Capture calls. Not supported in Aura.
39 virtual void SetExcludedWindow(webrtc::WindowId window) OVERRIDE {}
40
41 private:
42 // Called when a copy of the layer is captured.
43 void OnFrameCaptured(scoped_ptr<cc::CopyOutputResult> result);
44
45 // Points to the callback passed to webrtc::DesktopCapturer::Start().
46 webrtc::DesktopCapturer::Callback* callback_;
47
48 // The root window of the Aura Shell.
49 aura::Window* desktop_window_;
50
51 base::WeakPtrFactory<AuraDesktopCapturer> weak_factory_;
52 };
53
54 } // namespace remoting
55
56 #endif // REMOTING_HOST_CHROMEOS_AURA_DESKTOP_CAPTURER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698