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

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: Address wez's feedback 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::DesktopCapturer that captures pixels from the root window of the
18 // Aura Shell. This is implemented by requesting the layer and its substree to
19 // be rendered to a given data structure. |Start| and |Capture| must be called
Sergey Ulanov 2014/09/10 23:08:52 For function names add () at the end instead of |
20 // on the Browser UI thread.
21 class AuraDesktopCapturer : public webrtc::DesktopCapturer {
22 public:
23 AuraDesktopCapturer();
24 virtual ~AuraDesktopCapturer();
25
26 // webrtc::DesktopCapturer implementation.
27 virtual void Start(webrtc::DesktopCapturer::Callback* callback) OVERRIDE;
28 virtual void Capture(const webrtc::DesktopRegion& region) OVERRIDE;
29 virtual void SetExcludedWindow(webrtc::WindowId window) OVERRIDE;
Sergey Ulanov 2014/09/10 23:08:52 There is a default no-op implementation of this me
30
31 private:
32 friend class AuraDesktopCapturerTest;
33
34 // Called when a copy of the layer is captured.
35 void OnFrameCaptured(scoped_ptr<cc::CopyOutputResult> result);
36
37 // Points to the callback passed to webrtc::DesktopCapturer::Start().
38 webrtc::DesktopCapturer::Callback* callback_;
39
40 // The root window of the Aura Shell.
41 aura::Window* desktop_window_;
42
43 base::WeakPtrFactory<AuraDesktopCapturer> weak_factory_;
Sergey Ulanov 2014/09/10 23:08:52 please include base/memory/weak_ptr.h
44
45 DISALLOW_COPY_AND_ASSIGN(AuraDesktopCapturer);
46 };
47
48 } // namespace remoting
49
50 #endif // REMOTING_HOST_CHROMEOS_AURA_DESKTOP_CAPTURER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698