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

Side by Side Diff: extensions/browser/extension_function.cc

Issue 1200503002: [Extensions] Kill off ExtensionMsg_AddMessageToConsole (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "extensions/browser/extension_function.h" 5 #include "extensions/browser/extension_function.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "content/public/browser/notification_source.h" 10 #include "content/public/browser/notification_source.h"
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 472
473 void UIThreadExtensionFunction::SetTransferredBlobUUIDs( 473 void UIThreadExtensionFunction::SetTransferredBlobUUIDs(
474 const std::vector<std::string>& blob_uuids) { 474 const std::vector<std::string>& blob_uuids) {
475 DCHECK(transferred_blob_uuids_.empty()); // Should only be called once. 475 DCHECK(transferred_blob_uuids_.empty()); // Should only be called once.
476 transferred_blob_uuids_ = blob_uuids; 476 transferred_blob_uuids_ = blob_uuids;
477 } 477 }
478 478
479 void UIThreadExtensionFunction::WriteToConsole( 479 void UIThreadExtensionFunction::WriteToConsole(
480 content::ConsoleMessageLevel level, 480 content::ConsoleMessageLevel level,
481 const std::string& message) { 481 const std::string& message) {
482 render_frame_host_->Send(new ExtensionMsg_AddMessageToConsole( 482 WebContents::FromRenderFrameHost(render_frame_host_)
not at google - send to devlin 2015/06/19 23:14:58 Can you just call render_frame_host_->AddMessageTo
Devlin 2015/06/19 23:53:51 We should only call AddMessageToConsole on the mai
not at google - send to devlin 2015/06/22 17:54:10 Seems like a devtools bug, at least in their API,
Devlin 2015/06/22 19:52:32 Added comment.
483 render_frame_host_->GetRoutingID(), level, message)); 483 ->GetMainFrame()
484 ->AddMessageToConsole(level, message);
484 } 485 }
485 486
486 IOThreadExtensionFunction::IOThreadExtensionFunction() 487 IOThreadExtensionFunction::IOThreadExtensionFunction()
487 : routing_id_(MSG_ROUTING_NONE) { 488 : routing_id_(MSG_ROUTING_NONE) {
488 } 489 }
489 490
490 IOThreadExtensionFunction::~IOThreadExtensionFunction() { 491 IOThreadExtensionFunction::~IOThreadExtensionFunction() {
491 } 492 }
492 493
493 IOThreadExtensionFunction* 494 IOThreadExtensionFunction*
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 551
551 ExtensionFunction::ResponseAction SyncIOThreadExtensionFunction::Run() { 552 ExtensionFunction::ResponseAction SyncIOThreadExtensionFunction::Run() {
552 return RespondNow(RunSync() ? ArgumentList(results_.Pass()) : Error(error_)); 553 return RespondNow(RunSync() ? ArgumentList(results_.Pass()) : Error(error_));
553 } 554 }
554 555
555 // static 556 // static
556 bool SyncIOThreadExtensionFunction::ValidationFailure( 557 bool SyncIOThreadExtensionFunction::ValidationFailure(
557 SyncIOThreadExtensionFunction* function) { 558 SyncIOThreadExtensionFunction* function) {
558 return false; 559 return false;
559 } 560 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698