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

Side by Side Diff: content/renderer/mojo_context_state.h

Issue 1776263002: Handle JS mojo module fetch failures gracefully. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | content/renderer/mojo_context_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/mojo_context_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698