Commit 49d02efe authored by Mike Wasserman's avatar Mike Wasserman Committed by Commit Bot

Fix app_list_demo compile and build in gn_all

I ran 'autoninja -c out/Default' and hit compile errors in app_list_demo.
AFAICT, app_list_demo is not built in gn_all (there's no path between them):
  gn path -C out/Default/ :gn_all //ui/app_list:app_list_demo
So, this target probably isn't built by the CQ and thus can break easily.

I fixed the errors and added the target to gn_all.

Bug: NONE
Test: 'autoninja -c out/Default' works; app_list_demo is built by bots
Change-Id: Ia1fb66e182a1dca2f1cd5abc236b20f98a3649a6
Reviewed-on: https://chromium-review.googlesource.com/902742Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534554}
parent 167a7f5e
...@@ -369,6 +369,7 @@ group("gn_all") { ...@@ -369,6 +369,7 @@ group("gn_all") {
"//chromeos:chromeos_unittests", "//chromeos:chromeos_unittests",
"//chromeos/components:chromeos_components_unittests", "//chromeos/components:chromeos_components_unittests",
"//components/session_manager/core", "//components/session_manager/core",
"//ui/app_list:app_list_demo",
"//ui/app_list:app_list_unittests", "//ui/app_list:app_list_unittests",
"//ui/app_list/presenter:app_list_presenter_unittests", "//ui/app_list/presenter:app_list_presenter_unittests",
"//ui/arc:ui_arc_unittests", "//ui/arc:ui_arc_unittests",
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <memory> #include <memory>
#include "base/bind.h" #include "base/bind.h"
#include "base/command_line.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/run_loop.h" #include "base/run_loop.h"
...@@ -22,8 +21,6 @@ ...@@ -22,8 +21,6 @@
namespace { namespace {
class AppListDemoService;
// Number of dummy apps to populate in the app list. // Number of dummy apps to populate in the app list.
const int kInitialItems = 20; const int kInitialItems = 20;
...@@ -57,7 +54,6 @@ app_list::AppListView* DemoAppListViewDelegate::InitView( ...@@ -57,7 +54,6 @@ app_list::AppListView* DemoAppListViewDelegate::InitView(
app_list::AppListView::InitParams params; app_list::AppListView::InitParams params;
params.parent = container; params.parent = container;
view_->Initialize(params); view_->Initialize(params);
view_->MaybeSetAnchorPoint(gfx::Point(300, 300));
// Populate some apps. // Populate some apps.
GetTestModel()->PopulateApps(kInitialItems); GetTestModel()->PopulateApps(kInitialItems);
...@@ -82,7 +78,8 @@ void DemoAppListViewDelegate::ViewClosing() { ...@@ -82,7 +78,8 @@ void DemoAppListViewDelegate::ViewClosing() {
base::RunLoop::QuitCurrentWhenIdleDeprecated(); base::RunLoop::QuitCurrentWhenIdleDeprecated();
} }
void ShowAppList(gfx::NativeWindow window_context) { void ShowAppList(content::BrowserContext* browser_context,
gfx::NativeWindow window_context) {
DemoAppListViewDelegate* delegate = new DemoAppListViewDelegate; DemoAppListViewDelegate* delegate = new DemoAppListViewDelegate;
app_list::AppListView* view = delegate->InitView(window_context); app_list::AppListView* view = delegate->InitView(window_context);
view->GetWidget()->Show(); view->GetWidget()->Show();
...@@ -93,7 +90,6 @@ void ShowAppList(gfx::NativeWindow window_context) { ...@@ -93,7 +90,6 @@ void ShowAppList(gfx::NativeWindow window_context) {
int main(int argc, const char** argv) { int main(int argc, const char** argv) {
ui::ViewsContentClient views_content_client(argc, argv); ui::ViewsContentClient views_content_client(argc, argv);
views_content_client.set_task(base::Bind(&ShowAppList)); views_content_client.set_task(base::Bind(&ShowAppList));
return views_content_client.RunMain(); return views_content_client.RunMain();
} }
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