OLD | NEW |
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 ANDROID_WEBVIEW_BROWSER_CHILD_FRAME_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_CHILD_FRAME_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_CHILD_FRAME_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_CHILD_FRAME_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "ui/gfx/geometry/rect.h" | 11 #include "ui/gfx/geometry/rect.h" |
11 #include "ui/gfx/geometry/size.h" | 12 #include "ui/gfx/geometry/size.h" |
12 #include "ui/gfx/transform.h" | 13 #include "ui/gfx/transform.h" |
13 | 14 |
14 namespace cc { | 15 namespace cc { |
15 class CompositorFrame; | 16 class CompositorFrame; |
16 } | 17 } |
17 | 18 |
18 namespace android_webview { | 19 namespace android_webview { |
19 | 20 |
20 class ChildFrame { | 21 class ChildFrame { |
21 public: | 22 public: |
22 ChildFrame(uint32_t output_surface_id, | 23 ChildFrame(uint32_t output_surface_id, |
23 scoped_ptr<cc::CompositorFrame> frame, | 24 std::unique_ptr<cc::CompositorFrame> frame, |
24 uint32_t compositor_id, | 25 uint32_t compositor_id, |
25 bool viewport_rect_for_tile_priority_empty, | 26 bool viewport_rect_for_tile_priority_empty, |
26 const gfx::Transform& transform_for_tile_priority, | 27 const gfx::Transform& transform_for_tile_priority, |
27 bool offscreen_pre_raster, | 28 bool offscreen_pre_raster, |
28 bool is_layer); | 29 bool is_layer); |
29 ~ChildFrame(); | 30 ~ChildFrame(); |
30 | 31 |
31 const uint32_t output_surface_id; | 32 const uint32_t output_surface_id; |
32 scoped_ptr<cc::CompositorFrame> frame; | 33 std::unique_ptr<cc::CompositorFrame> frame; |
33 // The id of the compositor this |frame| comes from. | 34 // The id of the compositor this |frame| comes from. |
34 const uint32_t compositor_id; | 35 const uint32_t compositor_id; |
35 const bool viewport_rect_for_tile_priority_empty; | 36 const bool viewport_rect_for_tile_priority_empty; |
36 const gfx::Transform transform_for_tile_priority; | 37 const gfx::Transform transform_for_tile_priority; |
37 const bool offscreen_pre_raster; | 38 const bool offscreen_pre_raster; |
38 const bool is_layer; | 39 const bool is_layer; |
39 | 40 |
40 private: | 41 private: |
41 DISALLOW_COPY_AND_ASSIGN(ChildFrame); | 42 DISALLOW_COPY_AND_ASSIGN(ChildFrame); |
42 }; | 43 }; |
43 | 44 |
44 } // namespace webview | 45 } // namespace webview |
45 | 46 |
46 #endif // ANDROID_WEBVIEW_BROWSER_CHILD_FRAME_H_ | 47 #endif // ANDROID_WEBVIEW_BROWSER_CHILD_FRAME_H_ |
OLD | NEW |