| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/base/models/simple_menu_model.h" | 5 #include "ui/base/models/simple_menu_model.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "third_party/skia/include/core/SkBitmap.h" | 8 #include "third_party/skia/include/core/SkBitmap.h" |
| 9 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #pragma optimize("", off) | 25 #pragma optimize("", off) |
| 26 MSVC_PUSH_DISABLE_WARNING(4748) | 26 MSVC_PUSH_DISABLE_WARNING(4748) |
| 27 #endif | 27 #endif |
| 28 | 28 |
| 29 ~Item() { | 29 ~Item() { |
| 30 CHECK_EQ(magic_id, kMagicIdAlive); | 30 CHECK_EQ(magic_id, kMagicIdAlive); |
| 31 magic_id = kMagicIdDead; | 31 magic_id = kMagicIdDead; |
| 32 } | 32 } |
| 33 | 33 |
| 34 #if defined(COMPILER_MSVC) | 34 #if defined(COMPILER_MSVC) |
| 35 #pragma optimize("", off) | 35 MSVC_POP_WARNING() |
| 36 MSVC_PUSH_DISABLE_WARNING(4748) | 36 #pragma optimize("", on) |
| 37 #endif | 37 #endif |
| 38 | 38 |
| 39 int command_id; | 39 int command_id; |
| 40 string16 label; | 40 string16 label; |
| 41 SkBitmap icon; | 41 SkBitmap icon; |
| 42 ItemType type; | 42 ItemType type; |
| 43 int group_id; | 43 int group_id; |
| 44 MenuModel* submenu; | 44 MenuModel* submenu; |
| 45 ButtonMenuItemModel* button_model; | 45 ButtonMenuItemModel* button_model; |
| 46 uint32 magic_id; | 46 uint32 magic_id; |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 #ifndef NDEBUG | 381 #ifndef NDEBUG |
| 382 if (item.type == TYPE_SEPARATOR) { | 382 if (item.type == TYPE_SEPARATOR) { |
| 383 DCHECK_EQ(item.command_id, kSeparatorId); | 383 DCHECK_EQ(item.command_id, kSeparatorId); |
| 384 } else { | 384 } else { |
| 385 DCHECK_GE(item.command_id, 0); | 385 DCHECK_GE(item.command_id, 0); |
| 386 } | 386 } |
| 387 #endif // NDEBUG | 387 #endif // NDEBUG |
| 388 } | 388 } |
| 389 | 389 |
| 390 } // namespace ui | 390 } // namespace ui |
| OLD | NEW |