| Index: ui/platform_window/x11/x11_window.h
|
| diff --git a/ui/platform_window/x11/x11_window.h b/ui/platform_window/x11/x11_window.h
|
| index 54bbed860829f9cb759bd6f66e3e3147d03a5c9b..c3f15cf9cdca9d8929460e92338a7258d08b1d4e 100644
|
| --- a/ui/platform_window/x11/x11_window.h
|
| +++ b/ui/platform_window/x11/x11_window.h
|
| @@ -5,86 +5,33 @@
|
| #ifndef UI_PLATFORM_WINDOW_X11_X11_WINDOW_H_
|
| #define UI_PLATFORM_WINDOW_X11_X11_WINDOW_H_
|
|
|
| -#include <stdint.h>
|
| -
|
| #include "base/macros.h"
|
| #include "ui/events/platform/platform_event_dispatcher.h"
|
| -#include "ui/gfx/geometry/rect.h"
|
| -#include "ui/gfx/x/x11_atom_cache.h"
|
| -#include "ui/platform_window/platform_window.h"
|
| -#include "ui/platform_window/platform_window_delegate.h"
|
| +#include "ui/platform_window/x11/x11_window_base.h"
|
| #include "ui/platform_window/x11/x11_window_export.h"
|
|
|
| -typedef struct _XDisplay XDisplay;
|
| -typedef unsigned long XID;
|
| -
|
| namespace ui {
|
|
|
| -class X11_WINDOW_EXPORT X11Window : public PlatformWindow,
|
| +// PlatformWindow implementation for X11. PlatformEvents are XEvents.
|
| +class X11_WINDOW_EXPORT X11Window : public X11WindowBase,
|
| public PlatformEventDispatcher {
|
| public:
|
| explicit X11Window(PlatformWindowDelegate* delegate);
|
| ~X11Window() override;
|
|
|
| - private:
|
| - void Destroy();
|
| -
|
| - void ProcessXInput2Event(XEvent* xevent);
|
| -
|
| // PlatformWindow:
|
| - void Show() override;
|
| - void Hide() override;
|
| - void Close() override;
|
| - void SetBounds(const gfx::Rect& bounds) override;
|
| - gfx::Rect GetBounds() override;
|
| - void SetTitle(const base::string16& title) override;
|
| - void SetCapture() override;
|
| - void ReleaseCapture() override;
|
| - void ToggleFullscreen() override;
|
| - void Maximize() override;
|
| - void Minimize() override;
|
| - void Restore() override;
|
| void SetCursor(PlatformCursor cursor) override;
|
| - void MoveCursorTo(const gfx::Point& location) override;
|
| - void ConfineCursorToBounds(const gfx::Rect& bounds) override;
|
| - PlatformImeController* GetPlatformImeController() override;
|
| +
|
| + private:
|
| + void ProcessXInput2Event(XEvent* xev);
|
|
|
| // PlatformEventDispatcher:
|
| bool CanDispatchEvent(const PlatformEvent& event) override;
|
| uint32_t DispatchEvent(const PlatformEvent& event) override;
|
|
|
| - PlatformWindowDelegate* delegate_;
|
| -
|
| - XDisplay* xdisplay_;
|
| - XID xwindow_;
|
| - XID xroot_window_;
|
| - X11AtomCache atom_cache_;
|
| -
|
| - base::string16 window_title_;
|
| -
|
| - // Setting the bounds is an asynchronous operation in X11. |requested_bounds_|
|
| - // is the bounds requested using XConfigureWindow, and |confirmed_bounds_| is
|
| - // the bounds the X11 server has set on the window.
|
| - gfx::Rect requested_bounds_;
|
| - gfx::Rect confirmed_bounds_;
|
| -
|
| - bool window_mapped_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(X11Window);
|
| };
|
|
|
| -namespace test {
|
| -
|
| -// Sets the value of the |override_redirect| flag when creating an X11 window.
|
| -// It is necessary to set this flag on for various tests, otherwise the call to
|
| -// X11Window::Show() blocks because it never receives the MapNotify event. It is
|
| -// unclear why this is necessary, but might be related to calls to
|
| -// XInitThreads().
|
| -X11_WINDOW_EXPORT void SetUseOverrideRedirectWindowByDefault(
|
| - bool override_redirect);
|
| -
|
| -} // namespace test
|
| -
|
| } // namespace ui
|
|
|
| #endif // UI_PLATFORM_WINDOW_X11_X11_WINDOW_H_
|
|
|