Commit 3753827a authored by David Black's avatar David Black Committed by Commit Bot

Removes Assistant horizontal page.

No longer needed.

Bug: b:111315529
Change-Id: Ic16af0891a296a535d67c46d43bc63eb86f6f6f1
Reviewed-on: https://chromium-review.googlesource.com/1132347
Commit-Queue: David Black <dmblack@google.com>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Reviewed-by: default avatarWeidong Guo <weidongg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574619}
parent 633097c2
......@@ -40,8 +40,6 @@ component("app_list") {
"views/apps_grid_view.cc",
"views/apps_grid_view.h",
"views/apps_grid_view_folder_delegate.h",
"views/assistant_container_view.cc",
"views/assistant_container_view.h",
"views/contents_view.cc",
"views/contents_view.h",
"views/expand_arrow_view.cc",
......
// 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/app_list/views/assistant_container_view.h"
#include "ash/app_list/views/app_list_view.h"
#include "ash/app_list/views/contents_view.h"
#include "ash/public/cpp/app_list/app_list_constants.h"
namespace app_list {
AssistantContainerView::AssistantContainerView(ContentsView* contents_view)
: contents_view_(contents_view) {}
gfx::Size AssistantContainerView::CalculatePreferredSize() const {
if (!GetWidget()) {
return gfx::Size();
}
return gfx::Size(contents_view_->GetDisplayWidth(),
contents_view_->GetDisplayHeight());
}
bool AssistantContainerView::ShouldShowSearchBox() const {
return false;
}
} // namespace app_list
// Copyright (c) 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.
#ifndef ASH_APP_LIST_VIEWS_ASSISTANT_CONTAINER_VIEW_H_
#define ASH_APP_LIST_VIEWS_ASSISTANT_CONTAINER_VIEW_H_
#include "ash/app_list/views/horizontal_page.h"
#include "base/macros.h"
namespace app_list {
class ContentsView;
class APP_LIST_EXPORT AssistantContainerView : public HorizontalPage {
public:
explicit AssistantContainerView(ContentsView* contents_view);
~AssistantContainerView() override = default;
// Overridden from views::View.
gfx::Size CalculatePreferredSize() const override;
// Overridden from HorizontalPage.
bool ShouldShowSearchBox() const override;
private:
ContentsView* const contents_view_; // Not owned.
DISALLOW_COPY_AND_ASSIGN(AssistantContainerView);
};
} // namespace app_list
#endif // ASH_APP_LIST_VIEWS_ASSISTANT_CONTAINER_VIEW_H_
......@@ -7,13 +7,11 @@
#include "ash/app_list/pagination_controller.h"
#include "ash/app_list/views/app_list_view.h"
#include "ash/app_list/views/apps_container_view.h"
#include "ash/app_list/views/assistant_container_view.h"
#include "ash/app_list/views/contents_view.h"
#include "ash/app_list/views/search_box_view.h"
#include "ash/app_list/views/search_result_page_view.h"
#include "ash/public/cpp/app_list/app_list_constants.h"
#include "base/strings/utf_string_conversions.h"
#include "chromeos/chromeos_switches.h"
#include "ui/chromeos/search_box/search_box_constants.h"
#include "ui/views/controls/label.h"
......@@ -29,11 +27,6 @@ HorizontalPageContainer::HorizontalPageContainer(ContentsView* contents_view,
&pagination_model_, PaginationController::SCROLL_AXIS_HORIZONTAL));
// Add horizontal pages.
if (chromeos::switches::IsAssistantEnabled()) {
assistant_container_view_ = new AssistantContainerView(contents_view_);
AddHorizontalPage(assistant_container_view_);
}
apps_container_view_ = new AppsContainerView(contents_view_, model);
AddHorizontalPage(apps_container_view_);
pagination_model_.SetTotalPages(horizontal_pages_.size());
......
......@@ -17,7 +17,6 @@
namespace app_list {
class AppsContainerView;
class AssistantContainerView;
class PaginationController;
class HorizontalPage;
......@@ -81,9 +80,6 @@ class APP_LIST_EXPORT HorizontalPageContainer : public AppListPage,
// Owned by view hierarchy:
AppsContainerView* apps_container_view_ = nullptr;
// Owned by view hierarchy:
AssistantContainerView* assistant_container_view_ = nullptr;
// The child page views. Owned by the views hierarchy.
std::vector<HorizontalPage*> horizontal_pages_;
......
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