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

Side by Side Diff: content/renderer/render_view_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
« no previous file with comments | « content/public/renderer/render_view_observer.h ('k') | extensions/browser/extension_error.h » ('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 "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2396 matching lines...) Expand 10 before | Expand all | Expand 10 after
2407 case WebConsoleMessage::LevelWarning: 2407 case WebConsoleMessage::LevelWarning:
2408 log_severity = logging::LOG_WARNING; 2408 log_severity = logging::LOG_WARNING;
2409 break; 2409 break;
2410 case WebConsoleMessage::LevelError: 2410 case WebConsoleMessage::LevelError:
2411 log_severity = logging::LOG_ERROR; 2411 log_severity = logging::LOG_ERROR;
2412 break; 2412 break;
2413 default: 2413 default:
2414 NOTREACHED(); 2414 NOTREACHED();
2415 } 2415 }
2416 2416
2417 if (shouldReportDetailedMessageForSource(source_name)) {
2418 FOR_EACH_OBSERVER(
2419 RenderViewObserver,
2420 observers_,
2421 DetailedConsoleMessageAdded(message.text,
2422 source_name,
2423 stack_trace,
2424 source_line,
2425 static_cast<int32>(log_severity)));
2426 }
2427
2417 Send(new ViewHostMsg_AddMessageToConsole(routing_id_, 2428 Send(new ViewHostMsg_AddMessageToConsole(routing_id_,
2418 static_cast<int32>(log_severity), 2429 static_cast<int32>(log_severity),
2419 message.text, 2430 message.text,
2420 static_cast<int32>(source_line), 2431 static_cast<int32>(source_line),
2421 source_name, 2432 source_name));
2422 stack_trace));
2423 } 2433 }
2424 2434
2425 void RenderViewImpl::printPage(WebFrame* frame) { 2435 void RenderViewImpl::printPage(WebFrame* frame) {
2426 FOR_EACH_OBSERVER(RenderViewObserver, observers_, 2436 FOR_EACH_OBSERVER(RenderViewObserver, observers_,
2427 PrintPage(frame, handling_input_event_)); 2437 PrintPage(frame, handling_input_event_));
2428 } 2438 }
2429 2439
2430 WebKit::WebNotificationPresenter* RenderViewImpl::notificationPresenter() { 2440 WebKit::WebNotificationPresenter* RenderViewImpl::notificationPresenter() {
2431 return notification_provider_; 2441 return notification_provider_;
2432 } 2442 }
(...skipping 4079 matching lines...) Expand 10 before | Expand all | Expand 10 after
6512 for (size_t i = 0; i < icon_urls.size(); i++) { 6522 for (size_t i = 0; i < icon_urls.size(); i++) {
6513 WebURL url = icon_urls[i].iconURL(); 6523 WebURL url = icon_urls[i].iconURL();
6514 if (!url.isEmpty()) 6524 if (!url.isEmpty())
6515 urls.push_back(FaviconURL(url, 6525 urls.push_back(FaviconURL(url,
6516 ToFaviconType(icon_urls[i].iconType()))); 6526 ToFaviconType(icon_urls[i].iconType())));
6517 } 6527 }
6518 SendUpdateFaviconURL(urls); 6528 SendUpdateFaviconURL(urls);
6519 } 6529 }
6520 6530
6521 } // namespace content 6531 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/render_view_observer.h ('k') | extensions/browser/extension_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698