| 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 3098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3109 dialog_manager_->RunBeforeUnloadDialog( | 3109 dialog_manager_->RunBeforeUnloadDialog( |
| 3110 this, message, is_reload, | 3110 this, message, is_reload, |
| 3111 base::Bind(&WebContentsImpl::OnDialogClosed, base::Unretained(this), | 3111 base::Bind(&WebContentsImpl::OnDialogClosed, base::Unretained(this), |
| 3112 rfh, reply_msg, false)); | 3112 rfh, reply_msg, false)); |
| 3113 } | 3113 } |
| 3114 | 3114 |
| 3115 WebContents* WebContentsImpl::GetAsWebContents() { | 3115 WebContents* WebContentsImpl::GetAsWebContents() { |
| 3116 return this; | 3116 return this; |
| 3117 } | 3117 } |
| 3118 | 3118 |
| 3119 bool WebContentsImpl::IsNeverVisible() { |
| 3120 if (!delegate_) |
| 3121 return false; |
| 3122 return delegate_->IsNeverVisible(this); |
| 3123 } |
| 3124 |
| 3119 RenderViewHostDelegateView* WebContentsImpl::GetDelegateView() { | 3125 RenderViewHostDelegateView* WebContentsImpl::GetDelegateView() { |
| 3120 return render_view_host_delegate_view_; | 3126 return render_view_host_delegate_view_; |
| 3121 } | 3127 } |
| 3122 | 3128 |
| 3123 RendererPreferences WebContentsImpl::GetRendererPrefs( | 3129 RendererPreferences WebContentsImpl::GetRendererPrefs( |
| 3124 BrowserContext* browser_context) const { | 3130 BrowserContext* browser_context) const { |
| 3125 return renderer_preferences_; | 3131 return renderer_preferences_; |
| 3126 } | 3132 } |
| 3127 | 3133 |
| 3128 gfx::Rect WebContentsImpl::GetRootWindowResizerRect() const { | 3134 gfx::Rect WebContentsImpl::GetRootWindowResizerRect() const { |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3867 | 3873 |
| 3868 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3874 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
| 3869 if (!delegate_) | 3875 if (!delegate_) |
| 3870 return; | 3876 return; |
| 3871 const gfx::Size new_size = GetPreferredSize(); | 3877 const gfx::Size new_size = GetPreferredSize(); |
| 3872 if (new_size != old_size) | 3878 if (new_size != old_size) |
| 3873 delegate_->UpdatePreferredSize(this, new_size); | 3879 delegate_->UpdatePreferredSize(this, new_size); |
| 3874 } | 3880 } |
| 3875 | 3881 |
| 3876 } // namespace content | 3882 } // namespace content |
| OLD | NEW |