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

Unified Diff: ash/common/system/tray/system_menu_button.h

Issue 2367903002: Introduce SystemMenuButton for Ash material design (Closed)
Patch Set: Created 4 years, 3 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
Index: ash/common/system/tray/system_menu_button.h
diff --git a/ash/common/system/tray/system_menu_button.h b/ash/common/system/tray/system_menu_button.h
new file mode 100644
index 0000000000000000000000000000000000000000..32604d695200ec38996fd496bd743be2efb0ee4c
--- /dev/null
+++ b/ash/common/system/tray/system_menu_button.h
@@ -0,0 +1,38 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_COMMON_SYSTEM_TRAY_SYSTEM_MENU_BUTTON_H_
+#define ASH_COMMON_SYSTEM_TRAY_SYSTEM_MENU_BUTTON_H_
+
+#include "ash/resources/vector_icons/vector_icons.h"
James Cook 2016/09/23 18:32:16 #include macros.h
tdanderson 2016/09/23 19:53:12 Done.
+#include "ui/views/controls/button/button.h"
+#include "ui/views/controls/button/image_button.h"
+
+namespace views {
+class InkDropHighlight;
+class InkDropRipple;
+}
+
+namespace ash {
+
+class SystemMenuButton : public views::ImageButton {
James Cook 2016/09/23 18:32:17 nit: Class docs. What does this do and why would y
tdanderson 2016/09/23 19:53:12 Slipped my mind, sorry. Done.
+ public:
+ SystemMenuButton(views::ButtonListener* listener,
James Cook 2016/09/23 18:32:16 nit: Document parameters. For example, what sort o
tdanderson 2016/09/23 19:53:12 Done.
+ const gfx::VectorIcon& icon,
+ int accessible_name_id);
+ ~SystemMenuButton() override;
+
+ // views::ImageButton:
+ std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
+ std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
+ const override;
+ bool ShouldShowInkDropForFocus() const override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SystemMenuButton);
+};
+
+} // namespace ash
+
+#endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_MENU_BUTTON_H_

Powered by Google App Engine
This is Rietveld 408576698