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

Unified Diff: chrome/browser/ui/views/toolbar/wrench_toolbar_button.cc

Issue 869453002: Define class names for views class in c/b/ui/views (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/toolbar/wrench_toolbar_button.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/wrench_toolbar_button.cc
diff --git a/chrome/browser/ui/views/toolbar/wrench_toolbar_button.cc b/chrome/browser/ui/views/toolbar/wrench_toolbar_button.cc
index 9f8c8eaccffdba3e04e7e077a115b7f05f09bd79..ef221eee2ee27b94cbe2e32715ce814cb1a6fb56 100644
--- a/chrome/browser/ui/views/toolbar/wrench_toolbar_button.cc
+++ b/chrome/browser/ui/views/toolbar/wrench_toolbar_button.cc
@@ -58,18 +58,14 @@ gfx::Size WrenchToolbarButton::GetPreferredSize() const {
GetImageSkiaNamed(IDR_TOOLBAR_BEZEL_HOVER)->size();
}
-void WrenchToolbarButton::OnPaint(gfx::Canvas* canvas) {
- views::MenuButton::OnPaint(canvas);
- wrench_icon_painter_->Paint(canvas,
- GetThemeProvider(),
- gfx::Rect(size()),
- WrenchIconPainter::BEZEL_NONE);
-}
-
void WrenchToolbarButton::ScheduleWrenchIconPaint() {
SchedulePaint();
}
+const char* WrenchToolbarButton::GetClassName() const {
+ return "WrenchToolbarButton";
+}
+
bool WrenchToolbarButton::GetDropFormats(
int* formats, std::set<ui::OSExchangeData::CustomFormat>* custom_formats) {
return allow_extension_dragging_ ?
@@ -117,6 +113,14 @@ int WrenchToolbarButton::OnPerformDrop(const ui::DropTargetEvent& event) {
return ui::DragDropTypes::DRAG_MOVE;
}
+void WrenchToolbarButton::OnPaint(gfx::Canvas* canvas) {
+ views::MenuButton::OnPaint(canvas);
+ wrench_icon_painter_->Paint(canvas,
+ GetThemeProvider(),
+ gfx::Rect(size()),
+ WrenchIconPainter::BEZEL_NONE);
+}
+
void WrenchToolbarButton::ShowOverflowMenu() {
toolbar_view_->ShowAppMenu(true); // For drop.
}
« no previous file with comments | « chrome/browser/ui/views/toolbar/wrench_toolbar_button.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698