File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -207,17 +207,20 @@ Shell::~Shell() {
207
207
}
208
208
209
209
void Shell::SendEvent (const std::string& event, const std::string& arg1) {
210
+ base::ListValue args;
211
+ if (!arg1.empty ())
212
+ args.AppendString (arg1);
213
+ SendEvent (event, args);
214
+ }
215
+
216
+ void Shell::SendEvent (const std::string& event, const base::ListValue& args) {
210
217
211
218
if (id () < 0 )
212
219
return ;
213
220
214
221
DVLOG (1 ) << " Shell::SendEvent " << event << " id():"
215
222
<< id () << " RoutingID: " << web_contents ()->GetRoutingID ();
216
223
217
- base::ListValue args;
218
- if (!arg1.empty ())
219
- args.AppendString (arg1);
220
-
221
224
WebContents* web_contents;
222
225
if (is_devtools_ && devtools_owner_.get ())
223
226
web_contents = devtools_owner_->web_contents ();
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ class Shell : public WebContentsDelegate,
102
102
bool devToolsOpen () { return devtools_window_.get () != NULL ; }
103
103
// Send an event to renderer.
104
104
void SendEvent (const std::string& event, const std::string& arg1 = " " );
105
+ void SendEvent (const std::string& event, const base::ListValue& args);
105
106
106
107
// Decide whether we should close the window.
107
108
bool ShouldCloseWindow ();
You can’t perform that action at this time.
0 commit comments