| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RENDERER_MOJO_CONTEXT_STATE_H_ | 5 #ifndef CONTENT_RENDERER_MOJO_CONTEXT_STATE_H_ |
| 6 #define CONTENT_RENDERER_MOJO_CONTEXT_STATE_H_ | 6 #define CONTENT_RENDERER_MOJO_CONTEXT_STATE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 // Invokes FetchModule() for any modules that have not already been | 49 // Invokes FetchModule() for any modules that have not already been |
| 50 // downloaded. | 50 // downloaded. |
| 51 void FetchModules(const std::vector<std::string>& ids); | 51 void FetchModules(const std::vector<std::string>& ids); |
| 52 | 52 |
| 53 // Creates a ResourceFetcher to download |module|. | 53 // Creates a ResourceFetcher to download |module|. |
| 54 void FetchModule(const std::string& module); | 54 void FetchModule(const std::string& module); |
| 55 | 55 |
| 56 // Callback once a module has finished downloading. Passes data to |runner_|. | 56 // Callback once a module has finished downloading. Passes data to |runner_|. |
| 57 void OnFetchModuleComplete(ResourceFetcher* fetcher, | 57 void OnFetchModuleComplete(ResourceFetcher* fetcher, |
| 58 const std::string& id, |
| 58 const blink::WebURLResponse& response, | 59 const blink::WebURLResponse& response, |
| 59 const std::string& data); | 60 const std::string& data); |
| 60 | 61 |
| 61 // gin::ModuleRegistryObserver overrides: | 62 // gin::ModuleRegistryObserver overrides: |
| 62 void OnDidAddPendingModule( | 63 void OnDidAddPendingModule( |
| 63 const std::string& id, | 64 const std::string& id, |
| 64 const std::vector<std::string>& dependencies) override; | 65 const std::vector<std::string>& dependencies) override; |
| 65 | 66 |
| 66 // Frame script is executed in. Also used to download resources. | 67 // Frame script is executed in. Also used to download resources. |
| 67 blink::WebFrame* frame_; | 68 blink::WebFrame* frame_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 80 | 81 |
| 81 // The prefix to use for all module requests. | 82 // The prefix to use for all module requests. |
| 82 const std::string module_prefix_; | 83 const std::string module_prefix_; |
| 83 | 84 |
| 84 DISALLOW_COPY_AND_ASSIGN(MojoContextState); | 85 DISALLOW_COPY_AND_ASSIGN(MojoContextState); |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 } // namespace content | 88 } // namespace content |
| 88 | 89 |
| 89 #endif // CONTENT_RENDERER_MOJO_CONTEXT_STATE_H_ | 90 #endif // CONTENT_RENDERER_MOJO_CONTEXT_STATE_H_ |
| OLD | NEW |