OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ | 5 #ifndef SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ |
6 #define SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ | 6 #define SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ |
7 | 7 |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "mojo/services/network/public/interfaces/network_service.mojom.h" | |
10 #include "sky/engine/public/platform/Platform.h" | 9 #include "sky/engine/public/platform/Platform.h" |
11 | 10 |
12 namespace mojo { | 11 namespace mojo { |
13 class ApplicationImpl; | 12 class ApplicationImpl; |
14 } | 13 } |
15 | 14 |
16 namespace sky { | 15 namespace sky { |
17 | 16 |
18 class PlatformImpl : public blink::Platform { | 17 class PlatformImpl : public blink::Platform { |
19 public: | 18 public: |
20 explicit PlatformImpl(mojo::NetworkServicePtr network_service); | 19 explicit PlatformImpl(); |
21 ~PlatformImpl() override; | 20 ~PlatformImpl() override; |
22 | 21 |
23 // blink::Platform methods: | 22 // blink::Platform methods: |
24 blink::WebString defaultLocale() override; | 23 blink::WebString defaultLocale() override; |
25 base::SingleThreadTaskRunner* mainThreadTaskRunner() override; | 24 base::SingleThreadTaskRunner* mainThreadTaskRunner() override; |
26 mojo::NetworkService* networkService() override; | |
27 blink::WebURLLoader* createURLLoader() override; | |
28 blink::WebURLError cancelledError(const blink::WebURL& url) const override; | |
29 | 25 |
30 private: | 26 private: |
31 mojo::NetworkServicePtr network_service_; | |
32 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 27 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
33 | 28 |
34 DISALLOW_COPY_AND_ASSIGN(PlatformImpl); | 29 DISALLOW_COPY_AND_ASSIGN(PlatformImpl); |
35 }; | 30 }; |
36 | 31 |
37 } // namespace sky | 32 } // namespace sky |
38 | 33 |
39 #endif // SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ | 34 #endif // SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ |
OLD | NEW |