Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 23007021: Report Javascript Runtime Errors to the Error Console (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_ec_feldman
Patch Set: Comment Condensed Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 3409 matching lines...) Expand 10 before | Expand all | Expand 10 after
3420 this, message, is_reload, 3420 this, message, is_reload,
3421 base::Bind(&WebContentsImpl::OnDialogClosed, base::Unretained(this), rvh, 3421 base::Bind(&WebContentsImpl::OnDialogClosed, base::Unretained(this), rvh,
3422 reply_msg)); 3422 reply_msg));
3423 } 3423 }
3424 3424
3425 bool WebContentsImpl::AddMessageToConsole(int32 level, 3425 bool WebContentsImpl::AddMessageToConsole(int32 level,
3426 const string16& message, 3426 const string16& message,
3427 int32 line_no, 3427 int32 line_no,
3428 const string16& source_id, 3428 const string16& source_id,
3429 const string16& stack_trace) { 3429 const string16& stack_trace) {
3430 FOR_EACH_OBSERVER(WebContentsObserver,
3431 observers_,
3432 OnMessageAddedToConsole(
3433 source_id,
3434 message,
3435 stack_trace,
3436 line_no,
3437 static_cast<logging::LogSeverity>(level)));
3430 if (!delegate_) 3438 if (!delegate_)
3431 return false; 3439 return false;
3432 return delegate_->AddMessageToConsole(this, level, message, line_no, 3440 return delegate_->AddMessageToConsole(this, level, message, line_no,
3433 source_id); 3441 source_id);
3434 } 3442 }
3435 3443
3436 WebPreferences WebContentsImpl::GetWebkitPrefs() { 3444 WebPreferences WebContentsImpl::GetWebkitPrefs() {
3437 // We want to base the page config off of the real URL, rather than the 3445 // We want to base the page config off of the real URL, rather than the
3438 // display URL. 3446 // display URL.
3439 GURL url = controller_.GetActiveEntry() 3447 GURL url = controller_.GetActiveEntry()
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
3745 } 3753 }
3746 3754
3747 void WebContentsImpl::ClearAllPowerSaveBlockers() { 3755 void WebContentsImpl::ClearAllPowerSaveBlockers() {
3748 for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin()); 3756 for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin());
3749 i != power_save_blockers_.end(); ++i) 3757 i != power_save_blockers_.end(); ++i)
3750 STLDeleteValues(&power_save_blockers_[i->first]); 3758 STLDeleteValues(&power_save_blockers_[i->first]);
3751 power_save_blockers_.clear(); 3759 power_save_blockers_.clear();
3752 } 3760 }
3753 3761
3754 } // namespace content 3762 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698