| 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/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 3397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3408 dialog_manager_ = delegate_->GetJavaScriptDialogManager(); | 3408 dialog_manager_ = delegate_->GetJavaScriptDialogManager(); |
| 3409 dialog_manager_->RunBeforeUnloadDialog( | 3409 dialog_manager_->RunBeforeUnloadDialog( |
| 3410 this, message, is_reload, | 3410 this, message, is_reload, |
| 3411 base::Bind(&WebContentsImpl::OnDialogClosed, base::Unretained(this), rvh, | 3411 base::Bind(&WebContentsImpl::OnDialogClosed, base::Unretained(this), rvh, |
| 3412 reply_msg)); | 3412 reply_msg)); |
| 3413 } | 3413 } |
| 3414 | 3414 |
| 3415 bool WebContentsImpl::AddMessageToConsole(int32 level, | 3415 bool WebContentsImpl::AddMessageToConsole(int32 level, |
| 3416 const string16& message, | 3416 const string16& message, |
| 3417 int32 line_no, | 3417 int32 line_no, |
| 3418 const string16& source_id) { | 3418 const string16& source_id, |
| 3419 const string16& stack_trace) { |
| 3419 if (!delegate_) | 3420 if (!delegate_) |
| 3420 return false; | 3421 return false; |
| 3421 return delegate_->AddMessageToConsole(this, level, message, line_no, | 3422 return delegate_->AddMessageToConsole(this, level, message, line_no, |
| 3422 source_id); | 3423 source_id); |
| 3423 } | 3424 } |
| 3424 | 3425 |
| 3425 WebPreferences WebContentsImpl::GetWebkitPrefs() { | 3426 WebPreferences WebContentsImpl::GetWebkitPrefs() { |
| 3426 // We want to base the page config off of the real URL, rather than the | 3427 // We want to base the page config off of the real URL, rather than the |
| 3427 // display URL. | 3428 // display URL. |
| 3428 GURL url = controller_.GetActiveEntry() | 3429 GURL url = controller_.GetActiveEntry() |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3713 } | 3714 } |
| 3714 | 3715 |
| 3715 void WebContentsImpl::ClearAllPowerSaveBlockers() { | 3716 void WebContentsImpl::ClearAllPowerSaveBlockers() { |
| 3716 for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin()); | 3717 for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin()); |
| 3717 i != power_save_blockers_.end(); ++i) | 3718 i != power_save_blockers_.end(); ++i) |
| 3718 STLDeleteValues(&power_save_blockers_[i->first]); | 3719 STLDeleteValues(&power_save_blockers_[i->first]); |
| 3719 power_save_blockers_.clear(); | 3720 power_save_blockers_.clear(); |
| 3720 } | 3721 } |
| 3721 | 3722 |
| 3722 } // namespace content | 3723 } // namespace content |
| OLD | NEW |