| 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 #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/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "ui/base/models/simple_menu_model.h" | 10 #include "ui/base/models/simple_menu_model.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 bool IsCommandIdEnabled(int command_id); | 48 bool IsCommandIdEnabled(int command_id); |
| 49 | 49 |
| 50 // ButtonListener: | 50 // ButtonListener: |
| 51 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE; | 51 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE; |
| 52 | 52 |
| 53 // TreeViewController: | 53 // TreeViewController: |
| 54 virtual void OnTreeViewSelectionChanged(TreeView* tree_view) OVERRIDE; | 54 virtual void OnTreeViewSelectionChanged(TreeView* tree_view) OVERRIDE; |
| 55 virtual bool CanEdit(TreeView* tree_view, ui::TreeModelNode* node) OVERRIDE; | 55 virtual bool CanEdit(TreeView* tree_view, ui::TreeModelNode* node) OVERRIDE; |
| 56 | 56 |
| 57 // ContextMenuController: | 57 // ContextMenuController: |
| 58 virtual void ShowContextMenuForView(View* source, | 58 virtual void ShowContextMenuForView( |
| 59 const gfx::Point& point) OVERRIDE; | 59 View* source, |
| 60 const gfx::Point& point, |
| 61 ui::ContextMenuSourceType source_type) OVERRIDE; |
| 60 | 62 |
| 61 // SimpleMenuModel::Delegate: | 63 // SimpleMenuModel::Delegate: |
| 62 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | 64 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; |
| 63 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | 65 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; |
| 64 virtual bool GetAcceleratorForCommandId( | 66 virtual bool GetAcceleratorForCommandId( |
| 65 int command_id, | 67 int command_id, |
| 66 ui::Accelerator* accelerator) OVERRIDE; | 68 ui::Accelerator* accelerator) OVERRIDE; |
| 67 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; | 69 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; |
| 68 | 70 |
| 69 // The tree view to be tested. | 71 // The tree view to be tested. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 80 | 82 |
| 81 scoped_ptr<MenuRunner> context_menu_runner_; | 83 scoped_ptr<MenuRunner> context_menu_runner_; |
| 82 | 84 |
| 83 DISALLOW_COPY_AND_ASSIGN(TreeViewExample); | 85 DISALLOW_COPY_AND_ASSIGN(TreeViewExample); |
| 84 }; | 86 }; |
| 85 | 87 |
| 86 } // namespace examples | 88 } // namespace examples |
| 87 } // namespace views | 89 } // namespace views |
| 88 | 90 |
| 89 #endif // UI_VIEWS_EXAMPLES_TREE_VIEW_EXAMPLE_H_ | 91 #endif // UI_VIEWS_EXAMPLES_TREE_VIEW_EXAMPLE_H_ |
| OLD | NEW |