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

Side by Side Diff: ppapi/cpp/rect.cc

Issue 9700088: Check for specific PPB interface versions in C++ wrappers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix MouseInputEvent version check. Created 8 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
« no previous file with comments | « ppapi/cpp/module.cc ('k') | ppapi/cpp/url_loader.cc » ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ppapi/cpp/rect.h" 5 #include "ppapi/cpp/rect.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 namespace { 9 namespace {
10 10
11 void AdjustAlongAxis(int32_t dst_origin, int32_t dst_size, 11 void AdjustAlongAxis(int32_t dst_origin, int32_t dst_size,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 return Point(x() + (width() + 1) / 2, y() + (height() + 1) / 2); 120 return Point(x() + (width() + 1) / 2, y() + (height() + 1) / 2);
121 } 121 }
122 122
123 bool Rect::SharesEdgeWith(const Rect& rect) const { 123 bool Rect::SharesEdgeWith(const Rect& rect) const {
124 return (y() == rect.y() && height() == rect.height() && 124 return (y() == rect.y() && height() == rect.height() &&
125 (x() == rect.right() || right() == rect.x())) || 125 (x() == rect.right() || right() == rect.x())) ||
126 (x() == rect.x() && width() == rect.width() && 126 (x() == rect.x() && width() == rect.width() &&
127 (y() == rect.bottom() || bottom() == rect.y())); 127 (y() == rect.bottom() || bottom() == rect.y()));
128 } 128 }
129 129
130 } // namespace gfx 130 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/module.cc ('k') | ppapi/cpp/url_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698