| 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 3408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3419 dialog_manager_ = delegate_->GetJavaScriptDialogManager(); | 3419 dialog_manager_ = delegate_->GetJavaScriptDialogManager(); |
| 3420 dialog_manager_->RunBeforeUnloadDialog( | 3420 dialog_manager_->RunBeforeUnloadDialog( |
| 3421 this, message, is_reload, | 3421 this, message, is_reload, |
| 3422 base::Bind(&WebContentsImpl::OnDialogClosed, base::Unretained(this), rvh, | 3422 base::Bind(&WebContentsImpl::OnDialogClosed, base::Unretained(this), rvh, |
| 3423 reply_msg)); | 3423 reply_msg)); |
| 3424 } | 3424 } |
| 3425 | 3425 |
| 3426 bool WebContentsImpl::AddMessageToConsole(int32 level, | 3426 bool WebContentsImpl::AddMessageToConsole(int32 level, |
| 3427 const string16& message, | 3427 const string16& message, |
| 3428 int32 line_no, | 3428 int32 line_no, |
| 3429 const string16& source_id, | 3429 const string16& source_id) { |
| 3430 const string16& stack_trace) { | |
| 3431 if (!delegate_) | 3430 if (!delegate_) |
| 3432 return false; | 3431 return false; |
| 3433 return delegate_->AddMessageToConsole(this, level, message, line_no, | 3432 return delegate_->AddMessageToConsole(this, level, message, line_no, |
| 3434 source_id); | 3433 source_id); |
| 3435 } | 3434 } |
| 3436 | 3435 |
| 3437 WebPreferences WebContentsImpl::GetWebkitPrefs() { | 3436 WebPreferences WebContentsImpl::GetWebkitPrefs() { |
| 3438 // We want to base the page config off of the real URL, rather than the | 3437 // We want to base the page config off of the real URL, rather than the |
| 3439 // display URL. | 3438 // display URL. |
| 3440 GURL url = controller_.GetActiveEntry() | 3439 GURL url = controller_.GetActiveEntry() |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3755 gfx::Size WebContentsImpl::GetSizeForNewRenderView() const { | 3754 gfx::Size WebContentsImpl::GetSizeForNewRenderView() const { |
| 3756 gfx::Size size; | 3755 gfx::Size size; |
| 3757 if (delegate_) | 3756 if (delegate_) |
| 3758 size = delegate_->GetSizeForNewRenderView(this); | 3757 size = delegate_->GetSizeForNewRenderView(this); |
| 3759 if (size.IsEmpty()) | 3758 if (size.IsEmpty()) |
| 3760 size = view_->GetContainerSize(); | 3759 size = view_->GetContainerSize(); |
| 3761 return size; | 3760 return size; |
| 3762 } | 3761 } |
| 3763 | 3762 |
| 3764 } // namespace content | 3763 } // namespace content |
| OLD | NEW |