| Index: ui/aura_shell/examples/aura_shell_main.cc
|
| diff --git a/ui/aura_shell/examples/aura_shell_main.cc b/ui/aura_shell/examples/aura_shell_main.cc
|
| index 07000479acb4fc1bdbe0fad1d1009ccfce42352d..5ab1ad025850876f9dd633f49770730b8205512e 100644
|
| --- a/ui/aura_shell/examples/aura_shell_main.cc
|
| +++ b/ui/aura_shell/examples/aura_shell_main.cc
|
| @@ -8,6 +8,8 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/message_loop.h"
|
| #include "ui/aura/root_window.h"
|
| +#include "ui/aura_shell/app_list/app_list_view.h"
|
| +#include "ui/aura_shell/examples/example_factory.h"
|
| #include "ui/aura_shell/examples/toplevel_window.h"
|
| #include "ui/aura_shell/launcher/launcher_types.h"
|
| #include "ui/aura_shell/shell.h"
|
| @@ -23,34 +25,6 @@
|
|
|
| namespace {
|
|
|
| -class AppListWindow : public views::WidgetDelegateView {
|
| - public:
|
| - AppListWindow() {
|
| - }
|
| -
|
| - // static
|
| - static views::Widget* Create(const gfx::Rect& bounds) {
|
| - AppListWindow* app_list = new AppListWindow;
|
| -
|
| - views::Widget::InitParams widget_params(
|
| - views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
|
| - widget_params.bounds = bounds;
|
| - widget_params.delegate = app_list;
|
| - widget_params.keep_on_top = true;
|
| - widget_params.transparent = true;
|
| -
|
| - views::Widget* widget = new views::Widget;
|
| - widget->Init(widget_params);
|
| - widget->SetContentsView(app_list);
|
| - return widget;
|
| - }
|
| -
|
| - // Overridden from views::View:
|
| - virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
|
| - canvas->FillRect(SkColorSetARGB(0x4F, 0xFF, 0, 0), bounds());
|
| - }
|
| -};
|
| -
|
| class ShellDelegateImpl : public aura_shell::ShellDelegate {
|
| public:
|
| ShellDelegateImpl() {
|
| @@ -70,7 +44,9 @@ class ShellDelegateImpl : public aura_shell::ShellDelegate {
|
| virtual void RequestAppListWidget(
|
| const gfx::Rect& bounds,
|
| const SetWidgetCallback& callback) OVERRIDE {
|
| - callback.Run(AppListWindow::Create(bounds));
|
| + // AppListView deletes itself on close.
|
| + new aura_shell::AppListView(
|
| + aura_shell::examples::CreateAppListModel(), bounds, callback);
|
| }
|
|
|
| virtual void LauncherItemClicked(
|
|
|