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

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_button.h

Issue 2555623002: Last round of cleaning up MD layout constants. (Closed)
Patch Set: rebase Created 4 years 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
OLDNEW
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void OnGestureEvent(ui::GestureEvent* event) override; 59 void OnGestureEvent(ui::GestureEvent* event) override;
60 void GetAccessibleNodeData(ui::AXNodeData* node_data) 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 // Padding inside the border (around the image).
70 static constexpr int kInteriorPadding = 6;
Peter Kasting 2016/12/08 20:57:50 Nit: Goes above constructor
Evan Stade 2016/12/13 01:31:19 Done.
71
69 protected: 72 protected:
70 // Returns if menu should be shown. Override this to change default behavior. 73 // Returns if menu should be shown. Override this to change default behavior.
71 virtual bool ShouldShowMenu(); 74 virtual bool ShouldShowMenu();
72 75
73 // Function to show the dropdown menu. 76 // Function to show the dropdown menu.
74 virtual void ShowDropDownMenu(ui::MenuSourceType source_type); 77 virtual void ShowDropDownMenu(ui::MenuSourceType source_type);
75 78
76 private: 79 private:
77 friend test::ToolbarButtonTestApi; 80 friend test::ToolbarButtonTestApi;
78 81
(...skipping 21 matching lines...) Expand all
100 // Menu runner to display drop down menu. 103 // Menu runner to display drop down menu.
101 std::unique_ptr<views::MenuRunner> menu_runner_; 104 std::unique_ptr<views::MenuRunner> menu_runner_;
102 105
103 // A factory for tasks that show the dropdown context menu for the button. 106 // A factory for tasks that show the dropdown context menu for the button.
104 base::WeakPtrFactory<ToolbarButton> show_menu_factory_; 107 base::WeakPtrFactory<ToolbarButton> show_menu_factory_;
105 108
106 DISALLOW_COPY_AND_ASSIGN(ToolbarButton); 109 DISALLOW_COPY_AND_ASSIGN(ToolbarButton);
107 }; 110 };
108 111
109 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_BUTTON_H_ 112 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698