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

Side by Side Diff: chrome/browser/extensions/script_executor.h

Issue 226043005: Fix webview.executeScript API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add check for invalid url. Created 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_SCRIPT_EXECUTOR_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_SCRIPT_EXECUTOR_H_
6 #define CHROME_BROWSER_EXTENSIONS_SCRIPT_EXECUTOR_H_ 6 #define CHROME_BROWSER_EXTENSIONS_SCRIPT_EXECUTOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // |callback| will always be called even if the IPC'd renderer is destroyed 79 // |callback| will always be called even if the IPC'd renderer is destroyed
80 // before a response is received (in this case the callback will be with a 80 // before a response is received (in this case the callback will be with a
81 // failure and appropriate error message). 81 // failure and appropriate error message).
82 void ExecuteScript(const std::string& extension_id, 82 void ExecuteScript(const std::string& extension_id,
83 ScriptType script_type, 83 ScriptType script_type,
84 const std::string& code, 84 const std::string& code,
85 FrameScope frame_scope, 85 FrameScope frame_scope,
86 UserScript::RunLocation run_at, 86 UserScript::RunLocation run_at,
87 WorldType world_type, 87 WorldType world_type,
88 ProcessType process_type, 88 ProcessType process_type,
89 const GURL& webview_src,
89 const GURL& file_url, 90 const GURL& file_url,
90 bool user_gesture, 91 bool user_gesture,
91 ResultType result_type, 92 ResultType result_type,
92 const ExecuteScriptCallback& callback); 93 const ExecuteScriptCallback& callback);
93 94
94 private: 95 private:
95 // The next value to use for request_id in ExtensionMsg_ExecuteCode_Params. 96 // The next value to use for request_id in ExtensionMsg_ExecuteCode_Params.
96 int next_request_id_; 97 int next_request_id_;
97 98
98 content::WebContents* web_contents_; 99 content::WebContents* web_contents_;
99 100
100 ObserverList<TabHelper::ScriptExecutionObserver>* script_observers_; 101 ObserverList<TabHelper::ScriptExecutionObserver>* script_observers_;
101 }; 102 };
102 103
103 } // namespace extensions 104 } // namespace extensions
104 105
105 #endif // CHROME_BROWSER_EXTENSIONS_SCRIPT_EXECUTOR_H_ 106 #endif // CHROME_BROWSER_EXTENSIONS_SCRIPT_EXECUTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698