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

Side by Side Diff: mojo/services/native_viewport/geometry_conversions.h

Issue 177183002: Mojo: Include "path/to/foo.mojom.h" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary abspath Created 6 years, 9 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 | Annotate | Revision Log
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 MOJO_SERVICES_NATIVE_VIEWPORT_GEOMETRY_CONVERSIONS_H_ 5 #ifndef MOJO_SERVICES_NATIVE_VIEWPORT_GEOMETRY_CONVERSIONS_H_
6 #define MOJO_SERVICES_NATIVE_VIEWPORT_GEOMETRY_CONVERSIONS_H_ 6 #define MOJO_SERVICES_NATIVE_VIEWPORT_GEOMETRY_CONVERSIONS_H_
7 7
8 #include "mojom/native_viewport.h" 8 #include "mojo/services/native_viewport/native_viewport.mojom.h"
9 #include "ui/gfx/rect.h" 9 #include "ui/gfx/rect.h"
10 10
11 namespace mojo { 11 namespace mojo {
12 12
13 template<> 13 template<>
14 class TypeConverter<Point, gfx::Point> { 14 class TypeConverter<Point, gfx::Point> {
15 public: 15 public:
16 static Point ConvertFrom(const gfx::Point& input, Buffer* buf) { 16 static Point ConvertFrom(const gfx::Point& input, Buffer* buf) {
17 Point::Builder point(buf); 17 Point::Builder point(buf);
18 point.set_x(input.x()); 18 point.set_x(input.x());
(...skipping 30 matching lines...) Expand all
49 } 49 }
50 static gfx::Rect ConvertTo(const Rect& input) { 50 static gfx::Rect ConvertTo(const Rect& input) {
51 return gfx::Rect(input.position().x(), input.position().y(), 51 return gfx::Rect(input.position().x(), input.position().y(),
52 input.size().width(), input.size().height()); 52 input.size().width(), input.size().height());
53 } 53 }
54 }; 54 };
55 55
56 } // namespace mojo 56 } // namespace mojo
57 57
58 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_GEOMETRY_CONVERSIONS_H_ 58 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_GEOMETRY_CONVERSIONS_H_
OLDNEW
« no previous file with comments | « mojo/services/gles2/command_buffer_type_conversions.cc ('k') | mojo/services/native_viewport/native_viewport_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698