| 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 "views/examples/menu_example.h" | 5 #include "ui/views/examples/menu_example.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "ui/base/models/simple_menu_model.h" | 10 #include "ui/base/models/simple_menu_model.h" |
| 11 #include "views/controls/button/menu_button.h" | 11 #include "views/controls/button/menu_button.h" |
| 12 #include "views/controls/button/text_button.h" | 12 #include "views/controls/button/text_button.h" |
| 13 #include "views/controls/menu/menu_2.h" | 13 #include "views/controls/menu/menu_2.h" |
| 14 #include "views/controls/menu/view_menu_delegate.h" | 14 #include "views/controls/menu/view_menu_delegate.h" |
| 15 #include "views/layout/fill_layout.h" | 15 #include "views/layout/fill_layout.h" |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 // views::Menu2 is not a sub class of View, hence we cannot directly | 207 // views::Menu2 is not a sub class of View, hence we cannot directly |
| 208 // add to the container. Instead, we add a button to open a menu. | 208 // add to the container. Instead, we add a button to open a menu. |
| 209 const bool show_menu_marker = true; | 209 const bool show_menu_marker = true; |
| 210 ExampleMenuButton* menu_button = new ExampleMenuButton( | 210 ExampleMenuButton* menu_button = new ExampleMenuButton( |
| 211 ASCIIToUTF16("Open a menu"), show_menu_marker); | 211 ASCIIToUTF16("Open a menu"), show_menu_marker); |
| 212 container->SetLayoutManager(new views::FillLayout); | 212 container->SetLayoutManager(new views::FillLayout); |
| 213 container->AddChildView(menu_button); | 213 container->AddChildView(menu_button); |
| 214 } | 214 } |
| 215 | 215 |
| 216 } // namespace examples | 216 } // namespace examples |
| OLD | NEW |