OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/tab_contents/tab_contents.h" | 5 #include "content/browser/tab_contents/tab_contents.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 void TabContents::HandleMouseActivate() { | 503 void TabContents::HandleMouseActivate() { |
504 if (delegate_) | 504 if (delegate_) |
505 delegate_->HandleMouseActivate(); | 505 delegate_->HandleMouseActivate(); |
506 } | 506 } |
507 | 507 |
508 void TabContents::ToggleFullscreenMode(bool enter_fullscreen) { | 508 void TabContents::ToggleFullscreenMode(bool enter_fullscreen) { |
509 if (delegate_) | 509 if (delegate_) |
510 delegate_->ToggleFullscreenModeForTab(this, enter_fullscreen); | 510 delegate_->ToggleFullscreenModeForTab(this, enter_fullscreen); |
511 } | 511 } |
512 | 512 |
| 513 void TabContents::UpdatePreferredSize(const gfx::Size& pref_size) { |
| 514 if (delegate_) |
| 515 delegate_->UpdatePreferredSize(this, pref_size); |
| 516 } |
| 517 |
513 void TabContents::ShowContents() { | 518 void TabContents::ShowContents() { |
514 RenderWidgetHostView* rwhv = GetRenderWidgetHostView(); | 519 RenderWidgetHostView* rwhv = GetRenderWidgetHostView(); |
515 if (rwhv) | 520 if (rwhv) |
516 rwhv->DidBecomeSelected(); | 521 rwhv->DidBecomeSelected(); |
517 } | 522 } |
518 | 523 |
519 void TabContents::HideContents() { | 524 void TabContents::HideContents() { |
520 // TODO(pkasting): http://b/1239839 Right now we purposefully don't call | 525 // TODO(pkasting): http://b/1239839 Right now we purposefully don't call |
521 // our superclass HideContents(), because some callers want to be very picky | 526 // our superclass HideContents(), because some callers want to be very picky |
522 // about the order in which these get called. In addition to making the code | 527 // about the order in which these get called. In addition to making the code |
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1983 } | 1988 } |
1984 | 1989 |
1985 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { | 1990 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { |
1986 render_manager_.SwapInRenderViewHost(rvh); | 1991 render_manager_.SwapInRenderViewHost(rvh); |
1987 } | 1992 } |
1988 | 1993 |
1989 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 1994 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
1990 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 1995 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
1991 rwh_view->SetSize(view()->GetContainerSize()); | 1996 rwh_view->SetSize(view()->GetContainerSize()); |
1992 } | 1997 } |
OLD | NEW |