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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_content_script_manager.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: nits. 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
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_GUEST_VIEW_WEB_VIEW_WEB_VIEW_CONTENT_SCRIPT_MANAGER_H 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_CONTENT_SCRIPT_MANAGER_H
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_CONTENT_SCRIPT_MANAGER_H 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_CONTENT_SCRIPT_MANAGER_H
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 20 matching lines...) Expand all
31 explicit WebViewContentScriptManager( 31 explicit WebViewContentScriptManager(
32 content::BrowserContext* browser_context); 32 content::BrowserContext* browser_context);
33 ~WebViewContentScriptManager() override; 33 ~WebViewContentScriptManager() override;
34 34
35 static WebViewContentScriptManager* Get( 35 static WebViewContentScriptManager* Get(
36 content::BrowserContext* browser_context); 36 content::BrowserContext* browser_context);
37 37
38 // Adds content scripts for the guest specified by the |embedder_web_contents, 38 // Adds content scripts for the guest specified by the |embedder_web_contents,
39 // view_instance_id|. 39 // view_instance_id|.
40 void AddContentScripts(content::WebContents* embedder_web_contents, 40 void AddContentScripts(content::WebContents* embedder_web_contents,
41 int embedder_routing_id,
41 int view_instance_id, 42 int view_instance_id,
42 const HostID& host_id, 43 const HostID& host_id,
43 const std::set<UserScript>& user_scripts); 44 const std::set<UserScript>& user_scripts);
44 45
45 // Removes contents scipts whose names are in the |script_name_list| for the 46 // Removes contents scipts whose names are in the |script_name_list| for the
46 // guest specified by |embedder_web_contents, view_instance_id|. 47 // guest specified by |embedder_web_contents, view_instance_id|.
47 // If the |script_name_list| is empty, removes all the content scripts added 48 // If the |script_name_list| is empty, removes all the content scripts added
48 // for this guest. 49 // for this guest.
49 void RemoveContentScripts(content::WebContents* embedder_web_contents, 50 void RemoveContentScripts(content::WebContents* embedder_web_contents,
50 int view_instance_id, 51 int view_instance_id,
(...skipping 25 matching lines...) Expand all
76 GuestContentScriptMap guest_content_script_map_; 77 GuestContentScriptMap guest_content_script_map_;
77 78
78 content::BrowserContext* browser_context_; 79 content::BrowserContext* browser_context_;
79 80
80 DISALLOW_COPY_AND_ASSIGN(WebViewContentScriptManager); 81 DISALLOW_COPY_AND_ASSIGN(WebViewContentScriptManager);
81 }; 82 };
82 83
83 } // namespace extensions 84 } // namespace extensions
84 85
85 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_CONTENT_SCRIPT_MANAGE R_H 86 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_CONTENT_SCRIPT_MANAGE R_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698