Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: Source/core/xmlhttprequest/XMLHttpRequest.cpp

Issue 1006793002: Add new method xhrSucceeded() to WebAutofillClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Test Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/page/ChromeClient.h ('k') | Source/web/ChromeClientImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org>
4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org>
5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved.
6 * Copyright (C) 2012 Intel Corporation 6 * Copyright (C) 2012 Intel Corporation
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "core/frame/Settings.h" 44 #include "core/frame/Settings.h"
45 #include "core/frame/UseCounter.h" 45 #include "core/frame/UseCounter.h"
46 #include "core/frame/csp/ContentSecurityPolicy.h" 46 #include "core/frame/csp/ContentSecurityPolicy.h"
47 #include "core/html/DOMFormData.h" 47 #include "core/html/DOMFormData.h"
48 #include "core/html/HTMLDocument.h" 48 #include "core/html/HTMLDocument.h"
49 #include "core/html/parser/TextResourceDecoder.h" 49 #include "core/html/parser/TextResourceDecoder.h"
50 #include "core/inspector/ConsoleMessage.h" 50 #include "core/inspector/ConsoleMessage.h"
51 #include "core/inspector/InspectorInstrumentation.h" 51 #include "core/inspector/InspectorInstrumentation.h"
52 #include "core/inspector/InspectorTraceEvents.h" 52 #include "core/inspector/InspectorTraceEvents.h"
53 #include "core/loader/ThreadableLoader.h" 53 #include "core/loader/ThreadableLoader.h"
54 #include "core/page/Chrome.h"
55 #include "core/page/ChromeClient.h"
56 #include "core/page/Page.h"
54 #include "core/streams/ReadableStream.h" 57 #include "core/streams/ReadableStream.h"
55 #include "core/streams/ReadableStreamImpl.h" 58 #include "core/streams/ReadableStreamImpl.h"
56 #include "core/streams/Stream.h" 59 #include "core/streams/Stream.h"
57 #include "core/streams/UnderlyingSource.h" 60 #include "core/streams/UnderlyingSource.h"
58 #include "core/xmlhttprequest/XMLHttpRequestProgressEvent.h" 61 #include "core/xmlhttprequest/XMLHttpRequestProgressEvent.h"
59 #include "core/xmlhttprequest/XMLHttpRequestUpload.h" 62 #include "core/xmlhttprequest/XMLHttpRequestUpload.h"
60 #include "platform/Logging.h" 63 #include "platform/Logging.h"
61 #include "platform/RuntimeEnabledFeatures.h" 64 #include "platform/RuntimeEnabledFeatures.h"
62 #include "platform/SharedBuffer.h" 65 #include "platform/SharedBuffer.h"
63 #include "platform/blob/BlobData.h" 66 #include "platform/blob/BlobData.h"
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 1569
1567 void XMLHttpRequest::endLoading() 1570 void XMLHttpRequest::endLoading()
1568 { 1571 {
1569 InspectorInstrumentation::didFinishXHRLoading(executionContext(), this, this , m_loaderIdentifier, m_responseText, m_method, m_url); 1572 InspectorInstrumentation::didFinishXHRLoading(executionContext(), this, this , m_loaderIdentifier, m_responseText, m_method, m_url);
1570 1573
1571 if (m_loader) 1574 if (m_loader)
1572 m_loader = nullptr; 1575 m_loader = nullptr;
1573 m_loaderIdentifier = 0; 1576 m_loaderIdentifier = 0;
1574 1577
1575 changeState(DONE); 1578 changeState(DONE);
1579
1580 if (!executionContext()->isDocument() || document() || !document()->frame() || !document()->frame()->page())
1581 return;
1582
1583 if (status() >= 200 && status() < 300)
1584 document()->frame()->page()->chrome().client().xhrSucceeded(document()-> frame());
1576 } 1585 }
1577 1586
1578 void XMLHttpRequest::didSendData(unsigned long long bytesSent, unsigned long lon g totalBytesToBeSent) 1587 void XMLHttpRequest::didSendData(unsigned long long bytesSent, unsigned long lon g totalBytesToBeSent)
1579 { 1588 {
1580 WTF_LOG(Network, "XMLHttpRequest %p didSendData(%llu, %llu)", this, bytesSen t, totalBytesToBeSent); 1589 WTF_LOG(Network, "XMLHttpRequest %p didSendData(%llu, %llu)", this, bytesSen t, totalBytesToBeSent);
1581 ScopedEventDispatchProtect protect(&m_eventDispatchRecursionLevel); 1590 ScopedEventDispatchProtect protect(&m_eventDispatchRecursionLevel);
1582 1591
1583 if (!m_upload) 1592 if (!m_upload)
1584 return; 1593 return;
1585 1594
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1817 visitor->trace(m_responseDocumentParser); 1826 visitor->trace(m_responseDocumentParser);
1818 visitor->trace(m_progressEventThrottle); 1827 visitor->trace(m_progressEventThrottle);
1819 visitor->trace(m_upload); 1828 visitor->trace(m_upload);
1820 visitor->trace(m_blobLoader); 1829 visitor->trace(m_blobLoader);
1821 XMLHttpRequestEventTarget::trace(visitor); 1830 XMLHttpRequestEventTarget::trace(visitor);
1822 DocumentParserClient::trace(visitor); 1831 DocumentParserClient::trace(visitor);
1823 ActiveDOMObject::trace(visitor); 1832 ActiveDOMObject::trace(visitor);
1824 } 1833 }
1825 1834
1826 } // namespace blink 1835 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/ChromeClient.h ('k') | Source/web/ChromeClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698