Commit d4022b8e authored by Sara Kato's avatar Sara Kato Committed by Chromium LUCI CQ

views-posse: Add metadata to AppListItemView

Bug: 1159562
Test: build
Change-Id: I0734239a9877cac0e46c2f45aeb66079b7a2125a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2631650
Commit-Queue: Sara Kato <sarakato@chromium.org>
Auto-Submit: Sara Kato <sarakato@chromium.org>
Reviewed-by: default avatarAllen Bauer <kylixrd@chromium.org>
Reviewed-by: default avatarYury Khmel <khmel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844405}
parent 8478a16f
......@@ -49,6 +49,7 @@
#include "ui/views/controls/label.h"
#include "ui/views/controls/menu/menu_runner.h"
#include "ui/views/drag_controller.h"
#include "ui/views/metadata/metadata_impl_macros.h"
namespace ash {
......@@ -281,9 +282,6 @@ class AppListItemView::IconImageView : public views::ImageView {
DISALLOW_COPY_AND_ASSIGN(IconImageView);
};
// static
const char AppListItemView::kViewClassName[] = "ui/app_list/AppListItemView";
AppListItemView::AppListItemView(AppsGridView* apps_grid_view,
AppListItem* item,
AppListViewDelegate* delegate,
......@@ -735,10 +733,6 @@ bool AppListItemView::OnMousePressed(const ui::MouseEvent& event) {
return true;
}
const char* AppListItemView::GetClassName() const {
return kViewClassName;
}
void AppListItemView::Layout() {
gfx::Rect rect(GetContentsBounds());
if (rect.IsEmpty())
......@@ -1131,4 +1125,7 @@ void AppListItemView::AdaptBoundsForSelectionHighlight(gfx::Rect* bounds) {
bounds->Inset(gfx::Insets(kFocusRingWidth / 2));
}
BEGIN_METADATA(AppListItemView, views::Button)
END_METADATA
} // namespace ash
......@@ -12,7 +12,6 @@
#include "ash/app_list/app_list_export.h"
#include "ash/app_list/model/app_list_item_observer.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/strings/string16.h"
#include "base/timer/timer.h"
......@@ -41,13 +40,14 @@ class APP_LIST_EXPORT AppListItemView : public views::Button,
public AppListItemObserver,
public ui::ImplicitAnimationObserver {
public:
// Internal class name.
static const char kViewClassName[];
METADATA_HEADER(AppListItemView);
AppListItemView(AppsGridView* apps_grid_view,
AppListItem* item,
AppListViewDelegate* delegate,
bool is_in_folder);
AppListItemView(const AppListItemView&) = delete;
AppListItemView& operator=(const AppListItemView&) = delete;
~AppListItemView() override;
// Sets the icon of this image.
......@@ -214,7 +214,6 @@ class APP_LIST_EXPORT AppListItemView : public views::Button,
void PaintButtonContents(gfx::Canvas* canvas) override;
// views::View overrides:
const char* GetClassName() const override;
void Layout() override;
gfx::Size CalculatePreferredSize() const override;
bool OnKeyPressed(const ui::KeyEvent& event) override;
......@@ -312,8 +311,6 @@ class APP_LIST_EXPORT AppListItemView : public views::Button,
const bool is_notification_indicator_enabled_;
base::WeakPtrFactory<AppListItemView> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(AppListItemView);
};
} // namespace ash
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment