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

Side by Side Diff: mojo/public/cpp/bindings/tests/shared_rect.h

Issue 2259283003: Mojo C++ bindings: share DataView class between chromium and blink variants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@92_change_traits_param
Patch Set: . Created 4 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_TESTS_SHARED_RECT_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_TESTS_SHARED_RECT_H_
7
8 #include "base/logging.h"
9
10 namespace mojo {
11 namespace test {
12
13 // An implementation of a hypothetical Rect type specifically for consumers in
14 // both Chromium and Blink.
15 class SharedRect {
16 public:
17 SharedRect() {}
18 SharedRect(int x, int y, int width, int height)
19 : x_(x), y_(y), width_(width), height_(height) {}
20
21 int x() const { return x_; }
22 void set_x(int x) { x_ = x; }
23
24 int y() const { return y_; }
25 void set_y(int y) { y_ = y; }
26
27 int width() const { return width_; }
28 void set_width(int width) { width_ = width; }
29
30 int height() const { return height_; }
31 void set_height(int height) { height_ = height; }
32
33 private:
34 int x_ = 0;
35 int y_ = 0;
36 int width_ = 0;
37 int height_ = 0;
38 };
39
40 } // namespace test
41 } // namespace mojo
42
43 #endif // MOJO_PUBLIC_CPP_BINDINGS_TESTS_SHARED_RECT_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc ('k') | mojo/public/cpp/bindings/tests/shared_rect_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698