| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_BUTTON_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_BUTTON_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_BUTTON_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 // views::ImageButton: | 58 // views::ImageButton: |
| 59 bool OnMousePressed(const ui::MouseEvent& event) override; | 59 bool OnMousePressed(const ui::MouseEvent& event) override; |
| 60 bool OnMouseDragged(const ui::MouseEvent& event) override; | 60 bool OnMouseDragged(const ui::MouseEvent& event) override; |
| 61 void OnMouseReleased(const ui::MouseEvent& event) override; | 61 void OnMouseReleased(const ui::MouseEvent& event) override; |
| 62 // Showing the drop down results in a MouseCaptureLost, we need to ignore it. | 62 // Showing the drop down results in a MouseCaptureLost, we need to ignore it. |
| 63 void OnMouseCaptureLost() override; | 63 void OnMouseCaptureLost() override; |
| 64 void OnMouseExited(const ui::MouseEvent& event) override; | 64 void OnMouseExited(const ui::MouseEvent& event) override; |
| 65 void OnGestureEvent(ui::GestureEvent* event) override; | 65 void OnGestureEvent(ui::GestureEvent* event) override; |
| 66 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; | 66 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| 67 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; | |
| 68 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() | |
| 69 const override; | |
| 70 | 67 |
| 71 // views::ContextMenuController: | 68 // views::ContextMenuController: |
| 72 void ShowContextMenuForView(View* source, | 69 void ShowContextMenuForView(View* source, |
| 73 const gfx::Point& point, | 70 const gfx::Point& point, |
| 74 ui::MenuSourceType source_type) override; | 71 ui::MenuSourceType source_type) override; |
| 75 | 72 |
| 76 protected: | 73 protected: |
| 77 // Returns if menu should be shown. Override this to change default behavior. | 74 // Returns if menu should be shown. Override this to change default behavior. |
| 78 virtual bool ShouldShowMenu(); | 75 virtual bool ShouldShowMenu(); |
| 79 | 76 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 107 // Menu runner to display drop down menu. | 104 // Menu runner to display drop down menu. |
| 108 std::unique_ptr<views::MenuRunner> menu_runner_; | 105 std::unique_ptr<views::MenuRunner> menu_runner_; |
| 109 | 106 |
| 110 // A factory for tasks that show the dropdown context menu for the button. | 107 // A factory for tasks that show the dropdown context menu for the button. |
| 111 base::WeakPtrFactory<ToolbarButton> show_menu_factory_; | 108 base::WeakPtrFactory<ToolbarButton> show_menu_factory_; |
| 112 | 109 |
| 113 DISALLOW_COPY_AND_ASSIGN(ToolbarButton); | 110 DISALLOW_COPY_AND_ASSIGN(ToolbarButton); |
| 114 }; | 111 }; |
| 115 | 112 |
| 116 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_BUTTON_H_ | 113 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_BUTTON_H_ |
| OLD | NEW |