Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h |
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h |
index 7e842fed08646843dafbc444437beedc392d5980..afa0861976191970924819ad11fbbfdcbe018309 100644 |
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h |
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h |
@@ -15,6 +15,7 @@ |
#include "base/macros.h" |
#include "base/memory/weak_ptr.h" |
#include "base/observer_list.h" |
+#include "ui/aura/scoped_window_targeter.h" |
#include "ui/aura/window_tree_host.h" |
#include "ui/base/cursor/cursor_loader_x11.h" |
#include "ui/events/platform/platform_event_dispatcher.h" |
@@ -40,6 +41,16 @@ class DesktopWindowTreeHostObserverX11; |
class X11DesktopWindowMoveClient; |
class X11WindowEventFilter; |
+class ScopedHandle { |
+ public: |
+ explicit ScopedHandle(const base::Closure& destroy_callback); |
+ ~ScopedHandle(); |
+ |
+ private: |
+ base::Closure destroy_callback_; |
+ DISALLOW_COPY_AND_ASSIGN(ScopedHandle); |
+}; |
+ |
class VIEWS_EXPORT DesktopWindowTreeHostX11 |
: public DesktopWindowTreeHost, |
public aura::WindowTreeHost, |
@@ -86,6 +97,16 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 |
// internal list of open windows. |
static void CleanUpWindowList(void (*func)(aura::Window* window)); |
+ // Disables event listening to make |dialog| modal. |
+ scoped_ptr<ScopedHandle> DisableEventListening(XID dialog); |
+ |
+ // Enables event listening after closing |dialog|. |
+ void EnableEventListening(); |
+ |
+ // Returns XID of dialog currently displayed. When it returns 0, |
+ // there is no dialog on the host window. |
+ XID GetModalDialog(); |
+ |
protected: |
// Overridden from DesktopWindowTreeHost: |
void Init(aura::Window* content_window, |
@@ -348,6 +369,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 |
base::CancelableCallback<void()> delayed_resize_task_; |
+ scoped_ptr<aura::ScopedWindowTargeter> targeter_for_modal_; |
+ |
+ XID modal_dialog_xid_; |
+ |
base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_; |
DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); |