Commit da0fbc1c authored by kylechar's avatar kylechar Committed by Commit Bot

Move Ozone X11 files into ui/ozone/platform/x11

This CL moves implementation files for Ozone X11 into a more appropriate
location in ui/ozone/platform/x11, instead of ui/platform_window/x11.

Bug: 707406
Change-Id: If5673cc5283bb523eb5b8b1a8aa4d0b97133ea94
Reviewed-on: https://chromium-review.googlesource.com/941481Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539920}
parent e9531123
...@@ -18,14 +18,21 @@ source_set("x11") { ...@@ -18,14 +18,21 @@ source_set("x11") {
"ozone_platform_x11.h", "ozone_platform_x11.h",
"x11_cursor_factory_ozone.cc", "x11_cursor_factory_ozone.cc",
"x11_cursor_factory_ozone.h", "x11_cursor_factory_ozone.h",
"x11_cursor_ozone.cc",
"x11_cursor_ozone.h",
"x11_surface_factory.cc", "x11_surface_factory.cc",
"x11_surface_factory.h", "x11_surface_factory.h",
"x11_window_manager_ozone.cc",
"x11_window_manager_ozone.h",
"x11_window_ozone.cc",
"x11_window_ozone.h",
] ]
deps = [ deps = [
"//base", "//base",
"//skia", "//skia",
"//ui/base", "//ui/base",
"//ui/base/x",
"//ui/display/manager", "//ui/display/manager",
"//ui/events", "//ui/events",
"//ui/events/devices", "//ui/events/devices",
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
#include "ui/ozone/common/stub_overlay_manager.h" #include "ui/ozone/common/stub_overlay_manager.h"
#include "ui/ozone/platform/x11/x11_cursor_factory_ozone.h" #include "ui/ozone/platform/x11/x11_cursor_factory_ozone.h"
#include "ui/ozone/platform/x11/x11_surface_factory.h" #include "ui/ozone/platform/x11/x11_surface_factory.h"
#include "ui/ozone/platform/x11/x11_window_manager_ozone.h"
#include "ui/ozone/platform/x11/x11_window_ozone.h"
#include "ui/ozone/public/gpu_platform_support_host.h" #include "ui/ozone/public/gpu_platform_support_host.h"
#include "ui/ozone/public/input_controller.h" #include "ui/ozone/public/input_controller.h"
#include "ui/ozone/public/ozone_platform.h" #include "ui/ozone/public/ozone_platform.h"
#include "ui/platform_window/platform_window.h" #include "ui/platform_window/platform_window.h"
#include "ui/platform_window/x11/x11_window_manager_ozone.h"
#include "ui/platform_window/x11/x11_window_ozone.h"
namespace ui { namespace ui {
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
#include "base/macros.h" #include "base/macros.h"
#include "ui/base/cursor/cursor.h" #include "ui/base/cursor/cursor.h"
#include "ui/gfx/x/x11.h" #include "ui/gfx/x/x11.h"
#include "ui/ozone/platform/x11/x11_cursor_ozone.h"
#include "ui/ozone/public/cursor_factory_ozone.h" #include "ui/ozone/public/cursor_factory_ozone.h"
#include "ui/platform_window/x11/x11_cursor_ozone.h"
namespace ui { namespace ui {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "ui/platform_window/x11/x11_cursor_ozone.h" #include "ui/ozone/platform/x11/x11_cursor_ozone.h"
#include "base/logging.h" #include "base/logging.h"
#include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkBitmap.h"
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef UI_PLATFORM_WINDOW_X11_X11_CURSOR_OZONE_H_ #ifndef UI_OZONE_PLATFORM_X11_X11_CURSOR_OZONE_H_
#define UI_PLATFORM_WINDOW_X11_X11_CURSOR_OZONE_H_ #define UI_OZONE_PLATFORM_X11_X11_CURSOR_OZONE_H_
#include <vector> #include <vector>
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "ui/base/cursor/cursor.h" #include "ui/base/cursor/cursor.h"
#include "ui/gfx/x/x11.h" #include "ui/gfx/x/x11.h"
#include "ui/platform_window/x11/x11_window_export.h"
class SkBitmap; class SkBitmap;
...@@ -23,8 +22,7 @@ namespace ui { ...@@ -23,8 +22,7 @@ namespace ui {
// Ref counted class to hold an X11 cursor resource. Handles creating X11 cursor // Ref counted class to hold an X11 cursor resource. Handles creating X11 cursor
// resources from SkBitmap/hotspot and clears the X11 resources on destruction. // resources from SkBitmap/hotspot and clears the X11 resources on destruction.
class X11_WINDOW_EXPORT X11CursorOzone class X11CursorOzone : public base::RefCounted<X11CursorOzone> {
: public base::RefCounted<X11CursorOzone> {
public: public:
X11CursorOzone(const SkBitmap& bitmap, const gfx::Point& hotspot); X11CursorOzone(const SkBitmap& bitmap, const gfx::Point& hotspot);
X11CursorOzone(const std::vector<SkBitmap>& bitmaps, X11CursorOzone(const std::vector<SkBitmap>& bitmaps,
...@@ -34,7 +32,7 @@ class X11_WINDOW_EXPORT X11CursorOzone ...@@ -34,7 +32,7 @@ class X11_WINDOW_EXPORT X11CursorOzone
// Creates a new cursor that is invisible. // Creates a new cursor that is invisible.
static scoped_refptr<X11CursorOzone> CreateInvisible(); static scoped_refptr<X11CursorOzone> CreateInvisible();
::Cursor xcursor() const { return xcursor_; } XID xcursor() const { return xcursor_; }
private: private:
friend class base::RefCounted<X11CursorOzone>; friend class base::RefCounted<X11CursorOzone>;
...@@ -42,10 +40,11 @@ class X11_WINDOW_EXPORT X11CursorOzone ...@@ -42,10 +40,11 @@ class X11_WINDOW_EXPORT X11CursorOzone
X11CursorOzone(); X11CursorOzone();
~X11CursorOzone(); ~X11CursorOzone();
::Cursor xcursor_ = x11::None; XID xcursor_ = x11::None;
DISALLOW_COPY_AND_ASSIGN(X11CursorOzone); DISALLOW_COPY_AND_ASSIGN(X11CursorOzone);
}; };
} // namespace ui } // namespace ui
#endif // UI_PLATFORM_WINDOW_X11_X11_CURSOR_OZONE_H_
#endif // UI_OZONE_PLATFORM_X11_X11_CURSOR_OZONE_H_
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "ui/platform_window/x11/x11_window_manager_ozone.h" #include "ui/ozone/platform/x11/x11_window_manager_ozone.h"
#include "ui/ozone/platform/x11/x11_window_ozone.h"
namespace ui { namespace ui {
......
...@@ -2,17 +2,16 @@ ...@@ -2,17 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef UI_PLATFORM_WINDOW_X11_X11_WINDOW_MANAGER_OZONE_H_ #ifndef UI_OZONE_PLATFORM_X11_X11_WINDOW_MANAGER_OZONE_H_
#define UI_PLATFORM_WINDOW_X11_X11_WINDOW_MANAGER_OZONE_H_ #define UI_OZONE_PLATFORM_X11_X11_WINDOW_MANAGER_OZONE_H_
#include "base/macros.h" #include "base/macros.h"
#include "ui/platform_window/x11/x11_window_export.h"
namespace ui { namespace ui {
class X11WindowOzone; class X11WindowOzone;
class X11_WINDOW_EXPORT X11WindowManagerOzone { class X11WindowManagerOzone {
public: public:
X11WindowManagerOzone(); X11WindowManagerOzone();
~X11WindowManagerOzone(); ~X11WindowManagerOzone();
...@@ -35,4 +34,4 @@ class X11_WINDOW_EXPORT X11WindowManagerOzone { ...@@ -35,4 +34,4 @@ class X11_WINDOW_EXPORT X11WindowManagerOzone {
} // namespace ui } // namespace ui
#endif // UI_PLATFORM_WINDOW_X11_X11_WINDOW_MANAGER_OZONE_H_ #endif // UI_OZONE_PLATFORM_X11_X11_WINDOW_MANAGER_OZONE_H_
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "ui/platform_window/x11/x11_window_ozone.h" #include "ui/ozone/platform/x11/x11_window_ozone.h"
#include "base/bind.h" #include "base/bind.h"
#include "ui/events/event.h" #include "ui/events/event.h"
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#include "ui/events/platform/x11/x11_event_source.h" #include "ui/events/platform/x11/x11_event_source.h"
#include "ui/gfx/geometry/point.h" #include "ui/gfx/geometry/point.h"
#include "ui/gfx/x/x11.h" #include "ui/gfx/x/x11.h"
#include "ui/platform_window/x11/x11_cursor_ozone.h" #include "ui/ozone/platform/x11/x11_cursor_ozone.h"
#include "ui/platform_window/x11/x11_window_manager_ozone.h" #include "ui/ozone/platform/x11/x11_window_manager_ozone.h"
namespace ui { namespace ui {
......
...@@ -2,23 +2,22 @@ ...@@ -2,23 +2,22 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef UI_PLATFORM_WINDOW_X11_X11_WINDOW_OZONE_H_ #ifndef UI_OZONE_PLATFORM_X11_X11_WINDOW_OZONE_H_
#define UI_PLATFORM_WINDOW_X11_X11_WINDOW_OZONE_H_ #define UI_OZONE_PLATFORM_X11_X11_WINDOW_OZONE_H_
#include "base/macros.h" #include "base/macros.h"
#include "ui/events/platform/platform_event_dispatcher.h" #include "ui/events/platform/platform_event_dispatcher.h"
#include "ui/events/platform/x11/x11_event_source_libevent.h" #include "ui/events/platform/x11/x11_event_source_libevent.h"
#include "ui/platform_window/x11/x11_window_base.h" #include "ui/platform_window/x11/x11_window_base.h"
#include "ui/platform_window/x11/x11_window_export.h"
namespace ui { namespace ui {
class X11WindowManagerOzone; class X11WindowManagerOzone;
// PlatformWindow implementation for X11 Ozone. PlatformEvents are ui::Events. // PlatformWindow implementation for X11 Ozone. PlatformEvents are ui::Events.
class X11_WINDOW_EXPORT X11WindowOzone : public X11WindowBase, class X11WindowOzone : public X11WindowBase,
public PlatformEventDispatcher, public PlatformEventDispatcher,
public XEventDispatcher { public XEventDispatcher {
public: public:
X11WindowOzone(X11WindowManagerOzone* window_manager, X11WindowOzone(X11WindowManagerOzone* window_manager,
PlatformWindowDelegate* delegate, PlatformWindowDelegate* delegate,
...@@ -54,4 +53,4 @@ class X11_WINDOW_EXPORT X11WindowOzone : public X11WindowBase, ...@@ -54,4 +53,4 @@ class X11_WINDOW_EXPORT X11WindowOzone : public X11WindowBase,
} // namespace ui } // namespace ui
#endif // UI_PLATFORM_WINDOW_X11_X11_WINDOW_OZONE_H_ #endif // UI_OZONE_PLATFORM_X11_X11_WINDOW_OZONE_H_
...@@ -34,20 +34,7 @@ jumbo_component("x11") { ...@@ -34,20 +34,7 @@ jumbo_component("x11") {
"x11_window_export.h", "x11_window_export.h",
] ]
if (ozone_platform_x11) { if (use_x11) {
sources += [
"x11_cursor_ozone.cc",
"x11_cursor_ozone.h",
"x11_window_manager_ozone.cc",
"x11_window_manager_ozone.h",
"x11_window_ozone.cc",
"x11_window_ozone.h",
]
deps += [
"//ui/base",
"//ui/base/x",
]
} else if (use_x11) {
sources += [ sources += [
"x11_window.cc", "x11_window.cc",
"x11_window.h", "x11_window.h",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment