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

views-posse: Add metadata to AppListFolderView

Bug: 1159562
Test: build
Change-Id: I0f58340c04160dd7e13956bc8d5806cceb893afa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2631005
Commit-Queue: Sara Kato <sarakato@chromium.org>
Auto-Submit: Sara Kato <sarakato@chromium.org>
Reviewed-by: default avatarYury Khmel <khmel@chromium.org>
Reviewed-by: default avatarAllen Bauer <kylixrd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844407}
parent 863198b5
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "ui/views/animation/animation_delegate_views.h" #include "ui/views/animation/animation_delegate_views.h"
#include "ui/views/controls/label.h" #include "ui/views/controls/label.h"
#include "ui/views/controls/textfield/textfield.h" #include "ui/views/controls/textfield/textfield.h"
#include "ui/views/metadata/metadata_impl_macros.h"
#include "ui/views/painter.h" #include "ui/views/painter.h"
#include "ui/views/view_model.h" #include "ui/views/view_model.h"
#include "ui/views/view_model_utils.h" #include "ui/views/view_model_utils.h"
...@@ -569,10 +570,6 @@ bool AppListFolderView::OnKeyPressed(const ui::KeyEvent& event) { ...@@ -569,10 +570,6 @@ bool AppListFolderView::OnKeyPressed(const ui::KeyEvent& event) {
return false; return false;
} }
const char* AppListFolderView::GetClassName() const {
return "AppListFolderView";
}
void AppListFolderView::OnAppListItemWillBeDeleted(AppListItem* item) { void AppListFolderView::OnAppListItemWillBeDeleted(AppListItem* item) {
if (item == folder_item_) { if (item == folder_item_) {
items_grid_view_->OnFolderItemRemoved(); items_grid_view_->OnFolderItemRemoved();
...@@ -898,4 +895,7 @@ void AppListFolderView::CreateOpenOrCloseFolderAccessibilityEvent(bool open) { ...@@ -898,4 +895,7 @@ void AppListFolderView::CreateOpenOrCloseFolderAccessibilityEvent(bool open) {
announcement_view->NotifyAccessibilityEvent(ax::mojom::Event::kAlert, true); announcement_view->NotifyAccessibilityEvent(ax::mojom::Event::kAlert, true);
} }
BEGIN_METADATA(AppListFolderView, views::View)
END_METADATA
} // namespace ash } // namespace ash
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
#include "ash/app_list/views/apps_grid_view_folder_delegate.h" #include "ash/app_list/views/apps_grid_view_folder_delegate.h"
#include "ash/app_list/views/folder_header_view.h" #include "ash/app_list/views/folder_header_view.h"
#include "ash/app_list/views/folder_header_view_delegate.h" #include "ash/app_list/views/folder_header_view_delegate.h"
#include "base/macros.h"
#include "base/optional.h" #include "base/optional.h"
#include "ui/compositor/throughput_tracker.h" #include "ui/compositor/throughput_tracker.h"
#include "ui/views/controls/button/button.h" #include "ui/views/controls/button/button.h"
#include "ui/views/metadata/metadata_header_macros.h"
#include "ui/views/view.h" #include "ui/views/view.h"
#include "ui/views/view_model.h" #include "ui/views/view_model.h"
...@@ -35,9 +35,13 @@ class APP_LIST_EXPORT AppListFolderView : public views::View, ...@@ -35,9 +35,13 @@ class APP_LIST_EXPORT AppListFolderView : public views::View,
public AppListModelObserver, public AppListModelObserver,
public AppsGridViewFolderDelegate { public AppsGridViewFolderDelegate {
public: public:
METADATA_HEADER(AppListFolderView);
AppListFolderView(AppsContainerView* container_view, AppListFolderView(AppsContainerView* container_view,
AppListModel* model, AppListModel* model,
ContentsView* contents_view); ContentsView* contents_view);
AppListFolderView(const AppListFolderView&) = delete;
AppListFolderView& operator=(const AppListFolderView&) = delete;
~AppListFolderView() override; ~AppListFolderView() override;
// An interface for the folder opening and closing animations. // An interface for the folder opening and closing animations.
...@@ -69,7 +73,6 @@ class APP_LIST_EXPORT AppListFolderView : public views::View, ...@@ -69,7 +73,6 @@ class APP_LIST_EXPORT AppListFolderView : public views::View,
gfx::Size CalculatePreferredSize() const override; gfx::Size CalculatePreferredSize() const override;
void Layout() override; void Layout() override;
bool OnKeyPressed(const ui::KeyEvent& event) override; bool OnKeyPressed(const ui::KeyEvent& event) override;
const char* GetClassName() const override;
// AppListModelObserver // AppListModelObserver
void OnAppListItemWillBeDeleted(AppListItem* item) override; void OnAppListItemWillBeDeleted(AppListItem* item) override;
...@@ -193,8 +196,6 @@ class APP_LIST_EXPORT AppListFolderView : public views::View, ...@@ -193,8 +196,6 @@ class APP_LIST_EXPORT AppListFolderView : public views::View,
// Records smoothness of the folder show/hide animation. // Records smoothness of the folder show/hide animation.
base::Optional<ui::ThroughputTracker> show_hide_metrics_tracker_; base::Optional<ui::ThroughputTracker> show_hide_metrics_tracker_;
DISALLOW_COPY_AND_ASSIGN(AppListFolderView);
}; };
} // namespace ash } // 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