diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/aura/desktop.cc | 9 | ||||
-rw-r--r-- | ui/aura/desktop.h | 4 | ||||
-rw-r--r-- | ui/aura_shell/examples/window_type_launcher.h | 1 |
3 files changed, 13 insertions, 1 deletions
diff --git a/ui/aura/desktop.cc b/ui/aura/desktop.cc index 43d76ba..6364836 100644 --- a/ui/aura/desktop.cc +++ b/ui/aura/desktop.cc @@ -132,6 +132,15 @@ void Desktop::WindowDestroying(Window* window) { SetActiveWindow(GetTopmostWindowToActivate(window), NULL); } +bool Desktop::DispatchNativeEvent(const ui::NativeEvent& event) { + // TODO(oshima): consolidate windows and linux. +#if defined(OS_WIN) + return host_->Dispatch(event); +#else + return host_->Dispatch(event) != base::MessagePumpDispatcher::EVENT_IGNORED; +#endif +} + Window* Desktop::GetTopmostWindowToActivate(Window* ignore) { Window::Windows windows(default_parent_->children()); for (Window::Windows::const_reverse_iterator i = windows.rbegin(); diff --git a/ui/aura/desktop.h b/ui/aura/desktop.h index 1af4b8f..dcbea6d 100644 --- a/ui/aura/desktop.h +++ b/ui/aura/desktop.h @@ -12,6 +12,7 @@ #include "ui/aura/aura_export.h" #include "ui/aura/cursor.h" #include "ui/aura/root_window.h" +#include "ui/base/events.h" #include "ui/gfx/compositor/compositor.h" #include "ui/gfx/native_widget_types.h" @@ -91,6 +92,9 @@ class AURA_EXPORT Desktop : public ui::CompositorDelegate { // Invoked from RootWindow when |window| is being destroyed. void WindowDestroying(Window* window); + // Dispatch NativeEvent. + bool DispatchNativeEvent(const ui::NativeEvent& event); + static Desktop* GetInstance(); private: diff --git a/ui/aura_shell/examples/window_type_launcher.h b/ui/aura_shell/examples/window_type_launcher.h index 08cdff0..1f9ed5f 100644 --- a/ui/aura_shell/examples/window_type_launcher.h +++ b/ui/aura_shell/examples/window_type_launcher.h @@ -71,7 +71,6 @@ class WindowTypeLauncher : public views::WidgetDelegateView, views::NativeTextButton* create_button_; views::NativeTextButton* create_nonresizable_button_; views::NativeTextButton* bubble_button_; - views::NativeTextButton* tile_button_; views::NativeTextButton* lock_button_; scoped_ptr<views::MenuRunner> menu_runner_; |