| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_UTIL_H_ | 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_UTIL_H_ |
| 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_UTIL_H_ | 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_UTIL_H_ |
| 7 | 7 |
| 8 #include "mojo/services/public/cpp/view_manager/view_manager_types.h" | 8 #include "mojo/services/public/cpp/view_manager/types.h" |
| 9 | 9 |
| 10 // TODO(beng): #$*&@#(@ MacOSX SDK! | 10 // TODO(beng): #$*&@#(@ MacOSX SDK! |
| 11 #if defined(HiWord) | 11 #if defined(HiWord) |
| 12 #undef HiWord | 12 #undef HiWord |
| 13 #endif | 13 #endif |
| 14 #if defined(LoWord) | 14 #if defined(LoWord) |
| 15 #undef LoWord | 15 #undef LoWord |
| 16 #endif | 16 #endif |
| 17 | 17 |
| 18 namespace mojo { | 18 namespace mojo { |
| 19 namespace view_manager { | 19 namespace view_manager { |
| 20 | 20 |
| 21 inline uint16_t HiWord(uint32_t id) { | 21 inline uint16_t HiWord(uint32_t id) { |
| 22 return static_cast<uint16_t>((id >> 16) & 0xFFFF); | 22 return static_cast<uint16_t>((id >> 16) & 0xFFFF); |
| 23 } | 23 } |
| 24 | 24 |
| 25 inline uint16_t LoWord(uint32_t id) { | 25 inline uint16_t LoWord(uint32_t id) { |
| 26 return static_cast<uint16_t>(id & 0xFFFF); | 26 return static_cast<uint16_t>(id & 0xFFFF); |
| 27 } | 27 } |
| 28 | 28 |
| 29 } // namespace view_manager | 29 } // namespace view_manager |
| 30 } // namespace mojo | 30 } // namespace mojo |
| 31 | 31 |
| 32 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_UTIL_H_ | 32 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_UTIL_H_ |
| OLD | NEW |