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

Side by Side Diff: chrome/renderer/extensions/extension_helper.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 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 | 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 #include "chrome/renderer/extensions/extension_helper.h" 5 #include "chrome/renderer/extensions/extension_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_string_value_serializer.h" 10 #include "base/json/json_string_value_serializer.h"
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 port_id, error_message, 306 port_id, error_message,
307 render_view()); 307 render_view());
308 } 308 }
309 309
310 void ExtensionHelper::OnExecuteCode( 310 void ExtensionHelper::OnExecuteCode(
311 const ExtensionMsg_ExecuteCode_Params& params) { 311 const ExtensionMsg_ExecuteCode_Params& params) {
312 WebView* webview = render_view()->GetWebView(); 312 WebView* webview = render_view()->GetWebView();
313 WebFrame* main_frame = webview->mainFrame(); 313 WebFrame* main_frame = webview->mainFrame();
314 if (!main_frame) { 314 if (!main_frame) {
315 ListValue val; 315 ListValue val;
316 Send(new ExtensionHostMsg_ExecuteCodeFinished( 316 Send(new ExtensionHostMsg_ExecuteCodeFinished(routing_id(),
317 routing_id(), params.request_id, "No main frame", -1, GURL(""), val)); 317 params.request_id,
318 "No main frame",
319 -1,
320 GURL(std::string()),
321 val));
318 return; 322 return;
319 } 323 }
320 324
321 // chrome.tabs.executeScript() only supports execution in either the top frame 325 // chrome.tabs.executeScript() only supports execution in either the top frame
322 // or all frames. We handle both cases in the top frame. 326 // or all frames. We handle both cases in the top frame.
323 SchedulerMap::iterator i = g_schedulers.Get().find(main_frame); 327 SchedulerMap::iterator i = g_schedulers.Get().find(main_frame);
324 if (i != g_schedulers.Get().end()) 328 if (i != g_schedulers.Get().end())
325 i->second->ExecuteCode(params); 329 i->second->ExecuteCode(params);
326 } 330 }
327 331
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 v8::Handle<v8::Context> script_context = 376 v8::Handle<v8::Context> script_context =
373 render_view()->GetWebView()->mainFrame()->mainWorldScriptContext(); 377 render_view()->GetWebView()->mainFrame()->mainWorldScriptContext();
374 ChromeV8Context* chrome_v8_context = 378 ChromeV8Context* chrome_v8_context =
375 dispatcher_->v8_context_set().GetByV8Context(script_context); 379 dispatcher_->v8_context_set().GetByV8Context(script_context);
376 if (!chrome_v8_context) 380 if (!chrome_v8_context)
377 return; 381 return;
378 chrome_v8_context->CallChromeHiddenMethod("OnAppWindowClosed", 0, NULL, NULL); 382 chrome_v8_context->CallChromeHiddenMethod("OnAppWindowClosed", 0, NULL, NULL);
379 } 383 }
380 384
381 } // namespace extensions 385 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/chrome_v8_context.cc ('k') | chrome/renderer/extensions/resource_request_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698