OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 , m_client(0) | 293 , m_client(0) |
294 { | 294 { |
295 ASSERT(m_frameImpl); | 295 ASSERT(m_frameImpl); |
296 } | 296 } |
297 | 297 |
298 AssociatedURLLoader::~AssociatedURLLoader() | 298 AssociatedURLLoader::~AssociatedURLLoader() |
299 { | 299 { |
300 cancel(); | 300 cancel(); |
301 } | 301 } |
302 | 302 |
303 #define STATIC_ASSERT_MATCHING_ENUM(webkit_name, webcore_name) \ | 303 #define STATIC_ASSERT_ENUM(a, b) \ |
304 static_assert(static_cast<int>(webkit_name) == static_cast<int>(webcore_name
), "mismatching enum values") | 304 static_assert(static_cast<int>(a) == static_cast<int>(b), \ |
| 305 "mismatching enum: " #a) |
305 | 306 |
306 STATIC_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::CrossOriginRequestPolicyDeny, D
enyCrossOriginRequests); | 307 STATIC_ASSERT_ENUM(WebURLLoaderOptions::CrossOriginRequestPolicyDeny, DenyCrossO
riginRequests); |
307 STATIC_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::CrossOriginRequestPolicyUseAcce
ssControl, UseAccessControl); | 308 STATIC_ASSERT_ENUM(WebURLLoaderOptions::CrossOriginRequestPolicyUseAccessControl
, UseAccessControl); |
308 STATIC_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::CrossOriginRequestPolicyAllow,
AllowCrossOriginRequests); | 309 STATIC_ASSERT_ENUM(WebURLLoaderOptions::CrossOriginRequestPolicyAllow, AllowCros
sOriginRequests); |
309 | 310 |
310 STATIC_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::ConsiderPreflight, ConsiderPref
light); | 311 STATIC_ASSERT_ENUM(WebURLLoaderOptions::ConsiderPreflight, ConsiderPreflight); |
311 STATIC_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::ForcePreflight, ForcePreflight)
; | 312 STATIC_ASSERT_ENUM(WebURLLoaderOptions::ForcePreflight, ForcePreflight); |
312 STATIC_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::PreventPreflight, PreventPrefli
ght); | 313 STATIC_ASSERT_ENUM(WebURLLoaderOptions::PreventPreflight, PreventPreflight); |
313 | 314 |
314 void AssociatedURLLoader::loadSynchronously(const WebURLRequest& request, WebURL
Response& response, WebURLError& error, WebData& data) | 315 void AssociatedURLLoader::loadSynchronously(const WebURLRequest& request, WebURL
Response& response, WebURLError& error, WebData& data) |
315 { | 316 { |
316 ASSERT(0); // Synchronous loading is not supported. | 317 ASSERT(0); // Synchronous loading is not supported. |
317 } | 318 } |
318 | 319 |
319 void AssociatedURLLoader::loadAsynchronously(const WebURLRequest& request, WebUR
LLoaderClient* client) | 320 void AssociatedURLLoader::loadAsynchronously(const WebURLRequest& request, WebUR
LLoaderClient* client) |
320 { | 321 { |
321 ASSERT(!m_loader); | 322 ASSERT(!m_loader); |
322 ASSERT(!m_client); | 323 ASSERT(!m_client); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 if (m_loader) | 382 if (m_loader) |
382 m_loader->setDefersLoading(defersLoading); | 383 m_loader->setDefersLoading(defersLoading); |
383 } | 384 } |
384 | 385 |
385 void AssociatedURLLoader::setLoadingTaskRunner(blink::WebTaskRunner*) | 386 void AssociatedURLLoader::setLoadingTaskRunner(blink::WebTaskRunner*) |
386 { | 387 { |
387 // TODO(alexclarke): Maybe support this one day if it proves worthwhile. | 388 // TODO(alexclarke): Maybe support this one day if it proves worthwhile. |
388 } | 389 } |
389 | 390 |
390 } // namespace blink | 391 } // namespace blink |
OLD | NEW |