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 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2233 return NULL; | 2233 return NULL; |
2234 #endif | 2234 #endif |
2235 } | 2235 } |
2236 | 2236 |
2237 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace() { | 2237 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace() { |
2238 CHECK(session_storage_namespace_id_ != | 2238 CHECK(session_storage_namespace_id_ != |
2239 dom_storage::kInvalidSessionStorageNamespaceId); | 2239 dom_storage::kInvalidSessionStorageNamespaceId); |
2240 return new WebStorageNamespaceImpl(session_storage_namespace_id_); | 2240 return new WebStorageNamespaceImpl(session_storage_namespace_id_); |
2241 } | 2241 } |
2242 | 2242 |
| 2243 bool RenderViewImpl::shouldReportDetailedMessage(const WebString& source) { |
| 2244 return GetContentClient()->renderer()->ShouldReportDetailedMessage( |
| 2245 GURL(source.utf8().data())); |
| 2246 } |
| 2247 |
2243 void RenderViewImpl::didAddMessageToConsole( | 2248 void RenderViewImpl::didAddMessageToConsole( |
2244 const WebConsoleMessage& message, const WebString& source_name, | 2249 const WebConsoleMessage& message, const WebString& source_name, |
2245 unsigned source_line) { | 2250 unsigned source_line, const WebString& stack_trace) { |
2246 logging::LogSeverity log_severity = logging::LOG_VERBOSE; | 2251 logging::LogSeverity log_severity = logging::LOG_VERBOSE; |
2247 switch (message.level) { | 2252 switch (message.level) { |
2248 case WebConsoleMessage::LevelDebug: | 2253 case WebConsoleMessage::LevelDebug: |
2249 log_severity = logging::LOG_VERBOSE; | 2254 log_severity = logging::LOG_VERBOSE; |
2250 break; | 2255 break; |
2251 case WebConsoleMessage::LevelLog: | 2256 case WebConsoleMessage::LevelLog: |
2252 log_severity = logging::LOG_INFO; | 2257 log_severity = logging::LOG_INFO; |
2253 break; | 2258 break; |
2254 case WebConsoleMessage::LevelWarning: | 2259 case WebConsoleMessage::LevelWarning: |
2255 log_severity = logging::LOG_WARNING; | 2260 log_severity = logging::LOG_WARNING; |
2256 break; | 2261 break; |
2257 case WebConsoleMessage::LevelError: | 2262 case WebConsoleMessage::LevelError: |
2258 log_severity = logging::LOG_ERROR; | 2263 log_severity = logging::LOG_ERROR; |
2259 break; | 2264 break; |
2260 default: | 2265 default: |
2261 NOTREACHED(); | 2266 NOTREACHED(); |
2262 } | 2267 } |
2263 | 2268 |
2264 Send(new ViewHostMsg_AddMessageToConsole(routing_id_, | 2269 Send(new ViewHostMsg_AddMessageToConsole(routing_id_, |
2265 static_cast<int32>(log_severity), | 2270 static_cast<int32>(log_severity), |
2266 message.text, | 2271 message.text, |
2267 static_cast<int32>(source_line), | 2272 static_cast<int32>(source_line), |
2268 source_name)); | 2273 source_name, |
| 2274 stack_trace)); |
2269 } | 2275 } |
2270 | 2276 |
2271 void RenderViewImpl::printPage(WebFrame* frame) { | 2277 void RenderViewImpl::printPage(WebFrame* frame) { |
2272 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 2278 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
2273 PrintPage(frame, handling_input_event_)); | 2279 PrintPage(frame, handling_input_event_)); |
2274 } | 2280 } |
2275 | 2281 |
2276 WebKit::WebNotificationPresenter* RenderViewImpl::notificationPresenter() { | 2282 WebKit::WebNotificationPresenter* RenderViewImpl::notificationPresenter() { |
2277 return notification_provider_; | 2283 return notification_provider_; |
2278 } | 2284 } |
(...skipping 4528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6807 WebURL url = icon_urls[i].iconURL(); | 6813 WebURL url = icon_urls[i].iconURL(); |
6808 if (!url.isEmpty()) | 6814 if (!url.isEmpty()) |
6809 urls.push_back(FaviconURL(url, | 6815 urls.push_back(FaviconURL(url, |
6810 ToFaviconType(icon_urls[i].iconType()))); | 6816 ToFaviconType(icon_urls[i].iconType()))); |
6811 } | 6817 } |
6812 SendUpdateFaviconURL(urls); | 6818 SendUpdateFaviconURL(urls); |
6813 } | 6819 } |
6814 | 6820 |
6815 | 6821 |
6816 } // namespace content | 6822 } // namespace content |
OLD | NEW |