| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 // views::LabelButton: | 51 // views::LabelButton: |
| 52 gfx::Size GetPreferredSize() const override; | 52 gfx::Size GetPreferredSize() const override; |
| 53 bool OnMousePressed(const ui::MouseEvent& event) override; | 53 bool OnMousePressed(const ui::MouseEvent& event) override; |
| 54 bool OnMouseDragged(const ui::MouseEvent& event) override; | 54 bool OnMouseDragged(const ui::MouseEvent& event) override; |
| 55 void OnMouseReleased(const ui::MouseEvent& event) override; | 55 void OnMouseReleased(const ui::MouseEvent& event) override; |
| 56 // Showing the drop down results in a MouseCaptureLost, we need to ignore it. | 56 // Showing the drop down results in a MouseCaptureLost, we need to ignore it. |
| 57 void OnMouseCaptureLost() override; | 57 void OnMouseCaptureLost() override; |
| 58 void OnMouseExited(const ui::MouseEvent& event) override; | 58 void OnMouseExited(const ui::MouseEvent& event) override; |
| 59 void OnGestureEvent(ui::GestureEvent* event) override; | 59 void OnGestureEvent(ui::GestureEvent* event) override; |
| 60 void GetAccessibleState(ui::AXViewState* state) override; | 60 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| 61 std::unique_ptr<views::LabelButtonBorder> CreateDefaultBorder() | 61 std::unique_ptr<views::LabelButtonBorder> CreateDefaultBorder() |
| 62 const override; | 62 const override; |
| 63 | 63 |
| 64 // views::ContextMenuController: | 64 // views::ContextMenuController: |
| 65 void ShowContextMenuForView(View* source, | 65 void ShowContextMenuForView(View* source, |
| 66 const gfx::Point& point, | 66 const gfx::Point& point, |
| 67 ui::MenuSourceType source_type) override; | 67 ui::MenuSourceType source_type) override; |
| 68 | 68 |
| 69 protected: | 69 protected: |
| 70 // Returns if menu should be shown. Override this to change default behavior. | 70 // Returns if menu should be shown. Override this to change default behavior. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 100 // Menu runner to display drop down menu. | 100 // Menu runner to display drop down menu. |
| 101 std::unique_ptr<views::MenuRunner> menu_runner_; | 101 std::unique_ptr<views::MenuRunner> menu_runner_; |
| 102 | 102 |
| 103 // A factory for tasks that show the dropdown context menu for the button. | 103 // A factory for tasks that show the dropdown context menu for the button. |
| 104 base::WeakPtrFactory<ToolbarButton> show_menu_factory_; | 104 base::WeakPtrFactory<ToolbarButton> show_menu_factory_; |
| 105 | 105 |
| 106 DISALLOW_COPY_AND_ASSIGN(ToolbarButton); | 106 DISALLOW_COPY_AND_ASSIGN(ToolbarButton); |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_BUTTON_H_ | 109 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_BUTTON_H_ |
| OLD | NEW |