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

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

Issue 11968054: <webview>: Implement ExecuteScript (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 7 years, 11 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 | Annotate | Revision Log
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // 66 //
67 // |callback| will always be called even if the IPC'd renderer is destroyed 67 // |callback| will always be called even if the IPC'd renderer is destroyed
68 // before a response is received (in this case the callback will be with a 68 // before a response is received (in this case the callback will be with a
69 // failure and appropriate error message). 69 // failure and appropriate error message).
70 void ExecuteScript(const std::string& extension_id, 70 void ExecuteScript(const std::string& extension_id,
71 ScriptType script_type, 71 ScriptType script_type,
72 const std::string& code, 72 const std::string& code,
73 FrameScope frame_scope, 73 FrameScope frame_scope,
74 UserScript::RunLocation run_at, 74 UserScript::RunLocation run_at,
75 WorldType world_type, 75 WorldType world_type,
76 bool is_web_view,
76 const ExecuteScriptCallback& callback); 77 const ExecuteScriptCallback& callback);
77 78
78 private: 79 private:
79 // The next value to use for request_id in ExtensionMsg_ExecuteCode_Params. 80 // The next value to use for request_id in ExtensionMsg_ExecuteCode_Params.
80 int next_request_id_; 81 int next_request_id_;
81 82
82 content::WebContents* web_contents_; 83 content::WebContents* web_contents_;
83 84
84 ObserverList<TabHelper::ScriptExecutionObserver>* script_observers_; 85 ObserverList<TabHelper::ScriptExecutionObserver>* script_observers_;
85 }; 86 };
86 87
87 } // namespace extensions 88 } // namespace extensions
88 89
89 #endif // CHROME_BROWSER_EXTENSIONS_SCRIPT_EXECUTOR_H_ 90 #endif // CHROME_BROWSER_EXTENSIONS_SCRIPT_EXECUTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698