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 2230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2241 return NULL; | 2241 return NULL; |
2242 #endif | 2242 #endif |
2243 } | 2243 } |
2244 | 2244 |
2245 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace() { | 2245 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace() { |
2246 CHECK(session_storage_namespace_id_ != | 2246 CHECK(session_storage_namespace_id_ != |
2247 dom_storage::kInvalidSessionStorageNamespaceId); | 2247 dom_storage::kInvalidSessionStorageNamespaceId); |
2248 return new WebStorageNamespaceImpl(session_storage_namespace_id_); | 2248 return new WebStorageNamespaceImpl(session_storage_namespace_id_); |
2249 } | 2249 } |
2250 | 2250 |
| 2251 bool RenderViewImpl::shouldReportDetailedMessage(const WebString& source) { |
| 2252 return GetContentClient()->renderer()->ShouldReportDetailedMessage( |
| 2253 GURL(source.utf8().data())); |
| 2254 } |
| 2255 |
2251 void RenderViewImpl::didAddMessageToConsole( | 2256 void RenderViewImpl::didAddMessageToConsole( |
2252 const WebConsoleMessage& message, const WebString& source_name, | 2257 const WebConsoleMessage& message, const WebString& source_name, |
2253 unsigned source_line) { | 2258 unsigned source_line, const WebString& stack_trace) { |
2254 logging::LogSeverity log_severity = logging::LOG_VERBOSE; | 2259 logging::LogSeverity log_severity = logging::LOG_VERBOSE; |
2255 switch (message.level) { | 2260 switch (message.level) { |
2256 case WebConsoleMessage::LevelDebug: | 2261 case WebConsoleMessage::LevelDebug: |
2257 log_severity = logging::LOG_VERBOSE; | 2262 log_severity = logging::LOG_VERBOSE; |
2258 break; | 2263 break; |
2259 case WebConsoleMessage::LevelLog: | 2264 case WebConsoleMessage::LevelLog: |
2260 log_severity = logging::LOG_INFO; | 2265 log_severity = logging::LOG_INFO; |
2261 break; | 2266 break; |
2262 case WebConsoleMessage::LevelWarning: | 2267 case WebConsoleMessage::LevelWarning: |
2263 log_severity = logging::LOG_WARNING; | 2268 log_severity = logging::LOG_WARNING; |
2264 break; | 2269 break; |
2265 case WebConsoleMessage::LevelError: | 2270 case WebConsoleMessage::LevelError: |
2266 log_severity = logging::LOG_ERROR; | 2271 log_severity = logging::LOG_ERROR; |
2267 break; | 2272 break; |
2268 default: | 2273 default: |
2269 NOTREACHED(); | 2274 NOTREACHED(); |
2270 } | 2275 } |
2271 | 2276 |
2272 Send(new ViewHostMsg_AddMessageToConsole(routing_id_, | 2277 Send(new ViewHostMsg_AddMessageToConsole(routing_id_, |
2273 static_cast<int32>(log_severity), | 2278 static_cast<int32>(log_severity), |
2274 message.text, | 2279 message.text, |
2275 static_cast<int32>(source_line), | 2280 static_cast<int32>(source_line), |
2276 source_name)); | 2281 source_name, |
| 2282 stack_trace)); |
2277 } | 2283 } |
2278 | 2284 |
2279 void RenderViewImpl::printPage(WebFrame* frame) { | 2285 void RenderViewImpl::printPage(WebFrame* frame) { |
2280 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 2286 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
2281 PrintPage(frame, handling_input_event_)); | 2287 PrintPage(frame, handling_input_event_)); |
2282 } | 2288 } |
2283 | 2289 |
2284 WebKit::WebNotificationPresenter* RenderViewImpl::notificationPresenter() { | 2290 WebKit::WebNotificationPresenter* RenderViewImpl::notificationPresenter() { |
2285 return notification_provider_; | 2291 return notification_provider_; |
2286 } | 2292 } |
(...skipping 4531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6818 WebURL url = icon_urls[i].iconURL(); | 6824 WebURL url = icon_urls[i].iconURL(); |
6819 if (!url.isEmpty()) | 6825 if (!url.isEmpty()) |
6820 urls.push_back(FaviconURL(url, | 6826 urls.push_back(FaviconURL(url, |
6821 ToFaviconType(icon_urls[i].iconType()))); | 6827 ToFaviconType(icon_urls[i].iconType()))); |
6822 } | 6828 } |
6823 SendUpdateFaviconURL(urls); | 6829 SendUpdateFaviconURL(urls); |
6824 } | 6830 } |
6825 | 6831 |
6826 | 6832 |
6827 } // namespace content | 6833 } // namespace content |
OLD | NEW |