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

Side by Side Diff: content/browser/compositor/software_output_device_win.h

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 #ifndef CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_WIN_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_WIN_H_
6 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_WIN_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_WIN_H_
7 7
8 #include <stddef.h>
8 #include <windows.h> 9 #include <windows.h>
9 #include <stddef.h>
10 10
11 #include <memory>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "cc/output/software_output_device.h" 15 #include "cc/output/software_output_device.h"
16 #include "third_party/skia/include/core/SkCanvas.h" 16 #include "third_party/skia/include/core/SkCanvas.h"
17 #include "third_party/skia/include/core/SkRefCnt.h" 17 #include "third_party/skia/include/core/SkRefCnt.h"
18 18
19 namespace base { 19 namespace base {
20 class SharedMemory; 20 class SharedMemory;
21 } 21 }
22 22
23 namespace ui { 23 namespace ui {
24 class Compositor; 24 class Compositor;
25 } 25 }
26 26
27 namespace content { 27 namespace content {
28 class SoftwareOutputDeviceWin; 28 class SoftwareOutputDeviceWin;
29 29
30 class OutputDeviceBacking { 30 class OutputDeviceBacking {
31 public: 31 public:
32 OutputDeviceBacking(); 32 OutputDeviceBacking();
33 ~OutputDeviceBacking(); 33 ~OutputDeviceBacking();
34 34
35 void Resized(); 35 void Resized();
36 void RegisterOutputDevice(SoftwareOutputDeviceWin* device); 36 void RegisterOutputDevice(SoftwareOutputDeviceWin* device);
37 void UnregisterOutputDevice(SoftwareOutputDeviceWin* device); 37 void UnregisterOutputDevice(SoftwareOutputDeviceWin* device);
38 base::SharedMemory* GetSharedMemory(const gfx::Size& size); 38 base::SharedMemory* GetSharedMemory(const gfx::Size& size);
39 39
40 private: 40 private:
41 size_t GetMaxByteSize(); 41 size_t GetMaxByteSize();
42 42
43 std::vector<SoftwareOutputDeviceWin*> devices_; 43 std::vector<SoftwareOutputDeviceWin*> devices_;
44 scoped_ptr<base::SharedMemory> backing_; 44 std::unique_ptr<base::SharedMemory> backing_;
45 size_t created_byte_size_; 45 size_t created_byte_size_;
46 46
47 DISALLOW_COPY_AND_ASSIGN(OutputDeviceBacking); 47 DISALLOW_COPY_AND_ASSIGN(OutputDeviceBacking);
48 }; 48 };
49 49
50 class SoftwareOutputDeviceWin : public cc::SoftwareOutputDevice { 50 class SoftwareOutputDeviceWin : public cc::SoftwareOutputDevice {
51 public: 51 public:
52 SoftwareOutputDeviceWin(OutputDeviceBacking* backing, 52 SoftwareOutputDeviceWin(OutputDeviceBacking* backing,
53 ui::Compositor* compositor); 53 ui::Compositor* compositor);
54 ~SoftwareOutputDeviceWin() override; 54 ~SoftwareOutputDeviceWin() override;
(...skipping 12 matching lines...) Expand all
67 bool is_hwnd_composited_; 67 bool is_hwnd_composited_;
68 OutputDeviceBacking* backing_; 68 OutputDeviceBacking* backing_;
69 bool in_paint_; 69 bool in_paint_;
70 70
71 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceWin); 71 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceWin);
72 }; 72 };
73 73
74 } // namespace content 74 } // namespace content
75 75
76 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_WIN_H_ 76 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_WIN_H_
OLDNEW
« no previous file with comments | « content/browser/compositor/software_output_device_ozone_unittest.cc ('k') | content/browser/compositor/surface_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698