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

Side by Side Diff: Source/core/loader/PolicyChecker.h

Issue 14264012: Create errors (especially cancellation errors) internally to WebCore, rather (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 explicit PolicyChecker(Frame*); 51 explicit PolicyChecker(Frame*);
52 52
53 void checkNavigationPolicy(const ResourceRequest&, DocumentLoader*, PassRefP tr<FormState>, NavigationPolicyDecisionFunction, void* argument); 53 void checkNavigationPolicy(const ResourceRequest&, DocumentLoader*, PassRefP tr<FormState>, NavigationPolicyDecisionFunction, void* argument);
54 void checkNavigationPolicy(const ResourceRequest&, NavigationPolicyDecisionF unction, void* argument); 54 void checkNavigationPolicy(const ResourceRequest&, NavigationPolicyDecisionF unction, void* argument);
55 void checkNewWindowPolicy(const NavigationAction&, NewWindowPolicyDecisionFu nction, const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, void* argument); 55 void checkNewWindowPolicy(const NavigationAction&, NewWindowPolicyDecisionFu nction, const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, void* argument);
56 56
57 // FIXME: These are different. They could use better names. 57 // FIXME: These are different. They could use better names.
58 void cancelCheck(); 58 void cancelCheck();
59 void stopCheck(); 59 void stopCheck();
60 60
61 void cannotShowMIMEType(const ResourceResponse&);
62
63 FrameLoadType loadType() const { return m_loadType; } 61 FrameLoadType loadType() const { return m_loadType; }
64 void setLoadType(FrameLoadType loadType) { m_loadType = loadType; } 62 void setLoadType(FrameLoadType loadType) { m_loadType = loadType; }
65 63
66 bool delegateIsDecidingNavigationPolicy() const { return m_delegateIsDecidin gNavigationPolicy; } 64 bool delegateIsDecidingNavigationPolicy() const { return m_delegateIsDecidin gNavigationPolicy; }
67 bool delegateIsHandlingUnimplementablePolicy() const { return m_delegateIsHa ndlingUnimplementablePolicy; } 65 bool delegateIsHandlingUnimplementablePolicy() const { return m_delegateIsHa ndlingUnimplementablePolicy; }
68 66
69 private: 67 private:
70 void continueAfterNavigationPolicy(PolicyAction); 68 void continueAfterNavigationPolicy(PolicyAction);
71 void continueAfterNewWindowPolicy(PolicyAction); 69 void continueAfterNewWindowPolicy(PolicyAction);
72 70
73 void handleUnimplementablePolicy(const ResourceError&);
74
75 Frame* m_frame; 71 Frame* m_frame;
76 72
77 bool m_delegateIsDecidingNavigationPolicy; 73 bool m_delegateIsDecidingNavigationPolicy;
78 bool m_delegateIsHandlingUnimplementablePolicy; 74 bool m_delegateIsHandlingUnimplementablePolicy;
79 75
80 // This identifies the type of navigation action which prompted this load. N ote 76 // This identifies the type of navigation action which prompted this load. N ote
81 // that WebKit conveys this value as the WebActionNavigationTypeKey value 77 // that WebKit conveys this value as the WebActionNavigationTypeKey value
82 // on navigation action delegate callbacks. 78 // on navigation action delegate callbacks.
83 FrameLoadType m_loadType; 79 FrameLoadType m_loadType;
84 PolicyCallback m_callback; 80 PolicyCallback m_callback;
85 }; 81 };
86 82
87 } // namespace WebCore 83 } // namespace WebCore
88 84
89 #endif // PolicyChecker_h 85 #endif // PolicyChecker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698