Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / components / view_manager / public / cpp / util.h
blob78a717cba2fb14e114fba6869b226d0bef5f19bd
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_UTIL_H_
6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_UTIL_H_
8 #include "components/view_manager/public/cpp/types.h"
10 // TODO(beng): #$*&@#(@ MacOSX SDK!
11 #if defined(HiWord)
12 #undef HiWord
13 #endif
14 #if defined(LoWord)
15 #undef LoWord
16 #endif
18 namespace mojo {
20 inline uint16_t HiWord(uint32_t id) {
21 return static_cast<uint16_t>((id >> 16) & 0xFFFF);
24 inline uint16_t LoWord(uint32_t id) {
25 return static_cast<uint16_t>(id & 0xFFFF);
28 } // namespace mojo
30 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_UTIL_H_