Cleanup unused #includes and declarations in PlatformImpl

These aren't needed anymore. Also, use more |override|.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/892053002
This commit is contained in:
Adam Barth 2015-02-01 13:40:42 -08:00
parent bf14e27aca
commit 2f39655a37
5 changed files with 11 additions and 53 deletions

View File

@ -189,20 +189,6 @@ public:
// Returns a value such as "en-US".
virtual WebString defaultLocale() { return WebString(); }
// Wall clock time in seconds since the epoch.
virtual double currentTime() { return 0; }
// Monotonically increasing time in seconds from an arbitrary fixed point in the past.
// This function is expected to return at least millisecond-precision values. For this reason,
// it is recommended that the fixed point be no further in the past than the epoch.
virtual double monotonicallyIncreasingTime() { return 0; }
// Delayed work is driven by a shared timer.
typedef void (*SharedTimerFunction)();
virtual void setSharedTimerFiredFunction(SharedTimerFunction timerFunction) { }
virtual void setSharedTimerFireInterval(double) { }
virtual void stopSharedTimer() { }
virtual base::SingleThreadTaskRunner* mainThreadTaskRunner() { return 0; }

View File

@ -4,16 +4,6 @@
#include "sky/engine/testing/platform/platform_impl.h"
#include <cmath>
#include "base/rand_util.h"
#include "base/stl_util.h"
#include "base/synchronization/waitable_event.h"
#include "base/time/time.h"
#include "net/base/data_url.h"
#include "net/base/mime_util.h"
#include "net/base/net_errors.h"
namespace sky {
PlatformImpl::PlatformImpl() {

View File

@ -5,10 +5,6 @@
#ifndef SKY_ENGINE_TESTING_PLATFORM_PLATFORM_IMPL_H_
#define SKY_ENGINE_TESTING_PLATFORM_PLATFORM_IMPL_H_
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/threading/thread_local_storage.h"
#include "base/timer/timer.h"
#include "sky/engine/public/platform/Platform.h"
#include "sky/engine/testing/platform/webunittestsupport_impl.h"
@ -16,12 +12,12 @@ namespace sky {
class PlatformImpl : public blink::Platform {
public:
explicit PlatformImpl();
virtual ~PlatformImpl();
PlatformImpl();
~PlatformImpl() override;
// blink::Platform methods:
virtual blink::WebUnitTestSupport* unitTestSupport();
virtual blink::WebString defaultLocale();
blink::WebString defaultLocale() override;
blink::WebUnitTestSupport* unitTestSupport() override;
private:
WebUnitTestSupportImpl unit_test_support_;

View File

@ -4,24 +4,14 @@
#include "sky/viewer/platform/platform_impl.h"
#include <cmath>
#include "base/debug/trace_event.h"
#include "base/rand_util.h"
#include "base/stl_util.h"
#include "base/synchronization/waitable_event.h"
#include "base/time/time.h"
#include "mojo/public/cpp/application/application_impl.h"
#include "net/base/data_url.h"
#include "net/base/mime_util.h"
#include "net/base/net_errors.h"
#include "sky/viewer/platform/weburlloader_impl.h"
namespace sky {
PlatformImpl::PlatformImpl(mojo::ApplicationImpl* app)
: main_loop_(base::MessageLoop::current()),
main_thread_task_runner_(base::MessageLoop::current()->task_runner()) {
: main_thread_task_runner_(base::MessageLoop::current()->task_runner()) {
app->ConnectToService("mojo:network_service", &network_service_);
}

View File

@ -5,10 +5,7 @@
#ifndef SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_
#define SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/threading/thread_local_storage.h"
#include "base/timer/timer.h"
#include "mojo/services/network/public/interfaces/network_service.mojom.h"
#include "sky/engine/public/platform/Platform.h"
@ -21,18 +18,17 @@ namespace sky {
class PlatformImpl : public blink::Platform {
public:
explicit PlatformImpl(mojo::ApplicationImpl* app);
virtual ~PlatformImpl();
~PlatformImpl() override;
// blink::Platform methods:
virtual blink::WebString defaultLocale();
virtual base::SingleThreadTaskRunner* mainThreadTaskRunner();
virtual mojo::NetworkService* networkService();
virtual blink::WebURLLoader* createURLLoader();
virtual blink::WebURLError cancelledError(const blink::WebURL& url) const;
blink::WebString defaultLocale() override;
base::SingleThreadTaskRunner* mainThreadTaskRunner() override;
mojo::NetworkService* networkService() override;
blink::WebURLLoader* createURLLoader() override;
blink::WebURLError cancelledError(const blink::WebURL& url) const override;
private:
mojo::NetworkServicePtr network_service_;
base::MessageLoop* main_loop_;
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
DISALLOW_COPY_AND_ASSIGN(PlatformImpl);