| 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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 void TabContents::HandleMouseActivate() { | 512 void TabContents::HandleMouseActivate() { |
| 513 if (delegate_) | 513 if (delegate_) |
| 514 delegate_->HandleMouseActivate(); | 514 delegate_->HandleMouseActivate(); |
| 515 } | 515 } |
| 516 | 516 |
| 517 void TabContents::ToggleFullscreenMode(bool enter_fullscreen) { | 517 void TabContents::ToggleFullscreenMode(bool enter_fullscreen) { |
| 518 if (delegate_) | 518 if (delegate_) |
| 519 delegate_->ToggleFullscreenModeForTab(this, enter_fullscreen); | 519 delegate_->ToggleFullscreenModeForTab(this, enter_fullscreen); |
| 520 } | 520 } |
| 521 | 521 |
| 522 bool TabContents::IsFullscreenForCurrentTab() const { |
| 523 return delegate_ ? delegate_->IsFullscreenForTab(this) : false; |
| 524 } |
| 525 |
| 522 void TabContents::UpdatePreferredSize(const gfx::Size& pref_size) { | 526 void TabContents::UpdatePreferredSize(const gfx::Size& pref_size) { |
| 523 if (delegate_) | 527 if (delegate_) |
| 524 delegate_->UpdatePreferredSize(this, pref_size); | 528 delegate_->UpdatePreferredSize(this, pref_size); |
| 525 } | 529 } |
| 526 | 530 |
| 527 void TabContents::ShowContents() { | 531 void TabContents::ShowContents() { |
| 528 RenderWidgetHostView* rwhv = GetRenderWidgetHostView(); | 532 RenderWidgetHostView* rwhv = GetRenderWidgetHostView(); |
| 529 if (rwhv) | 533 if (rwhv) |
| 530 rwhv->DidBecomeSelected(); | 534 rwhv->DidBecomeSelected(); |
| 531 } | 535 } |
| (...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2015 } | 2019 } |
| 2016 | 2020 |
| 2017 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { | 2021 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { |
| 2018 render_manager_.SwapInRenderViewHost(rvh); | 2022 render_manager_.SwapInRenderViewHost(rvh); |
| 2019 } | 2023 } |
| 2020 | 2024 |
| 2021 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2025 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
| 2022 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 2026 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
| 2023 rwh_view->SetSize(view()->GetContainerSize()); | 2027 rwh_view->SetSize(view()->GetContainerSize()); |
| 2024 } | 2028 } |
| OLD | NEW |