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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 23007021: Report Javascript Runtime Errors to the Error Console (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_ec_feldman
Patch Set: 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
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 "content/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1521 NotificationService::current()->Notify( 1521 NotificationService::current()->Notify(
1522 NOTIFICATION_FOCUS_CHANGED_IN_PAGE, 1522 NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
1523 Source<RenderViewHost>(this), 1523 Source<RenderViewHost>(this),
1524 Details<const bool>(&is_editable_node)); 1524 Details<const bool>(&is_editable_node));
1525 } 1525 }
1526 1526
1527 void RenderViewHostImpl::OnAddMessageToConsole( 1527 void RenderViewHostImpl::OnAddMessageToConsole(
1528 int32 level, 1528 int32 level,
1529 const string16& message, 1529 const string16& message,
1530 int32 line_no, 1530 int32 line_no,
1531 const string16& source_id, 1531 const string16& source_id) {
1532 const string16& stack_trace) { 1532 if (delegate_->AddMessageToConsole(level, message, line_no, source_id))
1533 if (delegate_->AddMessageToConsole(
1534 level, message, line_no, source_id, stack_trace)) {
1535 return; 1533 return;
1536 } 1534
1537 // Pass through log level only on WebUI pages to limit console spew. 1535 // Pass through log level only on WebUI pages to limit console spew.
1538 int32 resolved_level = HasWebUIScheme(delegate_->GetURL()) ? level : 0; 1536 int32 resolved_level = HasWebUIScheme(delegate_->GetURL()) ? level : 0;
1539 1537
1540 if (resolved_level >= ::logging::GetMinLogLevel()) { 1538 if (resolved_level >= ::logging::GetMinLogLevel()) {
1541 logging::LogMessage("CONSOLE", line_no, resolved_level).stream() << "\"" << 1539 logging::LogMessage("CONSOLE", line_no, resolved_level).stream() << "\"" <<
1542 message << "\", source: " << source_id << " (" << line_no << ")"; 1540 message << "\", source: " << source_id << " (" << line_no << ")";
1543 } 1541 }
1544 } 1542 }
1545 1543
1546 void RenderViewHostImpl::AddObserver(RenderViewHostObserver* observer) { 1544 void RenderViewHostImpl::AddObserver(RenderViewHostObserver* observer) {
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
2067 const std::vector<base::FilePath>& file_paths = state.GetReferencedFiles(); 2065 const std::vector<base::FilePath>& file_paths = state.GetReferencedFiles();
2068 for (std::vector<base::FilePath>::const_iterator file = file_paths.begin(); 2066 for (std::vector<base::FilePath>::const_iterator file = file_paths.begin();
2069 file != file_paths.end(); ++file) { 2067 file != file_paths.end(); ++file) {
2070 if (!policy->CanReadFile(GetProcess()->GetID(), *file)) 2068 if (!policy->CanReadFile(GetProcess()->GetID(), *file))
2071 return false; 2069 return false;
2072 } 2070 }
2073 return true; 2071 return true;
2074 } 2072 }
2075 2073
2076 } // namespace content 2074 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698