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 2372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2383 external_popup_menu_.reset( | 2383 external_popup_menu_.reset( |
2384 new ExternalPopupMenu(this, popup_menu_info, popup_menu_client)); | 2384 new ExternalPopupMenu(this, popup_menu_info, popup_menu_client)); |
2385 return external_popup_menu_.get(); | 2385 return external_popup_menu_.get(); |
2386 } | 2386 } |
2387 | 2387 |
2388 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace() { | 2388 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace() { |
2389 CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId); | 2389 CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId); |
2390 return new WebStorageNamespaceImpl(session_storage_namespace_id_); | 2390 return new WebStorageNamespaceImpl(session_storage_namespace_id_); |
2391 } | 2391 } |
2392 | 2392 |
| 2393 bool RenderViewImpl::shouldReportDetailedMessageForSource( |
| 2394 const WebString& source) { |
| 2395 return GetContentClient()->renderer()->ShouldReportDetailedMessageForSource( |
| 2396 source); |
| 2397 } |
| 2398 |
2393 void RenderViewImpl::didAddMessageToConsole( | 2399 void RenderViewImpl::didAddMessageToConsole( |
2394 const WebConsoleMessage& message, const WebString& source_name, | 2400 const WebConsoleMessage& message, const WebString& source_name, |
2395 unsigned source_line) { | 2401 unsigned source_line) { |
| 2402 didAddMessageToConsole(message, source_name, source_line, WebString()); |
| 2403 } |
| 2404 |
| 2405 void RenderViewImpl::didAddMessageToConsole( |
| 2406 const WebConsoleMessage& message, const WebString& source_name, |
| 2407 unsigned source_line, const WebString& stack_trace) { |
2396 logging::LogSeverity log_severity = logging::LOG_VERBOSE; | 2408 logging::LogSeverity log_severity = logging::LOG_VERBOSE; |
2397 switch (message.level) { | 2409 switch (message.level) { |
2398 case WebConsoleMessage::LevelDebug: | 2410 case WebConsoleMessage::LevelDebug: |
2399 log_severity = logging::LOG_VERBOSE; | 2411 log_severity = logging::LOG_VERBOSE; |
2400 break; | 2412 break; |
2401 case WebConsoleMessage::LevelLog: | 2413 case WebConsoleMessage::LevelLog: |
2402 log_severity = logging::LOG_INFO; | 2414 log_severity = logging::LOG_INFO; |
2403 break; | 2415 break; |
2404 case WebConsoleMessage::LevelWarning: | 2416 case WebConsoleMessage::LevelWarning: |
2405 log_severity = logging::LOG_WARNING; | 2417 log_severity = logging::LOG_WARNING; |
2406 break; | 2418 break; |
2407 case WebConsoleMessage::LevelError: | 2419 case WebConsoleMessage::LevelError: |
2408 log_severity = logging::LOG_ERROR; | 2420 log_severity = logging::LOG_ERROR; |
2409 break; | 2421 break; |
2410 default: | 2422 default: |
2411 NOTREACHED(); | 2423 NOTREACHED(); |
2412 } | 2424 } |
2413 | 2425 |
2414 Send(new ViewHostMsg_AddMessageToConsole(routing_id_, | 2426 Send(new ViewHostMsg_AddMessageToConsole(routing_id_, |
2415 static_cast<int32>(log_severity), | 2427 static_cast<int32>(log_severity), |
2416 message.text, | 2428 message.text, |
2417 static_cast<int32>(source_line), | 2429 static_cast<int32>(source_line), |
2418 source_name)); | 2430 source_name, |
| 2431 stack_trace)); |
2419 } | 2432 } |
2420 | 2433 |
2421 void RenderViewImpl::printPage(WebFrame* frame) { | 2434 void RenderViewImpl::printPage(WebFrame* frame) { |
2422 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 2435 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
2423 PrintPage(frame, handling_input_event_)); | 2436 PrintPage(frame, handling_input_event_)); |
2424 } | 2437 } |
2425 | 2438 |
2426 WebKit::WebNotificationPresenter* RenderViewImpl::notificationPresenter() { | 2439 WebKit::WebNotificationPresenter* RenderViewImpl::notificationPresenter() { |
2427 return notification_provider_; | 2440 return notification_provider_; |
2428 } | 2441 } |
(...skipping 4117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6546 WebURL url = icon_urls[i].iconURL(); | 6559 WebURL url = icon_urls[i].iconURL(); |
6547 if (!url.isEmpty()) | 6560 if (!url.isEmpty()) |
6548 urls.push_back(FaviconURL(url, | 6561 urls.push_back(FaviconURL(url, |
6549 ToFaviconType(icon_urls[i].iconType()))); | 6562 ToFaviconType(icon_urls[i].iconType()))); |
6550 } | 6563 } |
6551 SendUpdateFaviconURL(urls); | 6564 SendUpdateFaviconURL(urls); |
6552 } | 6565 } |
6553 | 6566 |
6554 | 6567 |
6555 } // namespace content | 6568 } // namespace content |
OLD | NEW |