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 3807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3818 bool WebContentsImpl::AddMessageToConsole(int32 level, | 3818 bool WebContentsImpl::AddMessageToConsole(int32 level, |
3819 const base::string16& message, | 3819 const base::string16& message, |
3820 int32 line_no, | 3820 int32 line_no, |
3821 const base::string16& source_id) { | 3821 const base::string16& source_id) { |
3822 if (!delegate_) | 3822 if (!delegate_) |
3823 return false; | 3823 return false; |
3824 return delegate_->AddMessageToConsole(this, level, message, line_no, | 3824 return delegate_->AddMessageToConsole(this, level, message, line_no, |
3825 source_id); | 3825 source_id); |
3826 } | 3826 } |
3827 | 3827 |
3828 WebPreferences WebContentsImpl::GetWebkitPrefs() { | 3828 WebPreferences WebContentsImpl::ComputeWebkitPrefs() { |
3829 // We want to base the page config off of the actual URL, rather than the | 3829 // We want to base the page config off of the actual URL, rather than the |
3830 // virtual URL. | 3830 // virtual URL. |
3831 // TODO(nasko): Investigate how to remove the GetActiveEntry usage here, | 3831 // TODO(nasko): Investigate how to remove the GetActiveEntry usage here, |
3832 // as it is deprecated and can be out of sync with GetRenderViewHost(). | 3832 // as it is deprecated and can be out of sync with GetRenderViewHost(). |
3833 GURL url = controller_.GetActiveEntry() | 3833 GURL url = controller_.GetActiveEntry() |
3834 ? controller_.GetActiveEntry()->GetURL() : GURL::EmptyGURL(); | 3834 ? controller_.GetActiveEntry()->GetURL() : GURL::EmptyGURL(); |
3835 | 3835 |
3836 return GetRenderManager()->current_host()->GetWebkitPrefs(url); | 3836 return GetRenderManager()->current_host()->ComputeWebkitPrefs(url); |
3837 } | 3837 } |
3838 | 3838 |
3839 int WebContentsImpl::CreateSwappedOutRenderView( | 3839 int WebContentsImpl::CreateSwappedOutRenderView( |
3840 SiteInstance* instance) { | 3840 SiteInstance* instance) { |
3841 return GetRenderManager()->CreateRenderFrame(instance, MSG_ROUTING_NONE, | 3841 return GetRenderManager()->CreateRenderFrame(instance, MSG_ROUTING_NONE, |
3842 true, true); | 3842 true, true); |
3843 } | 3843 } |
3844 | 3844 |
3845 void WebContentsImpl::OnUserGesture() { | 3845 void WebContentsImpl::OnUserGesture() { |
3846 // Notify observers. | 3846 // Notify observers. |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4224 if (new_size != old_size) | 4224 if (new_size != old_size) |
4225 delegate_->UpdatePreferredSize(this, new_size); | 4225 delegate_->UpdatePreferredSize(this, new_size); |
4226 } | 4226 } |
4227 | 4227 |
4228 void WebContentsImpl::ResumeResponseDeferredAtStart() { | 4228 void WebContentsImpl::ResumeResponseDeferredAtStart() { |
4229 FrameTreeNode* node = frame_tree_.root(); | 4229 FrameTreeNode* node = frame_tree_.root(); |
4230 node->render_manager()->ResumeResponseDeferredAtStart(); | 4230 node->render_manager()->ResumeResponseDeferredAtStart(); |
4231 } | 4231 } |
4232 | 4232 |
4233 } // namespace content | 4233 } // namespace content |
OLD | NEW |