OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef EXTENSIONS_BROWSER_WEB_UI_USER_SCRIPT_LOADER_H_ |
| 6 #define EXTENSIONS_BROWSER_WEB_UI_USER_SCRIPT_LOADER_H_ |
| 7 |
| 8 #include "base/memory/scoped_vector.h" |
| 9 #include "extensions/browser/guest_view/web_view/web_ui/web_ui_url_fetcher_group
.h" |
| 10 #include "extensions/browser/user_script_loader.h" |
| 11 |
| 12 namespace content { |
| 13 class BrowserContext; |
| 14 } |
| 15 |
| 16 // UserScriptLoader for WebUI. |
| 17 class WebUIUserScriptLoader : public extensions::UserScriptLoader { |
| 18 public: |
| 19 WebUIUserScriptLoader(content::BrowserContext* browser_context, |
| 20 const HostID& host_id); |
| 21 ~WebUIUserScriptLoader() override; |
| 22 |
| 23 private: |
| 24 // UserScriptLoader: |
| 25 void LoadScripts(const std::set<HostID>& changed_hosts, |
| 26 const std::set<int>& added_script_ids) override; |
| 27 |
| 28 // Called when the loads of the user scripts are done. |
| 29 void OnWebUIURLFetchComplete( |
| 30 scoped_ptr<extensions::UserScriptList> user_scripts); |
| 31 |
| 32 std::set<WebUIURLFetcherGroup*> fetcher_groups_; |
| 33 base::WeakPtrFactory<WebUIUserScriptLoader> weak_factory_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(WebUIUserScriptLoader); |
| 36 }; |
| 37 |
| 38 #endif // EXTENSIONS_BROWSER_WEB_UI_USER_SCRIPT_LOADER_H_ |
OLD | NEW |