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

Side by Side Diff: chrome/browser/extensions/extension_host.cc

Issue 23923003: Expand RuntimeErrors for ErrorConsole (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Copyright fix Created 7 years, 3 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
« no previous file with comments | « chrome/browser/extensions/event_router.cc ('k') | chrome/browser/extensions/tab_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/extensions/extension_host.h" 5 #include "chrome/browser/extensions/extension_host.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 if (pm) 573 if (pm)
574 pm->DecrementLazyKeepaliveCount(extension()); 574 pm->DecrementLazyKeepaliveCount(extension());
575 } 575 }
576 576
577 void ExtensionHost::OnDetailedConsoleMessageAdded( 577 void ExtensionHost::OnDetailedConsoleMessageAdded(
578 const base::string16& message, 578 const base::string16& message,
579 const base::string16& source, 579 const base::string16& source,
580 const StackTrace& stack_trace, 580 const StackTrace& stack_trace,
581 int32 severity_level) { 581 int32 severity_level) {
582 if (IsSourceFromAnExtension(source)) { 582 if (IsSourceFromAnExtension(source)) {
583 GURL context_url;
584 if (associated_web_contents_)
585 context_url = associated_web_contents_->GetLastCommittedURL();
586 else if (host_contents_.get())
587 context_url = host_contents_->GetLastCommittedURL();
588
583 ErrorConsole::Get(profile_)->ReportError( 589 ErrorConsole::Get(profile_)->ReportError(
584 scoped_ptr<ExtensionError>(new RuntimeError( 590 scoped_ptr<ExtensionError>(new RuntimeError(
591 extension_id_,
585 profile_->IsOffTheRecord(), 592 profile_->IsOffTheRecord(),
586 source, 593 source,
587 message, 594 message,
588 stack_trace, 595 stack_trace,
589 associated_web_contents_ ? 596 context_url,
590 associated_web_contents_->GetLastCommittedURL() :
591 GURL::EmptyGURL(),
592 static_cast<logging::LogSeverity>(severity_level)))); 597 static_cast<logging::LogSeverity>(severity_level))));
593 } 598 }
594 } 599 }
595 600
596 void ExtensionHost::UnhandledKeyboardEvent( 601 void ExtensionHost::UnhandledKeyboardEvent(
597 WebContents* source, 602 WebContents* source,
598 const content::NativeWebKeyboardEvent& event) { 603 const content::NativeWebKeyboardEvent& event) {
599 Browser* browser = view() ? view()->browser() : NULL; 604 Browser* browser = view() ? view()->browser() : NULL;
600 if (browser) { 605 if (browser) {
601 // Handle lower priority browser shortcuts such as Ctrl-f. 606 // Handle lower priority browser shortcuts such as Ctrl-f.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 699
695 void ExtensionHost::RequestMediaAccessPermission( 700 void ExtensionHost::RequestMediaAccessPermission(
696 content::WebContents* web_contents, 701 content::WebContents* web_contents,
697 const content::MediaStreamRequest& request, 702 const content::MediaStreamRequest& request,
698 const content::MediaResponseCallback& callback) { 703 const content::MediaResponseCallback& callback) {
699 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( 704 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
700 web_contents, request, callback, extension()); 705 web_contents, request, callback, extension());
701 } 706 }
702 707
703 } // namespace extensions 708 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/event_router.cc ('k') | chrome/browser/extensions/tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698