Commit 51f2c6e4 authored by Peter Kasting's avatar Peter Kasting Committed by Chromium LUCI CQ

Add metadata for classes in c/b/ui/views/infobars.

Bug: 1159562
Change-Id: If07c17aa6b0045f40b3942f7a70f819d32089dc7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2614847
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarAllen Bauer <kylixrd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841097}
parent 5c70c738
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "ui/gfx/canvas.h" #include "ui/gfx/canvas.h"
#include "ui/gfx/skia_paint_util.h" #include "ui/gfx/skia_paint_util.h"
#include "ui/views/bubble/bubble_border.h" #include "ui/views/bubble/bubble_border.h"
#include "ui/views/metadata/metadata_impl_macros.h"
namespace { namespace {
...@@ -51,9 +52,6 @@ void ContentShadow::OnPaint(gfx::Canvas* canvas) { ...@@ -51,9 +52,6 @@ void ContentShadow::OnPaint(gfx::Canvas* canvas) {
} // namespace } // namespace
// static
const char InfoBarContainerView::kViewClassName[] = "InfoBarContainerView";
InfoBarContainerView::InfoBarContainerView(Delegate* delegate) InfoBarContainerView::InfoBarContainerView(Delegate* delegate)
: infobars::InfoBarContainer(delegate), : infobars::InfoBarContainer(delegate),
content_shadow_(new ContentShadow()) { content_shadow_(new ContentShadow()) {
...@@ -83,10 +81,6 @@ void InfoBarContainerView::Layout() { ...@@ -83,10 +81,6 @@ void InfoBarContainerView::Layout() {
content_shadow_->GetPreferredSize().height()); content_shadow_->GetPreferredSize().height());
} }
const char* InfoBarContainerView::GetClassName() const {
return kViewClassName;
}
void InfoBarContainerView::GetAccessibleNodeData(ui::AXNodeData* node_data) { void InfoBarContainerView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
node_data->role = ax::mojom::Role::kGroup; node_data->role = ax::mojom::Role::kGroup;
node_data->SetName(l10n_util::GetStringUTF8(IDS_ACCNAME_INFOBAR_CONTAINER)); node_data->SetName(l10n_util::GetStringUTF8(IDS_ACCNAME_INFOBAR_CONTAINER));
...@@ -142,3 +136,6 @@ void InfoBarContainerView::PlatformSpecificInfoBarStateChanged( ...@@ -142,3 +136,6 @@ void InfoBarContainerView::PlatformSpecificInfoBarStateChanged(
infobar->SchedulePaint(); infobar->SchedulePaint();
} }
} }
BEGIN_METADATA(InfoBarContainerView, views::AccessiblePaneView)
END_METADATA
...@@ -7,23 +7,23 @@ ...@@ -7,23 +7,23 @@
#include <stddef.h> #include <stddef.h>
#include "base/macros.h"
#include "components/infobars/core/infobar_container.h" #include "components/infobars/core/infobar_container.h"
#include "ui/views/accessible_pane_view.h" #include "ui/views/accessible_pane_view.h"
#include "ui/views/metadata/metadata_header_macros.h"
#include "ui/views/view_targeter_delegate.h" #include "ui/views/view_targeter_delegate.h"
// The views-specific implementation of InfoBarContainer. // The views-specific implementation of InfoBarContainer.
class InfoBarContainerView : public views::AccessiblePaneView, class InfoBarContainerView : public views::AccessiblePaneView,
public infobars::InfoBarContainer { public infobars::InfoBarContainer {
public: public:
static const char kViewClassName[]; METADATA_HEADER(InfoBarContainerView);
explicit InfoBarContainerView(Delegate* delegate); explicit InfoBarContainerView(Delegate* delegate);
InfoBarContainerView(const InfoBarContainerView&) = delete;
InfoBarContainerView& operator=(const InfoBarContainerView&) = delete;
~InfoBarContainerView() override; ~InfoBarContainerView() override;
// views::AccessiblePaneView: // views::AccessiblePaneView:
void Layout() override; void Layout() override;
const char* GetClassName() const override;
void GetAccessibleNodeData(ui::AXNodeData* node_data) override; void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
gfx::Size CalculatePreferredSize() const override; gfx::Size CalculatePreferredSize() const override;
...@@ -38,8 +38,6 @@ class InfoBarContainerView : public views::AccessiblePaneView, ...@@ -38,8 +38,6 @@ class InfoBarContainerView : public views::AccessiblePaneView,
// lowest infobar. A separate view with a layer is used so it can // lowest infobar. A separate view with a layer is used so it can
// draw outside the bounds of |this|. // draw outside the bounds of |this|.
views::View* content_shadow_; views::View* content_shadow_;
DISALLOW_COPY_AND_ASSIGN(InfoBarContainerView);
}; };
#endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_CONTAINER_VIEW_H_ #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_CONTAINER_VIEW_H_
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