| 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 "base/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
| 6 #include "ui/base/l10n/l10n_util.h" | 6 #include "ui/base/l10n/l10n_util.h" |
| 7 #include "ui/base/models/menu_model.h" | 7 #include "ui/base/models/menu_model.h" |
| 8 #include "ui/base/models/menu_model_delegate.h" | 8 #include "ui/base/models/menu_model_delegate.h" |
| 9 #include "ui/views/controls/menu/menu_item_view.h" | 9 #include "ui/views/controls/menu/menu_item_view.h" |
| 10 #include "ui/views/controls/menu/menu_model_adapter.h" | 10 #include "ui/views/controls/menu/menu_model_adapter.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 } | 72 } |
| 73 | 73 |
| 74 virtual bool IsItemCheckedAt(int index) const OVERRIDE { | 74 virtual bool IsItemCheckedAt(int index) const OVERRIDE { |
| 75 return false; | 75 return false; |
| 76 } | 76 } |
| 77 | 77 |
| 78 virtual int GetGroupIdAt(int index) const OVERRIDE { | 78 virtual int GetGroupIdAt(int index) const OVERRIDE { |
| 79 return 0; | 79 return 0; |
| 80 } | 80 } |
| 81 | 81 |
| 82 virtual bool GetIconAt(int index, SkBitmap* icon) OVERRIDE { | 82 virtual bool GetIconAt(int index, gfx::ImageSkia* icon) OVERRIDE { |
| 83 return false; | 83 return false; |
| 84 } | 84 } |
| 85 | 85 |
| 86 virtual ui::ButtonMenuItemModel* GetButtonMenuItemAt( | 86 virtual ui::ButtonMenuItemModel* GetButtonMenuItemAt( |
| 87 int index) const OVERRIDE { | 87 int index) const OVERRIDE { |
| 88 return NULL; | 88 return NULL; |
| 89 } | 89 } |
| 90 | 90 |
| 91 virtual bool IsEnabledAt(int index) const OVERRIDE { | 91 virtual bool IsEnabledAt(int index) const OVERRIDE { |
| 92 return true; | 92 return true; |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 submodel->set_last_activation(-1); | 299 submodel->set_last_activation(-1); |
| 300 } | 300 } |
| 301 | 301 |
| 302 // Check that selecting the root item is safe. The MenuModel does | 302 // Check that selecting the root item is safe. The MenuModel does |
| 303 // not care about the root so MenuModelAdapter should do nothing | 303 // not care about the root so MenuModelAdapter should do nothing |
| 304 // (not hit the NOTREACHED check) when the root is selected. | 304 // (not hit the NOTREACHED check) when the root is selected. |
| 305 static_cast<views::MenuDelegate*>(&delegate)->SelectionChanged(menu); | 305 static_cast<views::MenuDelegate*>(&delegate)->SelectionChanged(menu); |
| 306 } | 306 } |
| 307 | 307 |
| 308 } // namespace views | 308 } // namespace views |
| OLD | NEW |