Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: ui/views/examples/menu_example.cc

Issue 8566052: views: Delete bubble, events, focus, layout directories and its stubbed files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/examples/link_example.cc ('k') | ui/views/examples/message_box_example.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/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 "ui/views/layout/fill_layout.h"
11 #include "views/controls/button/menu_button.h" 12 #include "views/controls/button/menu_button.h"
12 #include "views/controls/button/text_button.h" 13 #include "views/controls/button/text_button.h"
13 #include "views/controls/menu/menu_2.h" 14 #include "views/controls/menu/menu_2.h"
14 #include "views/controls/menu/view_menu_delegate.h" 15 #include "views/controls/menu/view_menu_delegate.h"
15 #include "views/layout/fill_layout.h"
16 #include "views/view.h" 16 #include "views/view.h"
17 17
18 namespace { 18 namespace {
19 19
20 class ExampleMenuModel : public ui::SimpleMenuModel, 20 class ExampleMenuModel : public ui::SimpleMenuModel,
21 public ui::SimpleMenuModel::Delegate { 21 public ui::SimpleMenuModel::Delegate {
22 public: 22 public:
23 ExampleMenuModel(); 23 ExampleMenuModel();
24 24
25 void RunMenuAt(const gfx::Point& point); 25 void RunMenuAt(const gfx::Point& point);
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ui/views/examples/link_example.cc ('k') | ui/views/examples/message_box_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698