Commit 171aad91 authored by anthonyvd's avatar anthonyvd Committed by Commit Bot

Revert "platform_window: Fix component builds"

This reverts commit 8229a222.

Reason for revert: Tentatively reverting because it seems like a possible culprit for this tree-closing failure: https://ci.chromium.org/p/chromium/builders/ci/fuchsia-x64-dbg/2029

Original change's description:
> platform_window: Fix component builds
> 
> The platform_window target is used from multiple components and should
> therefore be a component itself. This is needed to avoid ODR violations.
> 
> One ODR problem that currently can happen is the duplication of the
> global boolean backing UseTestConfigForPlatformWindows().
> 
> Bug: 1019015
> 
> Change-Id: I935df9a2fb2c6df1fec887c45c332bc833db91b9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1889293
> Reviewed-by: Scott Violet <sky@chromium.org>
> Commit-Queue: Michael Spang <spang@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#710905}

TBR=sky@chromium.org,spang@chromium.org

Change-Id: I2c39a3dd1655cd20273ee82778b2421628b6fac9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1019015
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1891330Reviewed-by: default avataranthonyvd <anthonyvd@chromium.org>
Commit-Queue: anthonyvd <anthonyvd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710924}
parent 423c2e99
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
import("//build/config/ui.gni") import("//build/config/ui.gni")
component("platform_window") { source_set("platform_window") {
sources = [ sources = [
"platform_window_base.cc", "platform_window_base.cc",
"platform_window_base.h", "platform_window_base.h",
...@@ -15,8 +15,6 @@ component("platform_window") { ...@@ -15,8 +15,6 @@ component("platform_window") {
"platform_window_init_properties.h", "platform_window_init_properties.h",
] ]
defines = [ "IS_PLATFORM_WINDOW_IMPL" ]
deps = [ deps = [
"//base", "//base",
"//ui/base", "//ui/base",
......
...@@ -4,17 +4,7 @@ ...@@ -4,17 +4,7 @@
import("//build/config/ui.gni") import("//build/config/ui.gni")
assert(is_linux) source_set("common") {
component("common") {
output_name = "platform_window_common"
defines = [ "IS_PLATFORM_WINDOW_COMMON_IMPL" ]
public_deps = [
"//base",
]
sources = [ sources = [
"platform_window_defaults.cc", "platform_window_defaults.cc",
"platform_window_defaults.h", "platform_window_defaults.h",
......
...@@ -5,14 +5,12 @@ ...@@ -5,14 +5,12 @@
#ifndef UI_PLATFORM_WINDOW_COMMON_PLATFORM_WINDOW_DEFAULTS_H_ #ifndef UI_PLATFORM_WINDOW_COMMON_PLATFORM_WINDOW_DEFAULTS_H_
#define UI_PLATFORM_WINDOW_COMMON_PLATFORM_WINDOW_DEFAULTS_H_ #define UI_PLATFORM_WINDOW_COMMON_PLATFORM_WINDOW_DEFAULTS_H_
#include "base/component_export.h"
namespace ui { namespace ui {
// Returns true if PlatformWindow should use test configuration. Will return // Returns true if PlatformWindow should use test configuration. Will return
// false by default, unless test::EnableTestConfigForPlatformWindows() has been // false by default, unless test::EnableTestConfigForPlatformWindows() has been
// called, then it will return true. // called, then it will return true.
COMPONENT_EXPORT(PLATFORM_WINDOW_COMMON) bool UseTestConfigForPlatformWindows(); bool UseTestConfigForPlatformWindows();
namespace test { namespace test {
...@@ -24,7 +22,6 @@ namespace test { ...@@ -24,7 +22,6 @@ namespace test {
// various tests, otherwise the call to Show() blocks because it never receives // various tests, otherwise the call to Show() blocks because it never receives
// the MapNotify event. It is unclear why this is necessary, but might be // the MapNotify event. It is unclear why this is necessary, but might be
// related to calls to XInitThreads(). // related to calls to XInitThreads().
COMPONENT_EXPORT(PLATFORM_WINDOW_COMMON)
void EnableTestConfigForPlatformWindows(); void EnableTestConfigForPlatformWindows();
} // namespace test } // namespace test
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <memory> #include <memory>
#include "base/component_export.h"
#include "base/strings/string16.h" #include "base/strings/string16.h"
#include "ui/base/class_property.h" #include "ui/base/class_property.h"
#include "ui/base/cursor/cursor.h" #include "ui/base/cursor/cursor.h"
...@@ -29,8 +28,7 @@ namespace ui { ...@@ -29,8 +28,7 @@ namespace ui {
// //
// Each instance of PlatformWindowBase represents a single window in the // Each instance of PlatformWindowBase represents a single window in the
// underlying platform windowing system (i.e. X11/Win/OSX). // underlying platform windowing system (i.e. X11/Win/OSX).
class COMPONENT_EXPORT(PLATFORM_WINDOW) PlatformWindowBase class PlatformWindowBase : public PropertyHandler {
: public PropertyHandler {
public: public:
PlatformWindowBase(); PlatformWindowBase();
~PlatformWindowBase() override; ~PlatformWindowBase() override;
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#ifndef UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_BASE_H_ #ifndef UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_BASE_H_
#define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_BASE_H_ #define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_BASE_H_
#include "base/component_export.h"
#include "base/optional.h" #include "base/optional.h"
#include "ui/gfx/native_widget_types.h" #include "ui/gfx/native_widget_types.h"
...@@ -29,7 +28,7 @@ enum class PlatformWindowState { ...@@ -29,7 +28,7 @@ enum class PlatformWindowState {
// This is the bare minimum for PlatformWindowDeelegate, but some platforms may // This is the bare minimum for PlatformWindowDeelegate, but some platforms may
// require more, and should do so in a subclass. Please refer to // require more, and should do so in a subclass. Please refer to
// PlatformWindowDelegateLinux for an example. // PlatformWindowDelegateLinux for an example.
class COMPONENT_EXPORT(PLATFORM_WINDOW) PlatformWindowDelegateBase { class PlatformWindowDelegateBase {
public: public:
PlatformWindowDelegateBase(); PlatformWindowDelegateBase();
virtual ~PlatformWindowDelegateBase(); virtual ~PlatformWindowDelegateBase();
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#ifndef UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_LINUX_H_ #ifndef UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_LINUX_H_
#define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_LINUX_H_ #define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_DELEGATE_LINUX_H_
#include "base/component_export.h"
#include "ui/base/buildflags.h" #include "ui/base/buildflags.h"
#include "ui/platform_window/platform_window_delegate_base.h" #include "ui/platform_window/platform_window_delegate_base.h"
...@@ -24,8 +23,7 @@ namespace ui { ...@@ -24,8 +23,7 @@ namespace ui {
// This is an optional linux delegate interface, which should be implemented by // This is an optional linux delegate interface, which should be implemented by
// linux-based platforms. It contains both Wayland and X11 specific and common // linux-based platforms. It contains both Wayland and X11 specific and common
// interfaces. // interfaces.
class COMPONENT_EXPORT(PLATFORM_WINDOW) PlatformWindowDelegateLinux class PlatformWindowDelegateLinux : public PlatformWindowDelegateBase {
: public PlatformWindowDelegateBase {
public: public:
PlatformWindowDelegateLinux(); PlatformWindowDelegateLinux();
~PlatformWindowDelegateLinux() override; ~PlatformWindowDelegateLinux() override;
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <string> #include <string>
#include "base/component_export.h"
#include "base/optional.h" #include "base/optional.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rect.h"
...@@ -41,7 +40,7 @@ enum class PlatformWindowOpacity { ...@@ -41,7 +40,7 @@ enum class PlatformWindowOpacity {
// Initial properties which are passed to PlatformWindow to be initialized // Initial properties which are passed to PlatformWindow to be initialized
// with a desired set of properties. // with a desired set of properties.
struct COMPONENT_EXPORT(PLATFORM_WINDOW) PlatformWindowInitProperties { struct PlatformWindowInitProperties {
PlatformWindowInitProperties(); PlatformWindowInitProperties();
// Initializes properties with the specified |bounds|. // Initializes properties with the specified |bounds|.
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#ifndef UI_PLATFORM_WINDOW_PLATFORM_WINDOW_LINUX_H_ #ifndef UI_PLATFORM_WINDOW_PLATFORM_WINDOW_LINUX_H_
#define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_LINUX_H_ #define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_LINUX_H_
#include "base/component_export.h"
#include "base/optional.h" #include "base/optional.h"
#include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rect.h"
#include "ui/platform_window/platform_window_base.h" #include "ui/platform_window/platform_window_base.h"
...@@ -13,8 +12,7 @@ ...@@ -13,8 +12,7 @@
namespace ui { namespace ui {
// Linux extensions to the PlatformWindowBase. // Linux extensions to the PlatformWindowBase.
class COMPONENT_EXPORT(PLATFORM_WINDOW) PlatformWindowLinux class PlatformWindowLinux : public PlatformWindowBase {
: public PlatformWindowBase {
public: public:
PlatformWindowLinux(); PlatformWindowLinux();
~PlatformWindowLinux() override; ~PlatformWindowLinux() override;
......
...@@ -5,14 +5,12 @@ ...@@ -5,14 +5,12 @@
#ifndef UI_PLATFORM_WINDOW_PLATFORM_WINDOW_WIN_H_ #ifndef UI_PLATFORM_WINDOW_PLATFORM_WINDOW_WIN_H_
#define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_WIN_H_ #define UI_PLATFORM_WINDOW_PLATFORM_WINDOW_WIN_H_
#include "base/component_export.h"
#include "ui/platform_window/platform_window_base.h" #include "ui/platform_window/platform_window_base.h"
namespace ui { namespace ui {
// Windows extensions to the PlatformWindowBase. // Windows extensions to the PlatformWindowBase.
class COMPONENT_EXPORT(PLATFORM_WINDOW) PlatformWindowWin class PlatformWindowWin : public PlatformWindowBase {
: public PlatformWindowBase {
public: public:
PlatformWindowWin() = default; PlatformWindowWin() = default;
~PlatformWindowWin() override = default; ~PlatformWindowWin() override = default;
......
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