OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ |
6 #define CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // ResourceController implementation: | 49 // ResourceController implementation: |
50 void Resume() override; | 50 void Resume() override; |
51 void Cancel() override; | 51 void Cancel() override; |
52 void CancelAndIgnore() override; | 52 void CancelAndIgnore() override; |
53 void CancelWithError(int error_code) override; | 53 void CancelWithError(int error_code) override; |
54 | 54 |
55 bool ProcessResponse(bool* defer); | 55 bool ProcessResponse(bool* defer); |
56 | 56 |
57 bool ShouldSniffContent(); | 57 bool ShouldSniffContent(); |
58 bool DetermineMimeType(); | 58 bool DetermineMimeType(); |
59 // Returns true if a plugin will handle the current request. |defer| is set | |
60 // to true if plugin data is stale and needs to be refreshed before the | |
61 // request can be handled. |request_handled| is false if the request should | |
62 // be cancelled and true otherwise. | |
63 bool IsHandledByPlugin(bool* defer, bool* request_handled); | |
64 bool SelectNextHandler(bool* defer); | 59 bool SelectNextHandler(bool* defer); |
65 bool UseAlternateNextHandler(scoped_ptr<ResourceHandler> handler, | 60 bool UseAlternateNextHandler(scoped_ptr<ResourceHandler> handler, |
66 const std::string& payload_for_old_handler); | 61 const std::string& payload_for_old_handler); |
67 | 62 |
68 bool ReplayReadCompleted(bool* defer); | 63 bool ReplayReadCompleted(bool* defer); |
69 void CallReplayReadCompleted(); | 64 void CallReplayReadCompleted(); |
70 | 65 |
71 bool MustDownload(); | 66 bool MustDownload(); |
| 67 bool HasSupportingPlugin(bool* is_stale); |
72 | 68 |
73 // Copies data from |read_buffer_| to |next_handler_|. | 69 // Copies data from |read_buffer_| to |next_handler_|. |
74 bool CopyReadBufferToNextHandler(); | 70 bool CopyReadBufferToNextHandler(); |
75 | 71 |
76 // Called on the IO thread once the list of plugins has been loaded. | 72 // Called on the IO thread once the list of plugins has been loaded. |
77 void OnPluginsLoaded(const std::vector<WebPluginInfo>& plugins); | 73 void OnPluginsLoaded(const std::vector<WebPluginInfo>& plugins); |
78 | 74 |
79 enum State { | 75 enum State { |
80 STATE_STARTING, | 76 STATE_STARTING, |
81 | 77 |
(...skipping 27 matching lines...) Expand all Loading... |
109 bool must_download_is_set_; | 105 bool must_download_is_set_; |
110 | 106 |
111 base::WeakPtrFactory<BufferedResourceHandler> weak_ptr_factory_; | 107 base::WeakPtrFactory<BufferedResourceHandler> weak_ptr_factory_; |
112 | 108 |
113 DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler); | 109 DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler); |
114 }; | 110 }; |
115 | 111 |
116 } // namespace content | 112 } // namespace content |
117 | 113 |
118 #endif // CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ | 114 #endif // CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ |
OLD | NEW |