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

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

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 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 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 #include <stdint.h> 5 #include <stdint.h>
6 6
7 #include <memory>
8
7 #include "base/macros.h" 9 #include "base/macros.h"
8 #include "base/memory/scoped_ptr.h"
9 #include "third_party/skia/include/core/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
10 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" 11 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
11 12
12 namespace remoting { 13 namespace remoting {
13 14
14 // DesktopFrame implementation used by screen capture on ChromeOS. 15 // DesktopFrame implementation used by screen capture on ChromeOS.
15 // Frame data is stored in a SkBitmap. 16 // Frame data is stored in a SkBitmap.
16 class SkiaBitmapDesktopFrame : public webrtc::DesktopFrame { 17 class SkiaBitmapDesktopFrame : public webrtc::DesktopFrame {
17 public: 18 public:
18 static SkiaBitmapDesktopFrame* Create(scoped_ptr<SkBitmap> bitmap); 19 static SkiaBitmapDesktopFrame* Create(std::unique_ptr<SkBitmap> bitmap);
19 ~SkiaBitmapDesktopFrame() override; 20 ~SkiaBitmapDesktopFrame() override;
20 21
21 private: 22 private:
22 SkiaBitmapDesktopFrame(webrtc::DesktopSize size, 23 SkiaBitmapDesktopFrame(webrtc::DesktopSize size,
23 int stride, 24 int stride,
24 uint8_t* data, 25 uint8_t* data,
25 scoped_ptr<SkBitmap> bitmap); 26 std::unique_ptr<SkBitmap> bitmap);
26 27
27 scoped_ptr<SkBitmap> bitmap_; 28 std::unique_ptr<SkBitmap> bitmap_;
28 29
29 DISALLOW_COPY_AND_ASSIGN(SkiaBitmapDesktopFrame); 30 DISALLOW_COPY_AND_ASSIGN(SkiaBitmapDesktopFrame);
30 }; 31 };
31 32
32 } // namespace remoting 33 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/chromeos/mouse_cursor_monitor_aura.cc ('k') | remoting/host/chromeos/skia_bitmap_desktop_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698