Index: athena/main/athena_launcher.cc |
diff --git a/athena/main/athena_launcher.cc b/athena/main/athena_launcher.cc |
index 4fa35a19bd732bd0e589cec4ac6e09964c1c940f..04b55a77f2981ad82955f8b15ebdfe329f1622e3 100644 |
--- a/athena/main/athena_launcher.cc |
+++ b/athena/main/athena_launcher.cc |
@@ -14,6 +14,7 @@ |
#include "athena/wm/public/window_manager.h" |
#include "base/memory/scoped_ptr.h" |
#include "ui/aura/window_property.h" |
+#include "ui/views/views_delegate.h" |
#include "ui/wm/core/visibility_controller.h" |
#if defined(USE_X11) |
@@ -37,12 +38,30 @@ DEFINE_OWNED_WINDOW_PROPERTY_KEY(athena::RootWindowState, |
kRootWindowStateKey, |
NULL); |
+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); |
+}; |
+ |
void StartAthena(aura::Window* root_window, |
athena::ActivityFactory* activity_factory, |
athena::AppModelBuilder* app_model_builder) { |
#if defined(USE_X11) |
ui::TouchFactory::SetTouchDeviceListFromCommandLine(); |
#endif |
+ |
+ views::ViewsDelegate::views_delegate = new AthenaViewsDelegate(); |
+ |
RootWindowState* root_window_state = new RootWindowState; |
root_window->SetProperty(kRootWindowStateKey, root_window_state); |
@@ -68,6 +87,8 @@ void ShutdownAthena() { |
athena::ScreenManager::Shutdown(); |
athena::InputManager::Shutdown(); |
athena::SystemUI::Shutdown(); |
+ |
+ delete views::ViewsDelegate::views_delegate; |
} |
} // namespace athena |