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

Side by Side Diff: ui/views/examples/tree_view_example.h

Issue 1963563002: Views: Flip default value of CustomButton::request_focus_on_press_ to false. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 7 months 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
« no previous file with comments | « ui/views/examples/button_example.cc ('k') | ui/views/examples/tree_view_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) 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 #ifndef UI_VIEWS_EXAMPLES_TREE_VIEW_EXAMPLE_H_ 5 #ifndef UI_VIEWS_EXAMPLES_TREE_VIEW_EXAMPLE_H_
6 #define UI_VIEWS_EXAMPLES_TREE_VIEW_EXAMPLE_H_ 6 #define UI_VIEWS_EXAMPLES_TREE_VIEW_EXAMPLE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/base/models/simple_menu_model.h" 9 #include "ui/base/models/simple_menu_model.h"
10 #include "ui/base/models/tree_node_model.h" 10 #include "ui/base/models/tree_node_model.h"
11 #include "ui/views/context_menu_controller.h" 11 #include "ui/views/context_menu_controller.h"
12 #include "ui/views/controls/button/button.h" 12 #include "ui/views/controls/button/button.h"
13 #include "ui/views/controls/tree/tree_view_controller.h" 13 #include "ui/views/controls/tree/tree_view_controller.h"
14 #include "ui/views/examples/example_base.h" 14 #include "ui/views/examples/example_base.h"
15 15
16 namespace views { 16 namespace views {
17 17
18 class LabelButton;
18 class MenuRunner; 19 class MenuRunner;
19 class TreeView; 20 class TreeView;
20 21
21 namespace examples { 22 namespace examples {
22 23
23 class VIEWS_EXAMPLES_EXPORT TreeViewExample 24 class VIEWS_EXAMPLES_EXPORT TreeViewExample
24 : public ExampleBase, 25 : public ExampleBase,
25 public ButtonListener, 26 public ButtonListener,
26 public TreeViewController, 27 public TreeViewController,
27 public ContextMenuController, 28 public ContextMenuController,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 bool IsCommandIdChecked(int command_id) const override; 64 bool IsCommandIdChecked(int command_id) const override;
64 bool IsCommandIdEnabled(int command_id) const override; 65 bool IsCommandIdEnabled(int command_id) const override;
65 bool GetAcceleratorForCommandId(int command_id, 66 bool GetAcceleratorForCommandId(int command_id,
66 ui::Accelerator* accelerator) override; 67 ui::Accelerator* accelerator) override;
67 void ExecuteCommand(int command_id, int event_flags) override; 68 void ExecuteCommand(int command_id, int event_flags) override;
68 69
69 // The tree view to be tested. 70 // The tree view to be tested.
70 TreeView* tree_view_; 71 TreeView* tree_view_;
71 72
72 // Control buttons to modify the model. 73 // Control buttons to modify the model.
73 Button* add_; 74 LabelButton* add_;
74 Button* remove_; 75 LabelButton* remove_;
75 Button* change_title_; 76 LabelButton* change_title_;
76 77
77 typedef ui::TreeNodeWithValue<int> NodeType; 78 typedef ui::TreeNodeWithValue<int> NodeType;
78 79
79 ui::TreeNodeModel<NodeType> model_; 80 ui::TreeNodeModel<NodeType> model_;
80 81
81 std::unique_ptr<MenuRunner> context_menu_runner_; 82 std::unique_ptr<MenuRunner> context_menu_runner_;
82 83
83 DISALLOW_COPY_AND_ASSIGN(TreeViewExample); 84 DISALLOW_COPY_AND_ASSIGN(TreeViewExample);
84 }; 85 };
85 86
86 } // namespace examples 87 } // namespace examples
87 } // namespace views 88 } // namespace views
88 89
89 #endif // UI_VIEWS_EXAMPLES_TREE_VIEW_EXAMPLE_H_ 90 #endif // UI_VIEWS_EXAMPLES_TREE_VIEW_EXAMPLE_H_
OLDNEW
« no previous file with comments | « ui/views/examples/button_example.cc ('k') | ui/views/examples/tree_view_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698