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

Side by Side Diff: components/arc/common/app_struct_traits.cc

Issue 2253293002: Mojo C++ bindings: change the first template parameter of StructTraits and UnionTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@91_extra
Patch Set: rebase 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
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 #include "components/arc/common/app_struct_traits.h" 5 #include "components/arc/common/app_struct_traits.h"
6 6
7 namespace mojo { 7 namespace mojo {
8 8
9 bool StructTraits<arc::mojom::ScreenRect, gfx::Rect>::Read( 9 bool StructTraits<arc::mojom::ScreenRectDataView, gfx::Rect>::Read(
10 arc::mojom::ScreenRectDataView data, gfx::Rect* out) { 10 arc::mojom::ScreenRectDataView data,
11 gfx::Rect* out) {
11 if (data.right() < data.left() || data.bottom() < data.top()) 12 if (data.right() < data.left() || data.bottom() < data.top())
12 return false; 13 return false;
13 14
14 out->SetRect(data.left(), data.top(), data.right() - data.left(), 15 out->SetRect(data.left(), data.top(), data.right() - data.left(),
15 data.bottom() - data.top()); 16 data.bottom() - data.top());
16 return true; 17 return true;
17 } 18 }
18 19
19 } // namespace mojo 20 } // namespace mojo
OLDNEW
« no previous file with comments | « components/arc/common/app_struct_traits.h ('k') | components/autofill/content/public/cpp/autofill_types_struct_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698