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 bool IsHandledByPlugin(bool* defer, bool* result); | |
mmenke
2015/03/24 14:44:32
This should be documented. We return a boolean, a
raymes
2015/03/25 00:26:32
It was never clear how we call back in the case de
Deepak
2015/03/25 05:43:34
Done.
| |
59 bool SelectNextHandler(bool* defer); | 60 bool SelectNextHandler(bool* defer); |
60 bool UseAlternateNextHandler(scoped_ptr<ResourceHandler> handler, | 61 bool UseAlternateNextHandler(scoped_ptr<ResourceHandler> handler, |
61 const std::string& payload_for_old_handler); | 62 const std::string& payload_for_old_handler); |
62 | 63 |
63 bool ReplayReadCompleted(bool* defer); | 64 bool ReplayReadCompleted(bool* defer); |
64 void CallReplayReadCompleted(); | 65 void CallReplayReadCompleted(); |
65 | 66 |
66 bool MustDownload(); | 67 bool MustDownload(); |
67 bool HasSupportingPlugin(bool* is_stale); | 68 bool GetSupportingPlugin(WebPluginInfo* plugin, bool* stale); |
mmenke
2015/03/24 14:44:32
Mind documenting this? Unclear what the return va
raymes
2015/03/25 00:26:32
As you mentioned in your comment, this function ca
Deepak
2015/03/25 05:43:34
Have made this function inline as it is not gettin
| |
68 | 69 |
69 // Copies data from |read_buffer_| to |next_handler_|. | 70 // Copies data from |read_buffer_| to |next_handler_|. |
70 bool CopyReadBufferToNextHandler(); | 71 bool CopyReadBufferToNextHandler(); |
71 | 72 |
72 // Called on the IO thread once the list of plugins has been loaded. | 73 // Called on the IO thread once the list of plugins has been loaded. |
73 void OnPluginsLoaded(const std::vector<WebPluginInfo>& plugins); | 74 void OnPluginsLoaded(const std::vector<WebPluginInfo>& plugins); |
74 | 75 |
75 enum State { | 76 enum State { |
76 STATE_STARTING, | 77 STATE_STARTING, |
77 | 78 |
(...skipping 27 matching lines...) Expand all Loading... | |
105 bool must_download_is_set_; | 106 bool must_download_is_set_; |
106 | 107 |
107 base::WeakPtrFactory<BufferedResourceHandler> weak_ptr_factory_; | 108 base::WeakPtrFactory<BufferedResourceHandler> weak_ptr_factory_; |
108 | 109 |
109 DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler); | 110 DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler); |
110 }; | 111 }; |
111 | 112 |
112 } // namespace content | 113 } // namespace content |
113 | 114 |
114 #endif // CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ | 115 #endif // CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ |
OLD | NEW |