| OLD | NEW |
| 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 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 static WebViewContentScriptManager* Get( | 38 static WebViewContentScriptManager* Get( |
| 39 content::BrowserContext* browser_context); | 39 content::BrowserContext* browser_context); |
| 40 | 40 |
| 41 // Adds content scripts for the WebView specified by | 41 // Adds content scripts for the WebView specified by |
| 42 // |embedder_process_id| and |view_instance_id|. | 42 // |embedder_process_id| and |view_instance_id|. |
| 43 void AddContentScripts(int embedder_process_id, | 43 void AddContentScripts(int embedder_process_id, |
| 44 content::RenderFrameHost* render_frame_host, | 44 content::RenderFrameHost* render_frame_host, |
| 45 int view_instance_id, | 45 int view_instance_id, |
| 46 const HostID& host_id, | 46 const HostID& host_id, |
| 47 const UserScriptList& user_scripts); | 47 std::unique_ptr<UserScriptList> user_scripts); |
| 48 | 48 |
| 49 // Removes all content scripts for the WebView identified by | 49 // Removes all content scripts for the WebView identified by |
| 50 // |embedder_process_id| and |view_instance_id|. | 50 // |embedder_process_id| and |view_instance_id|. |
| 51 void RemoveAllContentScriptsForWebView(int embedder_process_id, | 51 void RemoveAllContentScriptsForWebView(int embedder_process_id, |
| 52 int view_instance_id); | 52 int view_instance_id); |
| 53 | 53 |
| 54 // Removes contents scipts whose names are in the |script_name_list| for the | 54 // Removes contents scipts whose names are in the |script_name_list| for the |
| 55 // WebView specified by |embedder_process_id| and |view_instance_id|. | 55 // WebView specified by |embedder_process_id| and |view_instance_id|. |
| 56 // If the |script_name_list| is empty, removes all the content scripts added | 56 // If the |script_name_list| is empty, removes all the content scripts added |
| 57 // for this WebView. | 57 // for this WebView. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 std::vector<base::Closure> pending_scripts_loading_callbacks_; | 101 std::vector<base::Closure> pending_scripts_loading_callbacks_; |
| 102 | 102 |
| 103 content::BrowserContext* browser_context_; | 103 content::BrowserContext* browser_context_; |
| 104 | 104 |
| 105 DISALLOW_COPY_AND_ASSIGN(WebViewContentScriptManager); | 105 DISALLOW_COPY_AND_ASSIGN(WebViewContentScriptManager); |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 } // namespace extensions | 108 } // namespace extensions |
| 109 | 109 |
| 110 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_CONTENT_SCRIPT_MANAGE
R_H | 110 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_CONTENT_SCRIPT_MANAGE
R_H |
| OLD | NEW |