From 1a8304ec9a7b9bd8a29f2f0455416f427b021bcc Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Tue, 14 Jul 2015 00:21:34 -0700 Subject: [PATCH] Delete //sky/services/platform There's no longer any code to share in this library. Instead, inline the one trival class into both //sky/shell and //services/sky. TBR=eseidel@google.com Review URL: https://codereview.chromium.org/1237043002 . --- engine/web/BUILD.gn | 2 -- services/platform/BUILD.gn | 20 ------------------- shell/BUILD.gn | 3 ++- shell/ui/engine.cc | 2 +- .../platform => shell/ui}/platform_impl.cc | 6 ++++-- .../platform => shell/ui}/platform_impl.h | 12 +++++------ 6 files changed, 12 insertions(+), 33 deletions(-) delete mode 100644 services/platform/BUILD.gn rename {services/platform => shell/ui}/platform_impl.cc (77%) rename {services/platform => shell/ui}/platform_impl.h (78%) diff --git a/engine/web/BUILD.gn b/engine/web/BUILD.gn index ed4020b1d95..5d21211c60f 100644 --- a/engine/web/BUILD.gn +++ b/engine/web/BUILD.gn @@ -2,8 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -visibility = [ "//sky/*" ] - component("web") { output_name = "sky_web" diff --git a/services/platform/BUILD.gn b/services/platform/BUILD.gn deleted file mode 100644 index 3a376767b6e..00000000000 --- a/services/platform/BUILD.gn +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2015 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. - -source_set("platform") { - sources = [ - "platform_impl.cc", - "platform_impl.h", - ] - - deps = [ - "//base", - "//mojo/common", - "//mojo/public/cpp/bindings", - "//mojo/public/cpp/system", - "//mojo/public/cpp/utility", - "//sky/engine", - "//url", - ] -} diff --git a/shell/BUILD.gn b/shell/BUILD.gn index 96c676cad90..88c9d682365 100644 --- a/shell/BUILD.gn +++ b/shell/BUILD.gn @@ -20,7 +20,6 @@ common_deps = [ "//sky/engine/tonic", "//sky/engine/wtf", "//sky/services/engine:interfaces", - "//sky/services/platform", "//sky/shell/dart", "//ui/gfx/geometry", "//ui/gl", @@ -56,6 +55,8 @@ source_set("common") { "ui/input_event_converter.h", "ui/internals.cc", "ui/internals.h", + "ui/platform_impl.cc", + "ui/platform_impl.h", "ui_delegate.cc", "ui_delegate.h", ] diff --git a/shell/ui/engine.cc b/shell/ui/engine.cc index 62d3f5b98d9..f5f42f0a18d 100644 --- a/shell/ui/engine.cc +++ b/shell/ui/engine.cc @@ -15,13 +15,13 @@ #include "sky/engine/public/platform/sky_display_metrics.h" #include "sky/engine/public/platform/sky_display_metrics.h" #include "sky/engine/public/web/Sky.h" -#include "sky/services/platform/platform_impl.h" #include "sky/shell/dart/dart_library_provider_files.h" #include "sky/shell/dart/dart_library_provider_network.h" #include "sky/shell/service_provider.h" #include "sky/shell/ui/animator.h" #include "sky/shell/ui/input_event_converter.h" #include "sky/shell/ui/internals.h" +#include "sky/shell/ui/platform_impl.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkPictureRecorder.h" diff --git a/services/platform/platform_impl.cc b/shell/ui/platform_impl.cc similarity index 77% rename from services/platform/platform_impl.cc rename to shell/ui/platform_impl.cc index 8eaa29f49a2..dca0039fd3c 100644 --- a/services/platform/platform_impl.cc +++ b/shell/ui/platform_impl.cc @@ -1,10 +1,11 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. +// Copyright 2015 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 "sky/services/platform/platform_impl.h" +#include "sky/shell/ui/platform_impl.h" namespace sky { +namespace shell { PlatformImpl::PlatformImpl() : main_thread_task_runner_(base::MessageLoop::current()->task_runner()) { @@ -21,4 +22,5 @@ base::SingleThreadTaskRunner* PlatformImpl::mainThreadTaskRunner() { return main_thread_task_runner_.get(); } +} // namespace shell } // namespace sky diff --git a/services/platform/platform_impl.h b/shell/ui/platform_impl.h similarity index 78% rename from services/platform/platform_impl.h rename to shell/ui/platform_impl.h index 737edd4a02f..669e8c2b312 100644 --- a/services/platform/platform_impl.h +++ b/shell/ui/platform_impl.h @@ -2,17 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ -#define SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ +#ifndef SKY_SHELL_UI_PLATFORM_IMPL_H_ +#define SKY_SHELL_UI_PLATFORM_IMPL_H_ #include "base/message_loop/message_loop.h" #include "sky/engine/public/platform/Platform.h" -namespace mojo { -class ApplicationImpl; -} - namespace sky { +namespace shell { class PlatformImpl : public blink::Platform { public: @@ -29,6 +26,7 @@ class PlatformImpl : public blink::Platform { DISALLOW_COPY_AND_ASSIGN(PlatformImpl); }; +} // namespace shell } // namespace sky -#endif // SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ +#endif // SKY_SHELL_UI_PLATFORM_IMPL_H_