OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |