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

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

Issue 2228743002: Rework some UserScriptLoader logic in preparation to removing UserScript copy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync @tott 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 14 matching lines...) Expand all
25 public: 25 public:
26 WebUIUserScriptLoader(content::BrowserContext* browser_context, 26 WebUIUserScriptLoader(content::BrowserContext* browser_context,
27 const HostID& host_id); 27 const HostID& host_id);
28 ~WebUIUserScriptLoader() override; 28 ~WebUIUserScriptLoader() override;
29 29
30 private: 30 private:
31 struct UserScriptRenderInfo; 31 struct UserScriptRenderInfo;
32 using UserScriptRenderInfoMap = std::map<int, UserScriptRenderInfo>; 32 using UserScriptRenderInfoMap = std::map<int, UserScriptRenderInfo>;
33 33
34 // UserScriptLoader: 34 // UserScriptLoader:
35 void AddScripts(const std::set<extensions::UserScript>& scripts, 35 void AddScripts(const extensions::UserScriptList& scripts,
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,
(...skipping 21 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/user_script_loader.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