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 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1517 } | 1517 } |
1518 | 1518 |
1519 void RenderViewHostImpl::OnAddMessageToConsole( | 1519 void RenderViewHostImpl::OnAddMessageToConsole( |
1520 int32 level, | 1520 int32 level, |
1521 const string16& message, | 1521 const string16& message, |
1522 int32 line_no, | 1522 int32 line_no, |
1523 const string16& source_id) { | 1523 const string16& source_id) { |
1524 if (delegate_->AddMessageToConsole(level, message, line_no, source_id)) | 1524 if (delegate_->AddMessageToConsole(level, message, line_no, source_id)) |
1525 return; | 1525 return; |
1526 // Pass through log level only on WebUI pages to limit console spew. | 1526 // Pass through log level only on WebUI pages to limit console spew. |
1527 int32 resolved_level = | 1527 int32 resolved_level = HasWebUIScheme(delegate_->GetURL()) ? level : 0; |
1528 (enabled_bindings_ & BINDINGS_POLICY_WEB_UI) ? level : 0; | |
1529 | 1528 |
1530 if (resolved_level >= ::logging::GetMinLogLevel()) { | 1529 if (resolved_level >= ::logging::GetMinLogLevel()) { |
1531 logging::LogMessage("CONSOLE", line_no, resolved_level).stream() << "\"" << | 1530 logging::LogMessage("CONSOLE", line_no, resolved_level).stream() << "\"" << |
1532 message << "\", source: " << source_id << " (" << line_no << ")"; | 1531 message << "\", source: " << source_id << " (" << line_no << ")"; |
1533 } | 1532 } |
1534 } | 1533 } |
1535 | 1534 |
1536 void RenderViewHostImpl::AddObserver(RenderViewHostObserver* observer) { | 1535 void RenderViewHostImpl::AddObserver(RenderViewHostObserver* observer) { |
1537 observers_.AddObserver(observer); | 1536 observers_.AddObserver(observer); |
1538 } | 1537 } |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2058 GetRoutingID(), snapshot_id, snapshot_size, png)); | 2057 GetRoutingID(), snapshot_id, snapshot_size, png)); |
2059 return; | 2058 return; |
2060 } | 2059 } |
2061 } | 2060 } |
2062 | 2061 |
2063 Send(new ViewMsg_WindowSnapshotCompleted( | 2062 Send(new ViewMsg_WindowSnapshotCompleted( |
2064 GetRoutingID(), snapshot_id, gfx::Size(), png)); | 2063 GetRoutingID(), snapshot_id, gfx::Size(), png)); |
2065 } | 2064 } |
2066 | 2065 |
2067 } // namespace content | 2066 } // namespace content |
OLD | NEW |