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

Side by Side Diff: cc/surfaces/surface_info.h

Issue 2633303003: Clean up RenderWidgetHostView(ChildFrame and Guest) compositing code (Closed)
Patch Set: c Created 3 years, 11 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
« no previous file with comments | « cc/ipc/cc_param_traits_macros.h ('k') | content/browser/browser_plugin/browser_plugin_guest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CC_SURFACES_SURFACE_INFO_H_ 5 #ifndef CC_SURFACES_SURFACE_INFO_H_
6 #define CC_SURFACES_SURFACE_INFO_H_ 6 #define CC_SURFACES_SURFACE_INFO_H_
7 7
8 #include "cc/surfaces/surface_id.h" 8 #include "cc/surfaces/surface_id.h"
9 #include "ui/gfx/geometry/size.h" 9 #include "ui/gfx/geometry/size.h"
10 10
11 namespace IPC {
12 template <class T>
13 struct ParamTraits;
14 } // namespace IPC
15
11 namespace cc { 16 namespace cc {
12 namespace mojom { 17 namespace mojom {
13 class SurfaceInfoDataView; 18 class SurfaceInfoDataView;
14 } 19 }
15 20
16 // This class contains information about the surface that is being embedded. 21 // This class contains information about the surface that is being embedded.
17 class SurfaceInfo { 22 class SurfaceInfo {
18 public: 23 public:
19 SurfaceInfo() = default; 24 SurfaceInfo() = default;
20 SurfaceInfo(const SurfaceId& id, 25 SurfaceInfo(const SurfaceId& id,
(...skipping 10 matching lines...) Expand all
31 } 36 }
32 37
33 bool operator!=(const SurfaceInfo& info) const { return !(*this == info); } 38 bool operator!=(const SurfaceInfo& info) const { return !(*this == info); }
34 39
35 const SurfaceId& id() const { return id_; } 40 const SurfaceId& id() const { return id_; }
36 float device_scale_factor() const { return device_scale_factor_; } 41 float device_scale_factor() const { return device_scale_factor_; }
37 const gfx::Size& size_in_pixels() const { return size_in_pixels_; } 42 const gfx::Size& size_in_pixels() const { return size_in_pixels_; }
38 43
39 private: 44 private:
40 friend struct mojo::StructTraits<mojom::SurfaceInfoDataView, SurfaceInfo>; 45 friend struct mojo::StructTraits<mojom::SurfaceInfoDataView, SurfaceInfo>;
46 friend struct IPC::ParamTraits<SurfaceInfo>;
41 47
42 SurfaceId id_; 48 SurfaceId id_;
43 float device_scale_factor_ = 1.f; 49 float device_scale_factor_ = 1.f;
44 gfx::Size size_in_pixels_; 50 gfx::Size size_in_pixels_;
45 }; 51 };
46 52
47 } // namespace cc 53 } // namespace cc
48 54
49 #endif // CC_SURFACES_SURFACE_INFO_H_ 55 #endif // CC_SURFACES_SURFACE_INFO_H_
OLDNEW
« no previous file with comments | « cc/ipc/cc_param_traits_macros.h ('k') | content/browser/browser_plugin/browser_plugin_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698