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

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

Issue 1056533002: Implement <webview>.addContentScript/removeContentScript API [2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webview_addremove_contentscripts_2
Patch Set: Fix a test. Created 5 years, 8 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
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698