OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "core/loader/resource/ImageResourceContent.h" | 5 #include "core/loader/resource/ImageResourceContent.h" |
6 | 6 |
7 #include <v8.h> | 7 #include <v8.h> |
8 #include <memory> | 8 #include <memory> |
9 #include "core/loader/resource/ImageResource.h" | 9 #include "core/loader/resource/ImageResource.h" |
10 #include "core/loader/resource/ImageResourceInfo.h" | 10 #include "core/loader/resource/ImageResourceInfo.h" |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 | 445 |
446 void ImageResourceContent::changedInRect(const blink::Image* image, | 446 void ImageResourceContent::changedInRect(const blink::Image* image, |
447 const IntRect& rect) { | 447 const IntRect& rect) { |
448 if (!image || image != m_image) | 448 if (!image || image != m_image) |
449 return; | 449 return; |
450 notifyObservers(DoNotNotifyFinish, &rect); | 450 notifyObservers(DoNotNotifyFinish, &rect); |
451 } | 451 } |
452 | 452 |
453 bool ImageResourceContent::isAccessAllowed(SecurityOrigin* securityOrigin) { | 453 bool ImageResourceContent::isAccessAllowed(SecurityOrigin* securityOrigin) { |
454 return m_info->isAccessAllowed( | 454 return m_info->isAccessAllowed( |
455 securityOrigin, getImage()->currentFrameHasSingleSecurityOrigin() | 455 securityOrigin, |
456 ? ImageResourceInfo::HasSingleSecurityOrigin | 456 getImage()->currentFrameHasSingleSecurityOrigin() |
457 : ImageResourceInfo::HasMultipleSecurityOrigin); | 457 ? ImageResourceInfo::HasSingleSecurityOrigin |
| 458 : ImageResourceInfo::HasMultipleSecurityOrigin); |
458 } | 459 } |
459 | 460 |
460 void ImageResourceContent::emulateLoadStartedForInspector( | 461 void ImageResourceContent::emulateLoadStartedForInspector( |
461 ResourceFetcher* fetcher, | 462 ResourceFetcher* fetcher, |
462 const KURL& url, | 463 const KURL& url, |
463 const AtomicString& initiatorName) { | 464 const AtomicString& initiatorName) { |
464 m_info->emulateLoadStartedForInspector(fetcher, url, initiatorName); | 465 m_info->emulateLoadStartedForInspector(fetcher, url, initiatorName); |
465 } | 466 } |
466 | 467 |
467 // TODO(hiroshige): Consider removing the following methods, or stoping | 468 // TODO(hiroshige): Consider removing the following methods, or stoping |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 | 506 |
506 const ResourceResponse& ImageResourceContent::response() const { | 507 const ResourceResponse& ImageResourceContent::response() const { |
507 return m_info->response(); | 508 return m_info->response(); |
508 } | 509 } |
509 | 510 |
510 const ResourceError& ImageResourceContent::resourceError() const { | 511 const ResourceError& ImageResourceContent::resourceError() const { |
511 return m_info->resourceError(); | 512 return m_info->resourceError(); |
512 } | 513 } |
513 | 514 |
514 } // namespace blink | 515 } // namespace blink |
OLD | NEW |