OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SCRIPT_EXECUTOR_H_ | 5 #ifndef EXTENSIONS_BROWSER_SCRIPT_EXECUTOR_H_ |
6 #define EXTENSIONS_BROWSER_SCRIPT_EXECUTOR_H_ | 6 #define EXTENSIONS_BROWSER_SCRIPT_EXECUTOR_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "extensions/common/user_script.h" | 10 #include "extensions/common/user_script.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // failure and appropriate error message). | 87 // failure and appropriate error message). |
88 void ExecuteScript(const std::string& extension_id, | 88 void ExecuteScript(const std::string& extension_id, |
89 ScriptType script_type, | 89 ScriptType script_type, |
90 const std::string& code, | 90 const std::string& code, |
91 FrameScope frame_scope, | 91 FrameScope frame_scope, |
92 MatchAboutBlank match_about_blank, | 92 MatchAboutBlank match_about_blank, |
93 UserScript::RunLocation run_at, | 93 UserScript::RunLocation run_at, |
94 WorldType world_type, | 94 WorldType world_type, |
95 ProcessType process_type, | 95 ProcessType process_type, |
96 const GURL& webview_src, | 96 const GURL& webview_src, |
| 97 int instance_id, |
97 const GURL& file_url, | 98 const GURL& file_url, |
98 bool user_gesture, | 99 bool user_gesture, |
99 ResultType result_type, | 100 ResultType result_type, |
100 const ExecuteScriptCallback& callback); | 101 const ExecuteScriptCallback& callback); |
101 | 102 |
102 private: | 103 private: |
103 // The next value to use for request_id in ExtensionMsg_ExecuteCode_Params. | 104 // The next value to use for request_id in ExtensionMsg_ExecuteCode_Params. |
104 int next_request_id_; | 105 int next_request_id_; |
105 | 106 |
106 content::WebContents* web_contents_; | 107 content::WebContents* web_contents_; |
107 | 108 |
108 ObserverList<ScriptExecutionObserver>* script_observers_; | 109 ObserverList<ScriptExecutionObserver>* script_observers_; |
109 }; | 110 }; |
110 | 111 |
111 } // namespace extensions | 112 } // namespace extensions |
112 | 113 |
113 #endif // EXTENSIONS_BROWSER_SCRIPT_EXECUTOR_H_ | 114 #endif // EXTENSIONS_BROWSER_SCRIPT_EXECUTOR_H_ |
OLD | NEW |