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

Unified Diff: ui/app_list/views/indicator_chip_view.h

Issue 2952303002: cros: add SUGGESTED APPS indicator to start page (Closed)
Patch Set: Created 3 years, 6 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: ui/app_list/views/indicator_chip_view.h
diff --git a/ui/app_list/views/indicator_chip_view.h b/ui/app_list/views/indicator_chip_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..31b184b8ed2150d13fbb0e0cbaac9cb6052e9877
--- /dev/null
+++ b/ui/app_list/views/indicator_chip_view.h
@@ -0,0 +1,37 @@
+// Copyright 2017 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 UI_APP_LIST_VIEWS_INDICATOR_CHIP_VIEW_H_
+#define UI_APP_LIST_VIEWS_INDICATOR_CHIP_VIEW_H_
+
+#include "base/macros.h"
+#include "ui/views/view.h"
+
+namespace views {
+class Label;
+} // namespace views
+
+namespace app_list {
+
+// IndicatorChipView consists of a label and is used on top of app tiles for
+// indication purpose.
+class IndicatorChipView : public views::View {
+ public:
+ explicit IndicatorChipView(base::string16 text);
xiyuan 2017/06/22 22:33:52 nit: base::string16 -> const base::string16& and
Qiang(Joe) Xu 2017/06/22 22:47:27 Done.
+ ~IndicatorChipView() override;
+
+ private:
+ // views::View overridden:
+ gfx::Size CalculatePreferredSize() const override;
+ void Layout() override;
+
+ views::View* container_ = nullptr; // Owned by views hierarchy.
+ views::Label* label_ = nullptr; // Owned by views hierarchy.
+
+ DISALLOW_COPY_AND_ASSIGN(IndicatorChipView);
+};
+
+} // namespace app_list
+
+#endif // UI_APP_LIST_VIEWS_INDICATOR_CHIP_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698