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 3697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3708 bool WebContentsImpl::AddMessageToConsole(int32 level, | 3708 bool WebContentsImpl::AddMessageToConsole(int32 level, |
3709 const base::string16& message, | 3709 const base::string16& message, |
3710 int32 line_no, | 3710 int32 line_no, |
3711 const base::string16& source_id) { | 3711 const base::string16& source_id) { |
3712 if (!delegate_) | 3712 if (!delegate_) |
3713 return false; | 3713 return false; |
3714 return delegate_->AddMessageToConsole(this, level, message, line_no, | 3714 return delegate_->AddMessageToConsole(this, level, message, line_no, |
3715 source_id); | 3715 source_id); |
3716 } | 3716 } |
3717 | 3717 |
3718 WebPreferences WebContentsImpl::GetWebkitPrefs() { | 3718 WebPreferences WebContentsImpl::ComputeWebkitPrefs() { |
3719 // We want to base the page config off of the actual URL, rather than the | 3719 // We want to base the page config off of the actual URL, rather than the |
3720 // virtual URL. | 3720 // virtual URL. |
3721 // TODO(nasko): Investigate how to remove the GetActiveEntry usage here, | 3721 // TODO(nasko): Investigate how to remove the GetActiveEntry usage here, |
3722 // as it is deprecated and can be out of sync with GetRenderViewHost(). | 3722 // as it is deprecated and can be out of sync with GetRenderViewHost(). |
3723 GURL url = controller_.GetActiveEntry() | 3723 GURL url = controller_.GetActiveEntry() |
3724 ? controller_.GetActiveEntry()->GetURL() : GURL::EmptyGURL(); | 3724 ? controller_.GetActiveEntry()->GetURL() : GURL::EmptyGURL(); |
3725 | 3725 |
3726 return GetRenderManager()->current_host()->GetWebkitPrefs(url); | 3726 return GetRenderManager()->current_host()->ComputeWebkitPrefs(url); |
3727 } | 3727 } |
3728 | 3728 |
3729 int WebContentsImpl::CreateSwappedOutRenderView( | 3729 int WebContentsImpl::CreateSwappedOutRenderView( |
3730 SiteInstance* instance) { | 3730 SiteInstance* instance) { |
3731 return GetRenderManager()->CreateRenderFrame(instance, MSG_ROUTING_NONE, | 3731 return GetRenderManager()->CreateRenderFrame(instance, MSG_ROUTING_NONE, |
3732 true, true); | 3732 true, true); |
3733 } | 3733 } |
3734 | 3734 |
3735 void WebContentsImpl::OnUserGesture() { | 3735 void WebContentsImpl::OnUserGesture() { |
3736 // Notify observers. | 3736 // Notify observers. |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4116 if (new_size != old_size) | 4116 if (new_size != old_size) |
4117 delegate_->UpdatePreferredSize(this, new_size); | 4117 delegate_->UpdatePreferredSize(this, new_size); |
4118 } | 4118 } |
4119 | 4119 |
4120 void WebContentsImpl::ResumeResponseDeferredAtStart() { | 4120 void WebContentsImpl::ResumeResponseDeferredAtStart() { |
4121 FrameTreeNode* node = frame_tree_.root(); | 4121 FrameTreeNode* node = frame_tree_.root(); |
4122 node->render_manager()->ResumeResponseDeferredAtStart(); | 4122 node->render_manager()->ResumeResponseDeferredAtStart(); |
4123 } | 4123 } |
4124 | 4124 |
4125 } // namespace content | 4125 } // namespace content |
OLD | NEW |