| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 void TabContents::HandleMouseUp() { | 473 void TabContents::HandleMouseUp() { |
| 474 if (delegate_) | 474 if (delegate_) |
| 475 delegate_->HandleMouseUp(); | 475 delegate_->HandleMouseUp(); |
| 476 } | 476 } |
| 477 | 477 |
| 478 void TabContents::HandleMouseActivate() { | 478 void TabContents::HandleMouseActivate() { |
| 479 if (delegate_) | 479 if (delegate_) |
| 480 delegate_->HandleMouseActivate(); | 480 delegate_->HandleMouseActivate(); |
| 481 } | 481 } |
| 482 | 482 |
| 483 void TabContents::ToggleFullscreenMode(bool enter_fullscreen) { |
| 484 if (delegate_) |
| 485 delegate_->ToggleFullscreenModeForTab(this, enter_fullscreen); |
| 486 } |
| 487 |
| 483 void TabContents::ShowContents() { | 488 void TabContents::ShowContents() { |
| 484 RenderWidgetHostView* rwhv = GetRenderWidgetHostView(); | 489 RenderWidgetHostView* rwhv = GetRenderWidgetHostView(); |
| 485 if (rwhv) | 490 if (rwhv) |
| 486 rwhv->DidBecomeSelected(); | 491 rwhv->DidBecomeSelected(); |
| 487 } | 492 } |
| 488 | 493 |
| 489 void TabContents::HideContents() { | 494 void TabContents::HideContents() { |
| 490 // TODO(pkasting): http://b/1239839 Right now we purposefully don't call | 495 // TODO(pkasting): http://b/1239839 Right now we purposefully don't call |
| 491 // our superclass HideContents(), because some callers want to be very picky | 496 // our superclass HideContents(), because some callers want to be very picky |
| 492 // about the order in which these get called. In addition to making the code | 497 // about the order in which these get called. In addition to making the code |
| (...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1876 } | 1881 } |
| 1877 | 1882 |
| 1878 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { | 1883 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { |
| 1879 render_manager_.SwapInRenderViewHost(rvh); | 1884 render_manager_.SwapInRenderViewHost(rvh); |
| 1880 } | 1885 } |
| 1881 | 1886 |
| 1882 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 1887 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
| 1883 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 1888 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
| 1884 rwh_view->SetSize(view()->GetContainerSize()); | 1889 rwh_view->SetSize(view()->GetContainerSize()); |
| 1885 } | 1890 } |
| OLD | NEW |