Move response processing out of UiElementContainerView.
This CL moves processing logic out of UiElementContainerView and into
AssistantResponseProcessor which is owned by
AssistantInteractionController.
The controller will now initiate processing of the Assistant response
before it is finalized. This cleans up the view logic considerably as
well as provides better synchronization of animations since processing
will have already occurred prior to the stage initiating a change.
Bug: b:117344968, b:116751668
Change-Id: I3ac1300978a3448fd7e244b6a7312ec9bf3c39bd
Reviewed-on: https://chromium-review.googlesource.com/c/1265820
Commit-Queue: David Black <[email protected]>
Reviewed-by: Xiaohui Chen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#599073}
diff --git a/ash/assistant/model/assistant_ui_element.cc b/ash/assistant/model/assistant_ui_element.cc
new file mode 100644
index 0000000..422af0e
--- /dev/null
+++ b/ash/assistant/model/assistant_ui_element.cc
@@ -0,0 +1,18 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/assistant/model/assistant_ui_element.h"
+
+namespace ash {
+
+// AssistantCardElement --------------------------------------------------------
+
+AssistantCardElement::AssistantCardElement(const std::string& html)
+ : AssistantUiElement(AssistantUiElementType::kCard),
+ html_(html),
+ id_token_(base::UnguessableToken::Create()) {}
+
+AssistantCardElement::~AssistantCardElement() = default;
+
+} // namespace ash