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

Side by Side Diff: third_party/WebKit/Source/web/AssociatedURLLoader.h

Issue 1862073002: Let AssociatedURLLoader listen to destruction of the Document used for loading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed crash Created 4 years, 8 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 | « no previous file | third_party/WebKit/Source/web/AssociatedURLLoader.cpp » ('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) 2010, 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2010, 2011 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 AssociatedURLLoader(RawPtr<WebLocalFrameImpl>, const WebURLLoaderOptions&); 50 AssociatedURLLoader(RawPtr<WebLocalFrameImpl>, const WebURLLoaderOptions&);
51 ~AssociatedURLLoader(); 51 ~AssociatedURLLoader();
52 52
53 // WebURLLoader methods: 53 // WebURLLoader methods:
54 void loadSynchronously(const WebURLRequest&, WebURLResponse&, WebURLError&, WebData&) override; 54 void loadSynchronously(const WebURLRequest&, WebURLResponse&, WebURLError&, WebData&) override;
55 void loadAsynchronously(const WebURLRequest&, WebURLLoaderClient*) override; 55 void loadAsynchronously(const WebURLRequest&, WebURLLoaderClient*) override;
56 void cancel() override; 56 void cancel() override;
57 void setDefersLoading(bool) override; 57 void setDefersLoading(bool) override;
58 void setLoadingTaskRunner(blink::WebTaskRunner*) override; 58 void setLoadingTaskRunner(blink::WebTaskRunner*) override;
59 59
60 // Called by |m_observer| to handle destruction of the Document associated
yhirano 2016/04/07 10:29:42 [optional] You can make these functions private if
61 // with the frame given to the constructor.
62 void documentDestroyed();
63 void disposeObserver();
64
60 private: 65 private:
66 class ClientAdapter;
67 class Observer;
61 68
62 class ClientAdapter; 69 WebURLLoaderClient* m_client;
70 WebURLLoaderOptions m_options;
63 71
64 Persistent<WebLocalFrameImpl> m_frameImpl; 72 // An adapter which converts the DocumentThreadableLoaderClient method
65 WebURLLoaderOptions m_options; 73 // calls into the WebURLLoaderClient method calls.
66 WebURLLoaderClient* m_client;
67 OwnPtr<ClientAdapter> m_clientAdapter; 74 OwnPtr<ClientAdapter> m_clientAdapter;
68 OwnPtr<DocumentThreadableLoader> m_loader; 75 OwnPtr<DocumentThreadableLoader> m_loader;
76
77 // A DocumentLifecycleObserver for cancelling |m_loader| when the Document
78 // is detached.
79 Persistent<Observer> m_observer;
69 }; 80 };
70 81
71 } // namespace blink 82 } // namespace blink
72 83
73 #endif 84 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/AssociatedURLLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698