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

Side by Side Diff: extensions/browser/web_ui_user_script_loader.h

Issue 2231353002: Make FileReader return ownership of the string content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 EXTENSIONS_BROWSER_WEB_UI_USER_SCRIPT_LOADER_H_ 5 #ifndef EXTENSIONS_BROWSER_WEB_UI_USER_SCRIPT_LOADER_H_
6 #define EXTENSIONS_BROWSER_WEB_UI_USER_SCRIPT_LOADER_H_ 6 #define EXTENSIONS_BROWSER_WEB_UI_USER_SCRIPT_LOADER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 25 matching lines...) Expand all
36 int render_process_id, 36 int render_process_id,
37 int render_frame_id) override; 37 int render_frame_id) override;
38 void LoadScripts(std::unique_ptr<extensions::UserScriptList> user_scripts, 38 void LoadScripts(std::unique_ptr<extensions::UserScriptList> user_scripts,
39 const std::set<HostID>& changed_hosts, 39 const std::set<HostID>& changed_hosts,
40 const std::set<int>& added_script_ids, 40 const std::set<int>& added_script_ids,
41 LoadScriptsCallback callback) override; 41 LoadScriptsCallback callback) override;
42 42
43 // Called at the end of each fetch, tracking whether all fetches are done. 43 // Called at the end of each fetch, tracking whether all fetches are done.
44 void OnSingleWebUIURLFetchComplete(extensions::UserScript::File* script_file, 44 void OnSingleWebUIURLFetchComplete(extensions::UserScript::File* script_file,
45 bool success, 45 bool success,
46 const std::string& data); 46 std::unique_ptr<std::string> data);
47 47
48 // Called when the loads of the user scripts are done. 48 // Called when the loads of the user scripts are done.
49 void OnWebUIURLFetchComplete(); 49 void OnWebUIURLFetchComplete();
50 50
51 // Creates WebUiURLFetchers for the given |script_files|. 51 // Creates WebUiURLFetchers for the given |script_files|.
52 void CreateWebUIURLFetchers(extensions::UserScript::FileList* script_files, 52 void CreateWebUIURLFetchers(extensions::UserScript::FileList* script_files,
53 content::BrowserContext* browser_context, 53 content::BrowserContext* browser_context,
54 int render_process_id, 54 int render_process_id,
55 int render_frame_id); 55 int render_frame_id);
56 56
(...skipping 10 matching lines...) Expand all
67 std::unique_ptr<extensions::UserScriptList> user_scripts_cache_; 67 std::unique_ptr<extensions::UserScriptList> user_scripts_cache_;
68 68
69 LoadScriptsCallback scripts_loaded_callback_; 69 LoadScriptsCallback scripts_loaded_callback_;
70 70
71 std::vector<std::unique_ptr<WebUIURLFetcher>> fetchers_; 71 std::vector<std::unique_ptr<WebUIURLFetcher>> fetchers_;
72 72
73 DISALLOW_COPY_AND_ASSIGN(WebUIUserScriptLoader); 73 DISALLOW_COPY_AND_ASSIGN(WebUIUserScriptLoader);
74 }; 74 };
75 75
76 #endif // EXTENSIONS_BROWSER_WEB_UI_USER_SCRIPT_LOADER_H_ 76 #endif // EXTENSIONS_BROWSER_WEB_UI_USER_SCRIPT_LOADER_H_
OLDNEW
« no previous file with comments | « extensions/browser/guest_view/web_view/web_ui/web_ui_url_fetcher.cc ('k') | extensions/browser/web_ui_user_script_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698