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