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

Side by Side Diff: Source/core/platform/network/ResourceHandleInternal.h

Issue 16140020: Delete NetworkingContext and its subclasses. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 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 21 matching lines...) Expand all
32 #define ResourceHandleInternal_h 32 #define ResourceHandleInternal_h
33 33
34 #include "core/platform/network/ResourceRequest.h" 34 #include "core/platform/network/ResourceRequest.h"
35 #include "public/platform/WebCommon.h" 35 #include "public/platform/WebCommon.h"
36 #include "public/platform/WebURLLoader.h" 36 #include "public/platform/WebURLLoader.h"
37 #include "public/platform/WebURLLoaderClient.h" 37 #include "public/platform/WebURLLoaderClient.h"
38 #include "public/platform/WebURLRequest.h" 38 #include "public/platform/WebURLRequest.h"
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 class NetworkingContext;
43 class ResourceHandle; 42 class ResourceHandle;
44 class ResourceHandleClient; 43 class ResourceHandleClient;
45 44
46 class ResourceHandleInternal : public WebKit::WebURLLoaderClient { 45 class ResourceHandleInternal : public WebKit::WebURLLoaderClient {
47 public: 46 public:
48 ResourceHandleInternal(NetworkingContext*, const ResourceRequest&, ResourceH andleClient*); 47 ResourceHandleInternal(const ResourceRequest&, ResourceHandleClient*);
49 48
50 virtual ~ResourceHandleInternal() { } 49 virtual ~ResourceHandleInternal() { }
51 50
52 void start(StoredCredentials); 51 void start(StoredCredentials);
53 void cancel(); 52 void cancel();
54 void setDefersLoading(bool); 53 void setDefersLoading(bool);
55 void didChangePriority(WebKit::WebURLRequest::Priority); 54 void didChangePriority(WebKit::WebURLRequest::Priority);
56 55
57 // WebURLLoaderClient methods: 56 // WebURLLoaderClient methods:
58 virtual void willSendRequest(WebKit::WebURLLoader*, WebKit::WebURLRequest&, const WebKit::WebURLResponse&); 57 virtual void willSendRequest(WebKit::WebURLLoader*, WebKit::WebURLRequest&, const WebKit::WebURLResponse&);
(...skipping 14 matching lines...) Expand all
73 ConnectionStateFinishedLoading, 72 ConnectionStateFinishedLoading,
74 ConnectionStateCanceled, 73 ConnectionStateCanceled,
75 ConnectionStateFailed, 74 ConnectionStateFailed,
76 }; 75 };
77 76
78 void setOwner(ResourceHandle* owner) { m_owner = owner; } 77 void setOwner(ResourceHandle* owner) { m_owner = owner; }
79 ResourceRequest& request() { return m_request; } 78 ResourceRequest& request() { return m_request; }
80 ResourceHandleClient* client() const { return m_client; } 79 ResourceHandleClient* client() const { return m_client; }
81 void setClient(ResourceHandleClient* client) { m_client = client; } 80 void setClient(ResourceHandleClient* client) { m_client = client; }
82 WebKit::WebURLLoader* loader() const { return m_loader.get(); } 81 WebKit::WebURLLoader* loader() const { return m_loader.get(); }
83 NetworkingContext* context() const { return m_context.get(); }
84 82
85 static ResourceHandleInternal* FromResourceHandle(ResourceHandle*); 83 static ResourceHandleInternal* FromResourceHandle(ResourceHandle*);
86 84
87 private: 85 private:
88 RefPtr<NetworkingContext> m_context;
89 ResourceRequest m_request; 86 ResourceRequest m_request;
90 ResourceHandle* m_owner; 87 ResourceHandle* m_owner;
91 ResourceHandleClient* m_client; 88 ResourceHandleClient* m_client;
92 OwnPtr<WebKit::WebURLLoader> m_loader; 89 OwnPtr<WebKit::WebURLLoader> m_loader;
93 90
94 // Used for sanity checking to make sure we don't experience illegal state 91 // Used for sanity checking to make sure we don't experience illegal state
95 // transitions. 92 // transitions.
96 ConnectionState m_state; 93 ConnectionState m_state;
97 }; 94 };
98 95
99 } // namespace WebCore 96 } // namespace WebCore
100 97
101 #endif 98 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698