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

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

Issue 2133013002: AcceleratorProvider: Make GetAcceleratorForCommandId const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix overrides on Mac and Chrome OS. Created 4 years, 5 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/menu_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"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 // ContextMenuController: 58 // ContextMenuController:
59 void ShowContextMenuForView(View* source, 59 void ShowContextMenuForView(View* source,
60 const gfx::Point& point, 60 const gfx::Point& point,
61 ui::MenuSourceType source_type) override; 61 ui::MenuSourceType source_type) override;
62 62
63 // SimpleMenuModel::Delegate: 63 // SimpleMenuModel::Delegate:
64 bool IsCommandIdChecked(int command_id) const override; 64 bool IsCommandIdChecked(int command_id) const override;
65 bool IsCommandIdEnabled(int command_id) const override; 65 bool IsCommandIdEnabled(int command_id) const override;
66 bool GetAcceleratorForCommandId(int command_id, 66 bool GetAcceleratorForCommandId(int command_id,
67 ui::Accelerator* accelerator) override; 67 ui::Accelerator* accelerator) const override;
68 void ExecuteCommand(int command_id, int event_flags) override; 68 void ExecuteCommand(int command_id, int event_flags) override;
69 69
70 // The tree view to be tested. 70 // The tree view to be tested.
71 TreeView* tree_view_; 71 TreeView* tree_view_;
72 72
73 // Control buttons to modify the model. 73 // Control buttons to modify the model.
74 LabelButton* add_; 74 LabelButton* add_;
75 LabelButton* remove_; 75 LabelButton* remove_;
76 LabelButton* change_title_; 76 LabelButton* change_title_;
77 77
78 typedef ui::TreeNodeWithValue<int> NodeType; 78 typedef ui::TreeNodeWithValue<int> NodeType;
79 79
80 ui::TreeNodeModel<NodeType> model_; 80 ui::TreeNodeModel<NodeType> model_;
81 81
82 std::unique_ptr<MenuRunner> context_menu_runner_; 82 std::unique_ptr<MenuRunner> context_menu_runner_;
83 83
84 DISALLOW_COPY_AND_ASSIGN(TreeViewExample); 84 DISALLOW_COPY_AND_ASSIGN(TreeViewExample);
85 }; 85 };
86 86
87 } // namespace examples 87 } // namespace examples
88 } // namespace views 88 } // namespace views
89 89
90 #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/menu_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