| Index: athena/main/athena_main.cc
|
| diff --git a/athena/main/athena_main.cc b/athena/main/athena_main.cc
|
| index d50330e237bed0f1bf118af7868ccc9051f40e27..8d966b39de81b0d0fdd47841d591df6fab33bd95 100644
|
| --- a/athena/main/athena_main.cc
|
| +++ b/athena/main/athena_main.cc
|
| @@ -29,6 +29,7 @@
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/keyboard/keyboard_controller.h"
|
| #include "ui/keyboard/keyboard_controller_observer.h"
|
| +#include "ui/views/views_delegate.h"
|
| #include "ui/wm/core/visibility_controller.h"
|
|
|
| namespace {
|
| @@ -74,6 +75,21 @@ class AthenaDesktopController : public extensions::ShellDesktopController {
|
| DISALLOW_COPY_AND_ASSIGN(AthenaDesktopController);
|
| };
|
|
|
| +class AthenaViewsDelegate : public views::ViewsDelegate {
|
| + public:
|
| + AthenaViewsDelegate() {}
|
| + virtual ~AthenaViewsDelegate() {}
|
| +
|
| + private:
|
| + // views::ViewsDelegate:
|
| + virtual void OnBeforeWidgetInit(
|
| + views::Widget::InitParams* params,
|
| + views::internal::NativeWidgetDelegate* delegate) OVERRIDE {
|
| + }
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(AthenaViewsDelegate);
|
| +};
|
| +
|
| class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate {
|
| public:
|
| AthenaBrowserMainDelegate() {}
|
| @@ -100,6 +116,8 @@ class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate {
|
| extension_system->LoadApp(app_absolute_dir);
|
| }
|
|
|
| + views::ViewsDelegate::views_delegate = &views_delegate_;
|
| +
|
| athena::StartAthena(
|
| extensions::ShellDesktopController::instance()->host()->window(),
|
| new athena::ContentActivityFactory(),
|
| @@ -116,6 +134,8 @@ class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate {
|
| virtual void Shutdown() OVERRIDE {
|
| keyboard_observer_.reset();
|
| athena::ShutdownAthena();
|
| +
|
| + views::ViewsDelegate::views_delegate = NULL;
|
| }
|
|
|
| virtual extensions::ShellDesktopController* CreateDesktopController()
|
| @@ -128,6 +148,7 @@ class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate {
|
| }
|
|
|
| private:
|
| + AthenaViewsDelegate views_delegate_;
|
| scoped_ptr<VirtualKeyboardObserver> keyboard_observer_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate);
|
|
|