| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_COMMON_GFX_INSETS_H__ | 5 #ifndef CHROME_COMMON_GFX_INSETS_H__ |
| 6 #define CHROME_COMMON_GFX_INSETS_H__ | 6 #define CHROME_COMMON_GFX_INSETS_H__ |
| 7 | 7 |
| 8 namespace gfx { | 8 namespace gfx { |
| 9 | 9 |
| 10 // | 10 // |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 bool operator==(const Insets& insets) const { | 43 bool operator==(const Insets& insets) const { |
| 44 return top_ == insets.top_ && left_ == insets.left_ && | 44 return top_ == insets.top_ && left_ == insets.left_ && |
| 45 bottom_ == insets.bottom_ && right_ == insets.right_; | 45 bottom_ == insets.bottom_ && right_ == insets.right_; |
| 46 } | 46 } |
| 47 | 47 |
| 48 bool operator!=(const Insets& insets) const { | 48 bool operator!=(const Insets& insets) const { |
| 49 return !(*this == insets); | 49 return !(*this == insets); |
| 50 } | 50 } |
| 51 | 51 |
| 52 Insets& operator+=(const Insets& insets) { |
| 53 top_ += insets.top_; |
| 54 left_ += insets.left_; |
| 55 bottom_ += insets.bottom_; |
| 56 right_ += insets.right_; |
| 57 return *this; |
| 58 } |
| 59 |
| 52 private: | 60 private: |
| 53 int top_; | 61 int top_; |
| 54 int left_; | 62 int left_; |
| 55 int bottom_; | 63 int bottom_; |
| 56 int right_; | 64 int right_; |
| 57 }; | 65 }; |
| 58 | 66 |
| 59 } // namespace | 67 } // namespace |
| 60 | 68 |
| 61 #endif // CHROME_COMMON_GFX_INSETS_H__ | 69 #endif // CHROME_COMMON_GFX_INSETS_H__ |
| OLD | NEW |