Commit 67614c49 authored by wutao's avatar wutao Committed by Commit Bot

LogoView: Rename stub LogoView class to StubLogoView

This cl renames the stub LogoView class to StubLogoView in order to add
the real LogoView class.

Bug: b/79999539
Test: manual.
Change-Id: Ie606143eb73e20f4c44e67f43b5cd132a055f39b
Reviewed-on: https://chromium-review.googlesource.com/1067879Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Commit-Queue: Tao Wu <wutao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560683}
parent 1df94b66
...@@ -112,8 +112,8 @@ component("ash") { ...@@ -112,8 +112,8 @@ component("ash") {
"assistant/ui/dialog_plate/action_view.h", "assistant/ui/dialog_plate/action_view.h",
"assistant/ui/dialog_plate/dialog_plate.cc", "assistant/ui/dialog_plate/dialog_plate.cc",
"assistant/ui/dialog_plate/dialog_plate.h", "assistant/ui/dialog_plate/dialog_plate.h",
"assistant/ui/dialog_plate/logo_view.cc", "assistant/ui/dialog_plate/stub_logo_view.cc",
"assistant/ui/dialog_plate/logo_view.h", "assistant/ui/dialog_plate/stub_logo_view.h",
"assistant/ui/suggestion_container_view.cc", "assistant/ui/suggestion_container_view.cc",
"assistant/ui/suggestion_container_view.h", "assistant/ui/suggestion_container_view.h",
"autoclick/autoclick_controller.cc", "autoclick/autoclick_controller.cc",
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <memory> #include <memory>
#include "ash/assistant/assistant_controller.h" #include "ash/assistant/assistant_controller.h"
#include "ash/assistant/ui/dialog_plate/logo_view.h" #include "ash/assistant/ui/dialog_plate/stub_logo_view.h"
#include "ash/resources/vector_icons/vector_icons.h" #include "ash/resources/vector_icons/vector_icons.h"
#include "ui/gfx/color_palette.h" #include "ui/gfx/color_palette.h"
#include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/paint_vector_icon.h"
...@@ -28,7 +28,7 @@ ActionView::ActionView(AssistantController* assistant_controller, ...@@ -28,7 +28,7 @@ ActionView::ActionView(AssistantController* assistant_controller,
: assistant_controller_(assistant_controller), : assistant_controller_(assistant_controller),
listener_(listener), listener_(listener),
keyboard_action_view_(new views::ImageView()), keyboard_action_view_(new views::ImageView()),
voice_action_view_(new LogoView()) { voice_action_view_(new StubLogoView()) {
InitLayout(); InitLayout();
UpdateState(); UpdateState();
...@@ -105,10 +105,10 @@ void ActionView::UpdateState() { ...@@ -105,10 +105,10 @@ void ActionView::UpdateState() {
switch (interaction_model->mic_state()) { switch (interaction_model->mic_state()) {
case MicState::kClosed: case MicState::kClosed:
voice_action_view_->SetState(LogoView::State::kMic); voice_action_view_->SetState(StubLogoView::State::kMic);
break; break;
case MicState::kOpen: case MicState::kOpen:
voice_action_view_->SetState(LogoView::State::kListening); voice_action_view_->SetState(StubLogoView::State::kListening);
break; break;
} }
......
...@@ -17,7 +17,7 @@ namespace ash { ...@@ -17,7 +17,7 @@ namespace ash {
class ActionView; class ActionView;
class AssistantController; class AssistantController;
class LogoView; class StubLogoView;
// Listener which receives notification of action view events. // Listener which receives notification of action view events.
class ActionViewListener { class ActionViewListener {
...@@ -55,7 +55,7 @@ class ActionView : public views::View, ...@@ -55,7 +55,7 @@ class ActionView : public views::View,
ActionViewListener* listener_; ActionViewListener* listener_;
views::ImageView* keyboard_action_view_; // Owned by view hierarchy. views::ImageView* keyboard_action_view_; // Owned by view hierarchy.
LogoView* voice_action_view_; // Owned by view hierarchy. StubLogoView* voice_action_view_; // Owned by view hierarchy.
DISALLOW_COPY_AND_ASSIGN(ActionView); DISALLOW_COPY_AND_ASSIGN(ActionView);
}; };
......
...@@ -2,18 +2,14 @@ ...@@ -2,18 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "ash/assistant/ui/dialog_plate/logo_view.h" #include "ash/assistant/ui/dialog_plate/stub_logo_view.h"
#include "ash/resources/vector_icons/vector_icons.h" #include "ash/resources/vector_icons/vector_icons.h"
#include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/paint_vector_icon.h"
namespace ash { namespace ash {
LogoView::LogoView() = default; void StubLogoView::SetState(State state) {
LogoView::~LogoView() = default;
void LogoView::SetState(State state) {
switch (state) { switch (state) {
case State::kUndefined: case State::kUndefined:
SetImage(gfx::ImageSkia()); SetImage(gfx::ImageSkia());
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef ASH_ASSISTANT_UI_DIALOG_PLATE_LOGO_VIEW_H_ #ifndef ASH_ASSISTANT_UI_DIALOG_PLATE_STUB_LOGO_VIEW_H_
#define ASH_ASSISTANT_UI_DIALOG_PLATE_LOGO_VIEW_H_ #define ASH_ASSISTANT_UI_DIALOG_PLATE_STUB_LOGO_VIEW_H_
#include "base/macros.h" #include "base/macros.h"
#include "ui/views/controls/image_view.h" #include "ui/views/controls/image_view.h"
...@@ -12,7 +12,7 @@ namespace ash { ...@@ -12,7 +12,7 @@ namespace ash {
// TODO(b/78191547): Remove this class once the actual LogoView library port // TODO(b/78191547): Remove this class once the actual LogoView library port
// has been completed. This class is only a temporary placeholder. // has been completed. This class is only a temporary placeholder.
class LogoView : public views::ImageView { class StubLogoView : public views::ImageView {
public: public:
enum class State { enum class State {
kUndefined, kUndefined,
...@@ -20,15 +20,16 @@ class LogoView : public views::ImageView { ...@@ -20,15 +20,16 @@ class LogoView : public views::ImageView {
kMic, kMic,
}; };
LogoView(); StubLogoView() = default;
~LogoView() override;
~StubLogoView() override = default;
void SetState(State state); void SetState(State state);
private: private:
DISALLOW_COPY_AND_ASSIGN(LogoView); DISALLOW_COPY_AND_ASSIGN(StubLogoView);
}; };
} // namespace ash } // namespace ash
#endif // ASH_ASSISTANT_UI_DIALOG_PLATE_LOGO_VIEW_H_ #endif // ASH_ASSISTANT_UI_DIALOG_PLATE_STUB_LOGO_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