| 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 #include "sky/viewer/platform/platform_impl.h" | 5 #include "sky/viewer/platform/platform_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 } | 146 } |
| 147 | 147 |
| 148 blink::WebCompositorSupport* PlatformImpl::compositorSupport() { | 148 blink::WebCompositorSupport* PlatformImpl::compositorSupport() { |
| 149 return &compositor_support_; | 149 return &compositor_support_; |
| 150 } | 150 } |
| 151 | 151 |
| 152 blink::WebScrollbarBehavior* PlatformImpl::scrollbarBehavior() { | 152 blink::WebScrollbarBehavior* PlatformImpl::scrollbarBehavior() { |
| 153 return &scrollbar_behavior_; | 153 return &scrollbar_behavior_; |
| 154 } | 154 } |
| 155 | 155 |
| 156 mojo::NetworkService* PlatformImpl::networkService() { |
| 157 return network_service_.get(); |
| 158 } |
| 159 |
| 156 blink::WebURLLoader* PlatformImpl::createURLLoader() { | 160 blink::WebURLLoader* PlatformImpl::createURLLoader() { |
| 157 return new WebURLLoaderImpl(network_service_.get()); | 161 return new WebURLLoaderImpl(network_service_.get()); |
| 158 } | 162 } |
| 159 | 163 |
| 160 blink::WebData PlatformImpl::parseDataURL( | 164 blink::WebData PlatformImpl::parseDataURL( |
| 161 const blink::WebURL& url, | 165 const blink::WebURL& url, |
| 162 blink::WebString& mimetype_out, | 166 blink::WebString& mimetype_out, |
| 163 blink::WebString& charset_out) { | 167 blink::WebString& charset_out) { |
| 164 std::string mimetype, charset, data; | 168 std::string mimetype, charset, data; |
| 165 if (net::DataURL::Parse(url, &mimetype, &charset, &data) | 169 if (net::DataURL::Parse(url, &mimetype, &charset, &data) |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 const unsigned char* category_group_enabled, | 285 const unsigned char* category_group_enabled, |
| 282 const char* name, | 286 const char* name, |
| 283 TraceEventHandle handle) { | 287 TraceEventHandle handle) { |
| 284 base::debug::TraceEventHandle traceEventHandle; | 288 base::debug::TraceEventHandle traceEventHandle; |
| 285 memcpy(&traceEventHandle, &handle, sizeof(handle)); | 289 memcpy(&traceEventHandle, &handle, sizeof(handle)); |
| 286 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION( | 290 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION( |
| 287 category_group_enabled, name, traceEventHandle); | 291 category_group_enabled, name, traceEventHandle); |
| 288 } | 292 } |
| 289 | 293 |
| 290 } // namespace sky | 294 } // namespace sky |
| OLD | NEW |