| 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 1d3cbd7f8773b6c052e5c2115c3bec5ea79338c5..9f76c9584f0f2ab93cab6859ac26c818678ac5d3 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"
|
| @@ -50,6 +51,17 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
| DesktopNativeWidgetAura* desktop_native_widget_aura);
|
| ~DesktopWindowTreeHostX11() override;
|
|
|
| + class ScopedHandle {
|
| + public:
|
| + explicit ScopedHandle(const base::Closure& destroy_callback);
|
| + ~ScopedHandle();
|
| + void CancelCallback();
|
| +
|
| + private:
|
| + base::Closure destroy_callback_;
|
| + DISALLOW_COPY_AND_ASSIGN(ScopedHandle);
|
| + };
|
| +
|
| // A way of converting an X11 |xid| host window into a |content_window_|.
|
| static aura::Window* GetContentWindowForXID(XID xid);
|
|
|
| @@ -86,6 +98,13 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
| // internal list of open windows.
|
| static void CleanUpWindowList(void (*func)(aura::Window* window));
|
|
|
| + // Disables event listening to make |dialog| modal.
|
| + std::unique_ptr<ScopedHandle> DisableEventListening(XID dialog);
|
| +
|
| + // 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,
|
| @@ -246,6 +265,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
| gfx::Rect ToDIPRect(const gfx::Rect& rect_in_pixels) const;
|
| gfx::Rect ToPixelRect(const gfx::Rect& rect_in_dip) const;
|
|
|
| + // Enables event listening after closing |dialog|.
|
| + void EnableEventListening();
|
| +
|
| // X11 things
|
| // The display and the native X window hosting the root window.
|
| XDisplay* xdisplay_;
|
| @@ -348,6 +370,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
|
|
| base::CancelableCallback<void()> delayed_resize_task_;
|
|
|
| + std::unique_ptr<aura::ScopedWindowTargeter> targeter_for_modal_;
|
| +
|
| + XID modal_dialog_xid_;
|
| +
|
| + ScopedHandle* scoped_handle_;
|
| +
|
| base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11);
|
|
|