Chromium Code Reviews| Index: athena/main/athena_main.cc |
| diff --git a/athena/main/athena_main.cc b/athena/main/athena_main.cc |
| index d50330e237bed0f1bf118af7868ccc9051f40e27..2bc59eaa950c22d68ad53f02427b510fbc29a116 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,20 @@ class AthenaDesktopController : public extensions::ShellDesktopController { |
| DISALLOW_COPY_AND_ASSIGN(AthenaDesktopController); |
| }; |
| +class AthenaViewsDelegate : public views::ViewsDelegate { |
| + public: |
| + AthenaViewsDelegate() {} |
| + virtual ~AthenaViewsDelegate() {} |
| + |
| + private: |
| + virtual void OnBeforeWidgetInit( |
|
sadrul
2014/07/25 20:43:14
// views::ViewsDelegate:
mohsen
2014/07/30 22:49:46
Done.
|
| + views::Widget::InitParams* params, |
| + views::internal::NativeWidgetDelegate* delegate) OVERRIDE { |
| + } |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AthenaViewsDelegate); |
| +}; |
| + |
| class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate { |
| public: |
| AthenaBrowserMainDelegate() {} |
| @@ -100,6 +115,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 +133,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 +147,7 @@ class AthenaBrowserMainDelegate : public extensions::ShellBrowserMainDelegate { |
| } |
| private: |
| + AthenaViewsDelegate views_delegate_; |
| scoped_ptr<VirtualKeyboardObserver> keyboard_observer_; |
| DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate); |