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