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

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: Cleanup 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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 m_progressEventThrottle.dispatchReadyStateChangeEvent(Event::create(Even tTypeNames::readystatechange), action); 661 m_progressEventThrottle.dispatchReadyStateChangeEvent(Event::create(Even tTypeNames::readystatechange), action);
659 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up dateCounters", "data", InspectorUpdateCountersEvent::data()); 662 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up dateCounters", "data", InspectorUpdateCountersEvent::data());
660 } 663 }
661 664
662 if (m_state == DONE && !m_error) { 665 if (m_state == DONE && !m_error) {
663 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "XHRLoad", "data", InspectorXhrLoadEvent::data(executionContext(), this)); 666 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "XHRLoad", "data", InspectorXhrLoadEvent::data(executionContext(), this));
664 dispatchProgressEventFromSnapshot(EventTypeNames::load); 667 dispatchProgressEventFromSnapshot(EventTypeNames::load);
665 dispatchProgressEventFromSnapshot(EventTypeNames::loadend); 668 dispatchProgressEventFromSnapshot(EventTypeNames::loadend);
666 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up dateCounters", "data", InspectorUpdateCountersEvent::data()); 669 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Up dateCounters", "data", InspectorUpdateCountersEvent::data());
667 } 670 }
671 if (!document() || !document()->frame() || !document()->frame()->page())
672 return;
673
674 if (status() == 200)
kouhei (in TOK) 2015/03/13 07:22:32 May be allow all 2xx?
Garrett Casto 2015/03/13 18:37:07 Done
675 document()->frame()->page()->chrome().client().xhrSucceeded(document()-> frame());
kouhei (in TOK) 2015/03/13 07:22:33 I think the better place for this would be in endL
Garrett Casto 2015/03/13 18:37:07 Done.
668 } 676 }
669 677
670 void XMLHttpRequest::setWithCredentials(bool value, ExceptionState& exceptionSta te) 678 void XMLHttpRequest::setWithCredentials(bool value, ExceptionState& exceptionSta te)
671 { 679 {
672 if (m_state > OPENED || m_loader) { 680 if (m_state > OPENED || m_loader) {
673 exceptionState.throwDOMException(InvalidStateError, "The value may only be set if the object's state is UNSENT or OPENED."); 681 exceptionState.throwDOMException(InvalidStateError, "The value may only be set if the object's state is UNSENT or OPENED.");
674 return; 682 return;
675 } 683 }
676 684
677 // FIXME: According to XMLHttpRequest Level 2 we should throw InvalidAccessE rror exception here. 685 // FIXME: According to XMLHttpRequest Level 2 we should throw InvalidAccessE rror exception here.
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1817 visitor->trace(m_responseDocumentParser); 1825 visitor->trace(m_responseDocumentParser);
1818 visitor->trace(m_progressEventThrottle); 1826 visitor->trace(m_progressEventThrottle);
1819 visitor->trace(m_upload); 1827 visitor->trace(m_upload);
1820 visitor->trace(m_blobLoader); 1828 visitor->trace(m_blobLoader);
1821 XMLHttpRequestEventTarget::trace(visitor); 1829 XMLHttpRequestEventTarget::trace(visitor);
1822 DocumentParserClient::trace(visitor); 1830 DocumentParserClient::trace(visitor);
1823 ActiveDOMObject::trace(visitor); 1831 ActiveDOMObject::trace(visitor);
1824 } 1832 }
1825 1833
1826 } // namespace blink 1834 } // 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