| 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/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1521 NotificationService::current()->Notify( | 1521 NotificationService::current()->Notify( |
| 1522 NOTIFICATION_FOCUS_CHANGED_IN_PAGE, | 1522 NOTIFICATION_FOCUS_CHANGED_IN_PAGE, |
| 1523 Source<RenderViewHost>(this), | 1523 Source<RenderViewHost>(this), |
| 1524 Details<const bool>(&is_editable_node)); | 1524 Details<const bool>(&is_editable_node)); |
| 1525 } | 1525 } |
| 1526 | 1526 |
| 1527 void RenderViewHostImpl::OnAddMessageToConsole( | 1527 void RenderViewHostImpl::OnAddMessageToConsole( |
| 1528 int32 level, | 1528 int32 level, |
| 1529 const string16& message, | 1529 const string16& message, |
| 1530 int32 line_no, | 1530 int32 line_no, |
| 1531 const string16& source_id, | 1531 const string16& source_id) { |
| 1532 const string16& stack_trace) { | 1532 if (delegate_->AddMessageToConsole(level, message, line_no, source_id)) |
| 1533 if (delegate_->AddMessageToConsole( | |
| 1534 level, message, line_no, source_id, stack_trace)) { | |
| 1535 return; | 1533 return; |
| 1536 } | 1534 |
| 1537 // Pass through log level only on WebUI pages to limit console spew. | 1535 // Pass through log level only on WebUI pages to limit console spew. |
| 1538 int32 resolved_level = HasWebUIScheme(delegate_->GetURL()) ? level : 0; | 1536 int32 resolved_level = HasWebUIScheme(delegate_->GetURL()) ? level : 0; |
| 1539 | 1537 |
| 1540 if (resolved_level >= ::logging::GetMinLogLevel()) { | 1538 if (resolved_level >= ::logging::GetMinLogLevel()) { |
| 1541 logging::LogMessage("CONSOLE", line_no, resolved_level).stream() << "\"" << | 1539 logging::LogMessage("CONSOLE", line_no, resolved_level).stream() << "\"" << |
| 1542 message << "\", source: " << source_id << " (" << line_no << ")"; | 1540 message << "\", source: " << source_id << " (" << line_no << ")"; |
| 1543 } | 1541 } |
| 1544 } | 1542 } |
| 1545 | 1543 |
| 1546 void RenderViewHostImpl::AddObserver(RenderViewHostObserver* observer) { | 1544 void RenderViewHostImpl::AddObserver(RenderViewHostObserver* observer) { |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2067 const std::vector<base::FilePath>& file_paths = state.GetReferencedFiles(); | 2065 const std::vector<base::FilePath>& file_paths = state.GetReferencedFiles(); |
| 2068 for (std::vector<base::FilePath>::const_iterator file = file_paths.begin(); | 2066 for (std::vector<base::FilePath>::const_iterator file = file_paths.begin(); |
| 2069 file != file_paths.end(); ++file) { | 2067 file != file_paths.end(); ++file) { |
| 2070 if (!policy->CanReadFile(GetProcess()->GetID(), *file)) | 2068 if (!policy->CanReadFile(GetProcess()->GetID(), *file)) |
| 2071 return false; | 2069 return false; |
| 2072 } | 2070 } |
| 2073 return true; | 2071 return true; |
| 2074 } | 2072 } |
| 2075 | 2073 |
| 2076 } // namespace content | 2074 } // namespace content |
| OLD | NEW |