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 4243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4254 | 4254 |
4255 void WebContentsImpl::SetEncoding(const std::string& encoding) { | 4255 void WebContentsImpl::SetEncoding(const std::string& encoding) { |
4256 if (encoding == last_reported_encoding_) | 4256 if (encoding == last_reported_encoding_) |
4257 return; | 4257 return; |
4258 last_reported_encoding_ = encoding; | 4258 last_reported_encoding_ = encoding; |
4259 | 4259 |
4260 canonical_encoding_ = GetContentClient()->browser()-> | 4260 canonical_encoding_ = GetContentClient()->browser()-> |
4261 GetCanonicalEncodingNameByAliasName(encoding); | 4261 GetCanonicalEncodingNameByAliasName(encoding); |
4262 } | 4262 } |
4263 | 4263 |
4264 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | |
4265 RenderWidgetHostViewBase* rwh_view = view_->CreateViewForWidget(rvh); | |
4266 // Can be NULL during tests. | |
4267 if (rwh_view) | |
4268 rwh_view->SetSize(GetContainerBounds().size()); | |
4269 } | |
4270 | |
4271 bool WebContentsImpl::IsHidden() { | 4264 bool WebContentsImpl::IsHidden() { |
4272 return capturer_count_ == 0 && !should_normally_be_visible_; | 4265 return capturer_count_ == 0 && !should_normally_be_visible_; |
4273 } | 4266 } |
4274 | 4267 |
4275 RenderFrameHostManager* WebContentsImpl::GetRenderManager() const { | 4268 RenderFrameHostManager* WebContentsImpl::GetRenderManager() const { |
4276 return frame_tree_.root()->render_manager(); | 4269 return frame_tree_.root()->render_manager(); |
4277 } | 4270 } |
4278 | 4271 |
4279 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { | 4272 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { |
4280 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); | 4273 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4373 node->render_manager()->ResumeResponseDeferredAtStart(); | 4366 node->render_manager()->ResumeResponseDeferredAtStart(); |
4374 } | 4367 } |
4375 | 4368 |
4376 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4369 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4377 force_disable_overscroll_content_ = force_disable; | 4370 force_disable_overscroll_content_ = force_disable; |
4378 if (view_) | 4371 if (view_) |
4379 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4372 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4380 } | 4373 } |
4381 | 4374 |
4382 } // namespace content | 4375 } // namespace content |
OLD | NEW |