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/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 4440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4451 // RenderFrameHost will have to be associated with the appropriate | 4451 // RenderFrameHost will have to be associated with the appropriate |
4452 // RenderWidgetHostView or a new one should be created here. | 4452 // RenderWidgetHostView or a new one should be created here. |
4453 | 4453 |
4454 return true; | 4454 return true; |
4455 } | 4455 } |
4456 | 4456 |
4457 #if defined(OS_ANDROID) | 4457 #if defined(OS_ANDROID) |
4458 | 4458 |
4459 base::android::ScopedJavaLocalRef<jobject> | 4459 base::android::ScopedJavaLocalRef<jobject> |
4460 WebContentsImpl::GetJavaWebContents() { | 4460 WebContentsImpl::GetJavaWebContents() { |
4461 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 4461 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
4462 return GetWebContentsAndroid()->GetJavaObject(); | 4462 return GetWebContentsAndroid()->GetJavaObject(); |
4463 } | 4463 } |
4464 | 4464 |
4465 WebContentsAndroid* WebContentsImpl::GetWebContentsAndroid() { | 4465 WebContentsAndroid* WebContentsImpl::GetWebContentsAndroid() { |
4466 WebContentsAndroid* web_contents_android = | 4466 WebContentsAndroid* web_contents_android = |
4467 static_cast<WebContentsAndroid*>(GetUserData(kWebContentsAndroidKey)); | 4467 static_cast<WebContentsAndroid*>(GetUserData(kWebContentsAndroidKey)); |
4468 if (!web_contents_android) { | 4468 if (!web_contents_android) { |
4469 web_contents_android = new WebContentsAndroid(this); | 4469 web_contents_android = new WebContentsAndroid(this); |
4470 SetUserData(kWebContentsAndroidKey, web_contents_android); | 4470 SetUserData(kWebContentsAndroidKey, web_contents_android); |
4471 } | 4471 } |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4648 node->render_manager()->ResumeResponseDeferredAtStart(); | 4648 node->render_manager()->ResumeResponseDeferredAtStart(); |
4649 } | 4649 } |
4650 | 4650 |
4651 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4651 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4652 force_disable_overscroll_content_ = force_disable; | 4652 force_disable_overscroll_content_ = force_disable; |
4653 if (view_) | 4653 if (view_) |
4654 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4654 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4655 } | 4655 } |
4656 | 4656 |
4657 } // namespace content | 4657 } // namespace content |
OLD | NEW |