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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 #include "public/platform/WebString.h" | 47 #include "public/platform/WebString.h" |
48 #include "public/platform/WebURLError.h" | 48 #include "public/platform/WebURLError.h" |
49 #include "public/platform/WebURLLoaderClient.h" | 49 #include "public/platform/WebURLLoaderClient.h" |
50 #include "public/platform/WebURLRequest.h" | 50 #include "public/platform/WebURLRequest.h" |
51 #include "wtf/HashSet.h" | 51 #include "wtf/HashSet.h" |
52 #include "wtf/text/WTFString.h" | 52 #include "wtf/text/WTFString.h" |
53 | 53 |
54 using namespace WebCore; | 54 using namespace WebCore; |
55 using namespace WTF; | 55 using namespace WTF; |
56 | 56 |
57 namespace WebKit { | 57 namespace blink { |
58 | 58 |
59 namespace { | 59 namespace { |
60 | 60 |
61 class HTTPRequestHeaderValidator : public WebHTTPHeaderVisitor { | 61 class HTTPRequestHeaderValidator : public WebHTTPHeaderVisitor { |
62 WTF_MAKE_NONCOPYABLE(HTTPRequestHeaderValidator); | 62 WTF_MAKE_NONCOPYABLE(HTTPRequestHeaderValidator); |
63 public: | 63 public: |
64 HTTPRequestHeaderValidator() : m_isSafe(true) { } | 64 HTTPRequestHeaderValidator() : m_isSafe(true) { } |
65 | 65 |
66 void visitHeader(const WebString& name, const WebString& value); | 66 void visitHeader(const WebString& name, const WebString& value); |
67 bool isSafe() const { return m_isSafe; } | 67 bool isSafe() const { return m_isSafe; } |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 { | 297 { |
298 ASSERT(m_frameImpl); | 298 ASSERT(m_frameImpl); |
299 } | 299 } |
300 | 300 |
301 AssociatedURLLoader::~AssociatedURLLoader() | 301 AssociatedURLLoader::~AssociatedURLLoader() |
302 { | 302 { |
303 cancel(); | 303 cancel(); |
304 } | 304 } |
305 | 305 |
306 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, webcore_name) \ | 306 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, webcore_name) \ |
307 COMPILE_ASSERT(static_cast<int>(WebKit::webkit_name) == static_cast<int>(Web
Core::webcore_name), mismatching_enums) | 307 COMPILE_ASSERT(static_cast<int>(blink::webkit_name) == static_cast<int>(WebC
ore::webcore_name), mismatching_enums) |
308 | 308 |
309 COMPILE_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::CrossOriginRequestPolicyDeny,
DenyCrossOriginRequests); | 309 COMPILE_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::CrossOriginRequestPolicyDeny,
DenyCrossOriginRequests); |
310 COMPILE_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::CrossOriginRequestPolicyUseAcc
essControl, UseAccessControl); | 310 COMPILE_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::CrossOriginRequestPolicyUseAcc
essControl, UseAccessControl); |
311 COMPILE_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::CrossOriginRequestPolicyAllow,
AllowCrossOriginRequests); | 311 COMPILE_ASSERT_MATCHING_ENUM(WebURLLoaderOptions::CrossOriginRequestPolicyAllow,
AllowCrossOriginRequests); |
312 | 312 |
313 void AssociatedURLLoader::loadSynchronously(const WebURLRequest& request, WebURL
Response& response, WebURLError& error, WebData& data) | 313 void AssociatedURLLoader::loadSynchronously(const WebURLRequest& request, WebURL
Response& response, WebURLError& error, WebData& data) |
314 { | 314 { |
315 ASSERT(0); // Synchronous loading is not supported. | 315 ASSERT(0); // Synchronous loading is not supported. |
316 } | 316 } |
317 | 317 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 if (m_loader) | 363 if (m_loader) |
364 m_loader->cancel(); | 364 m_loader->cancel(); |
365 } | 365 } |
366 | 366 |
367 void AssociatedURLLoader::setDefersLoading(bool defersLoading) | 367 void AssociatedURLLoader::setDefersLoading(bool defersLoading) |
368 { | 368 { |
369 if (m_loader) | 369 if (m_loader) |
370 m_loader->setDefersLoading(defersLoading); | 370 m_loader->setDefersLoading(defersLoading); |
371 } | 371 } |
372 | 372 |
373 } // namespace WebKit | 373 } // namespace blink |
OLD | NEW |