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

views-posse ash/ambient/ui

Bug: crbug.com/1159562
Change-Id: Ifffe7c432a6516fad11ce5175073f20f6073915e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612288Reviewed-by: default avatarJeroen Dhollander <jeroendh@chromium.org>
Reviewed-by: default avatarAllen Bauer <kylixrd@chromium.org>
Commit-Queue: Sara Kato <sarakato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840881}
parent 33a34647
......@@ -25,6 +25,7 @@
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/metadata/metadata_impl_macros.h"
namespace ash {
......@@ -58,10 +59,6 @@ AmbientAssistantContainerView::~AmbientAssistantContainerView() {
AssistantUiController::Get()->GetModel()->RemoveObserver(this);
}
const char* AmbientAssistantContainerView::GetClassName() const {
return "AmbientAssistantContainerView";
}
void AmbientAssistantContainerView::OnAssistantControllerDestroying() {
AssistantUiController::Get()->GetModel()->RemoveObserver(this);
assistant_controller_observer_.Remove(AssistantController::Get());
......@@ -146,4 +143,6 @@ void AmbientAssistantContainerView::InitLayout() {
avatar_view_->SetClipPath(circular_mask);
}
BEGIN_METADATA(AmbientAssistantContainerView, views::View)
END_METADATA
} // namespace ash
......@@ -27,12 +27,11 @@ class AmbientAssistantContainerView : public views::View,
public AssistantControllerObserver,
public AssistantUiModelObserver {
public:
METADATA_HEADER(AmbientAssistantContainerView);
AmbientAssistantContainerView();
~AmbientAssistantContainerView() override;
// views::View:
const char* GetClassName() const override;
// AssistantControllerObserver:
void OnAssistantControllerDestroying() override;
......@@ -58,7 +57,6 @@ class AmbientAssistantContainerView : public views::View,
ScopedObserver<AssistantController, AssistantControllerObserver>
assistant_controller_observer_{this};
DISALLOW_COPY_AND_ASSIGN(AmbientAssistantContainerView);
};
} // namespace ash
......
......@@ -17,6 +17,7 @@
#include "ash/strings/grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/metadata/metadata_impl_macros.h"
namespace ash {
......@@ -35,10 +36,6 @@ AmbientAssistantDialogPlate::~AmbientAssistantDialogPlate() {
AssistantInteractionController::Get()->GetModel()->RemoveObserver(this);
}
const char* AmbientAssistantDialogPlate::GetClassName() const {
return "AmbientAssistantDialogPlate";
}
void AmbientAssistantDialogPlate::OnButtonPressed(AssistantButtonId button_id) {
delegate_->OnDialogPlateButtonPressed(button_id);
}
......@@ -75,4 +72,7 @@ void AmbientAssistantDialogPlate::InitLayout() {
voice_query_view_ = AddChildView(std::make_unique<AssistantQueryView>());
}
BEGIN_METADATA(AmbientAssistantDialogPlate, views::View)
END_METADATA
} // namespace ash
......@@ -24,12 +24,11 @@ class AmbientAssistantDialogPlate : public views::View,
public AssistantControllerObserver,
public AssistantInteractionModelObserver {
public:
METADATA_HEADER(AmbientAssistantDialogPlate);
explicit AmbientAssistantDialogPlate(AssistantViewDelegate* delegate);
~AmbientAssistantDialogPlate() override;
// views::View:
const char* GetClassName() const override;
// AssistantButtonListener:
void OnButtonPressed(AssistantButtonId button_id) override;
......@@ -52,7 +51,6 @@ class AmbientAssistantDialogPlate : public views::View,
ScopedObserver<AssistantController, AssistantControllerObserver>
assistant_controller_observer_{this};
DISALLOW_COPY_AND_ASSIGN(AmbientAssistantDialogPlate);
};
} // namespace ash
......
......@@ -17,6 +17,7 @@
#include "chromeos/services/assistant/public/cpp/features.h"
#include "ui/aura/window.h"
#include "ui/views/background.h"
#include "ui/views/metadata/metadata_impl_macros.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
......@@ -39,10 +40,6 @@ AmbientContainerView::AmbientContainerView(AmbientViewDelegate* delegate)
AmbientContainerView::~AmbientContainerView() = default;
const char* AmbientContainerView::GetClassName() const {
return "AmbientContainerView";
}
gfx::Size AmbientContainerView::CalculatePreferredSize() const {
// TODO(b/139953389): Handle multiple displays.
return GetWidget()->GetNativeWindow()->GetRootWindow()->bounds().size();
......@@ -87,4 +84,7 @@ void AmbientContainerView::LayoutAssistantView() {
gfx::Rect(0, 0, preferred_width, preferred_height));
}
BEGIN_METADATA(AmbientContainerView, views::View)
END_METADATA
} // namespace ash
......@@ -21,11 +21,11 @@ class PhotoView;
// weather info.
class ASH_EXPORT AmbientContainerView : public views::View {
public:
METADATA_HEADER(AmbientContainerView);
explicit AmbientContainerView(AmbientViewDelegate* delegate);
~AmbientContainerView() override;
// views::View:
const char* GetClassName() const override;
gfx::Size CalculatePreferredSize() const override;
void Layout() override;
......@@ -46,7 +46,6 @@ class ASH_EXPORT AmbientContainerView : public views::View {
PhotoView* photo_view_ = nullptr;
AmbientAssistantContainerView* ambient_assistant_container_view_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(AmbientContainerView);
};
} // 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