// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ozone/ui/desktop_aura/desktop_factory_ozone_wayland.h"

#include "ozone/ui/desktop_aura/desktop_screen_wayland.h"
#include "ozone/ui/desktop_aura/desktop_window_tree_host_ozone.cc"

namespace views {

DesktopWindowTreeHost* DesktopFactoryOzoneWayland::CreateWindowTreeHost(
    internal::NativeWidgetDelegate* native_widget_delegate,
    DesktopNativeWidgetAura* desktop_native_widget_aura) {
  return new DesktopWindowTreeHostOzone(native_widget_delegate,
                                        desktop_native_widget_aura);
}

gfx::Screen* DesktopFactoryOzoneWayland::CreateDesktopScreen() {
  return new DesktopScreenWayland;
}

DesktopFactoryOzone* CreateDesktopFactoryOzoneWayland() {
  return new DesktopFactoryOzoneWayland;
}

}  // namespace views

// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ozone/ui/desktop_aura/desktop_factory_ozone_wayland.h"

#include "ozone/ui/desktop_aura/desktop_screen_wayland.h"
#include "ozone/ui/desktop_aura/desktop_window_tree_host_ozone.h"

namespace views {

DesktopWindowTreeHost* DesktopFactoryOzoneWayland::CreateWindowTreeHost(
    internal::NativeWidgetDelegate* native_widget_delegate,
    DesktopNativeWidgetAura* desktop_native_widget_aura) {
  return new DesktopWindowTreeHostOzone(native_widget_delegate,
                                        desktop_native_widget_aura);
}

gfx::Screen* DesktopFactoryOzoneWayland::CreateDesktopScreen() {
  return new DesktopScreenWayland;
}

DesktopFactoryOzone* CreateDesktopFactoryOzoneWayland() {
  return new DesktopFactoryOzoneWayland;
}

}  // namespace views

Fix multiple definition link error
Fix multiple definition link error

Include desktop_window_tree_host_ozone header instead of its implementation
in desktop_factory_ozone_wayland.cc to solve the following link issue:

  obj/ozone/ui/desktop_aura/views.desktop_window_tree_host_ozone.o: In function `views::DesktopWindowTreeHostOzone::AsWindowTreeHost()':
  src/ozone/ui/desktop_aura/desktop_window_tree_host_ozone.cc:239: multiple definition of `views::DesktopWindowTreeHostOzone::AsWindowTreeHost()'
  src/ozone/ui/desktop_aura/desktop_window_tree_host_ozone.cc:239: first defined here
  obj/ozone/ui/desktop_aura/views.desktop_window_tree_host_ozone.o: In function `views::DesktopWindowTreeHostOzone::ShowMaximizedWithBounds(gfx::Rect const&)':
  src/ozone/ui/desktop_aura/desktop_window_tree_host_ozone.cc:268: multiple definition of `views::DesktopWindowTreeHostOzone::ShowMaximizedWithBounds(gfx::Rect const&)'
  src/ozone/ui/desktop_aura/desktop_window_tree_host_ozone.cc:268: first defined here
  [...]
