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

Side by Side Diff: mojo/converters/geometry/geometry_type_converters.cc

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 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 "mojo/converters/geometry/geometry_type_converters.h" 5 #include "mojo/converters/geometry/geometry_type_converters.h"
6 6
7 namespace mojo { 7 namespace mojo {
8 8
9 // static 9 // static
10 PointPtr TypeConverter<PointPtr, gfx::Point>::Convert(const gfx::Point& input) { 10 PointPtr TypeConverter<PointPtr, gfx::Point>::Convert(const gfx::Point& input) {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 return rect.Pass(); 80 return rect.Pass();
81 } 81 }
82 82
83 // static 83 // static
84 gfx::RectF TypeConverter<gfx::RectF, RectFPtr>::Convert(const RectFPtr& input) { 84 gfx::RectF TypeConverter<gfx::RectF, RectFPtr>::Convert(const RectFPtr& input) {
85 if (input.is_null()) 85 if (input.is_null())
86 return gfx::RectF(); 86 return gfx::RectF();
87 return gfx::RectF(input->x, input->y, input->width, input->height); 87 return gfx::RectF(input->x, input->y, input->width, input->height);
88 } 88 }
89 89
90 // static
91 Rect TypeConverter<Rect, gfx::Rect>::Convert(const gfx::Rect& input) {
92 Rect rect;
93 rect.x = input.x();
94 rect.y = input.y();
95 rect.width = input.width();
96 rect.height = input.height();
97 return rect;
98 }
99
100 // static
101 gfx::Rect TypeConverter<gfx::Rect, Rect>::Convert(const Rect& input) {
102 return gfx::Rect(input.x, input.y, input.width, input.height);
103 }
104
90 } // namespace mojo 105 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/converters/geometry/geometry_type_converters.h ('k') | mojo/converters/input_events/input_event_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698