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 2980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2991 if (delegate_ && delegate_->HandleContextMenu(params)) | 2991 if (delegate_ && delegate_->HandleContextMenu(params)) |
2992 return; | 2992 return; |
2993 | 2993 |
2994 render_view_host_delegate_view_->ShowContextMenu(render_frame_host, params); | 2994 render_view_host_delegate_view_->ShowContextMenu(render_frame_host, params); |
2995 } | 2995 } |
2996 | 2996 |
2997 WebContents* WebContentsImpl::GetAsWebContents() { | 2997 WebContents* WebContentsImpl::GetAsWebContents() { |
2998 return this; | 2998 return this; |
2999 } | 2999 } |
3000 | 3000 |
| 3001 bool WebContentsImpl::IsNeverVisible() { |
| 3002 if (!delegate_) |
| 3003 return false; |
| 3004 return delegate_->IsWebContentsNeverVisible(this); |
| 3005 } |
| 3006 |
3001 RenderViewHostDelegateView* WebContentsImpl::GetDelegateView() { | 3007 RenderViewHostDelegateView* WebContentsImpl::GetDelegateView() { |
3002 return render_view_host_delegate_view_; | 3008 return render_view_host_delegate_view_; |
3003 } | 3009 } |
3004 | 3010 |
3005 RendererPreferences WebContentsImpl::GetRendererPrefs( | 3011 RendererPreferences WebContentsImpl::GetRendererPrefs( |
3006 BrowserContext* browser_context) const { | 3012 BrowserContext* browser_context) const { |
3007 return renderer_preferences_; | 3013 return renderer_preferences_; |
3008 } | 3014 } |
3009 | 3015 |
3010 gfx::Rect WebContentsImpl::GetRootWindowResizerRect() const { | 3016 gfx::Rect WebContentsImpl::GetRootWindowResizerRect() const { |
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3820 | 3826 |
3821 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3827 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
3822 if (!delegate_) | 3828 if (!delegate_) |
3823 return; | 3829 return; |
3824 const gfx::Size new_size = GetPreferredSize(); | 3830 const gfx::Size new_size = GetPreferredSize(); |
3825 if (new_size != old_size) | 3831 if (new_size != old_size) |
3826 delegate_->UpdatePreferredSize(this, new_size); | 3832 delegate_->UpdatePreferredSize(this, new_size); |
3827 } | 3833 } |
3828 | 3834 |
3829 } // namespace content | 3835 } // namespace content |
OLD | NEW |