OLD | NEW |
1 // Copyright (c) 2012 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/shared_impl/ppb_view_shared.h" | 5 #include "ppapi/shared_impl/ppb_view_shared.h" |
6 | 6 |
| 7 #include <string.h> |
| 8 |
7 namespace { | 9 namespace { |
8 | 10 |
9 bool IsRectNonempty(const PP_Rect& rect) { | 11 bool IsRectNonempty(const PP_Rect& rect) { |
10 return rect.size.width > 0 && rect.size.height > 0; | 12 return rect.size.width > 0 && rect.size.height > 0; |
11 } | 13 } |
12 | 14 |
13 } // namespace | 15 } // namespace |
14 | 16 |
15 namespace ppapi { | 17 namespace ppapi { |
16 | 18 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 float PPB_View_Shared::GetCSSScale() const { return data_.css_scale; } | 84 float PPB_View_Shared::GetCSSScale() const { return data_.css_scale; } |
83 | 85 |
84 PP_Bool PPB_View_Shared::GetScrollOffset(PP_Point* scroll_offset) const { | 86 PP_Bool PPB_View_Shared::GetScrollOffset(PP_Point* scroll_offset) const { |
85 if (!scroll_offset) | 87 if (!scroll_offset) |
86 return PP_FALSE; | 88 return PP_FALSE; |
87 *scroll_offset = data_.scroll_offset; | 89 *scroll_offset = data_.scroll_offset; |
88 return PP_TRUE; | 90 return PP_TRUE; |
89 } | 91 } |
90 | 92 |
91 } // namespace ppapi | 93 } // namespace ppapi |
OLD | NEW |