| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/tab_contents/tab_contents.h" | 5 #include "chrome/browser/tab_contents/tab_contents.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 rwhv->DidBecomeSelected(); | 792 rwhv->DidBecomeSelected(); |
| 793 #if defined(OS_MACOSX) | 793 #if defined(OS_MACOSX) |
| 794 rwhv->SetActive(true); | 794 rwhv->SetActive(true); |
| 795 #endif | 795 #endif |
| 796 } | 796 } |
| 797 | 797 |
| 798 WebCacheManager::GetInstance()->ObserveActivity(GetRenderProcessHost()->id()); | 798 WebCacheManager::GetInstance()->ObserveActivity(GetRenderProcessHost()->id()); |
| 799 last_selected_time_ = base::TimeTicks::Now(); | 799 last_selected_time_ = base::TimeTicks::Now(); |
| 800 } | 800 } |
| 801 | 801 |
| 802 void TabContents::FadeForInstant() { | 802 void TabContents::FadeForInstant(bool animate) { |
| 803 RenderWidgetHostView* rwhv = GetRenderWidgetHostView(); | 803 RenderWidgetHostView* rwhv = GetRenderWidgetHostView(); |
| 804 SkColor whitish = SkColorSetARGB(192, 255, 255, 255); | 804 SkColor whitish = SkColorSetARGB(192, 255, 255, 255); |
| 805 if (rwhv) | 805 if (rwhv) |
| 806 rwhv->SetVisuallyDeemphasized(&whitish, true); | 806 rwhv->SetVisuallyDeemphasized(&whitish, animate); |
| 807 } | 807 } |
| 808 | 808 |
| 809 void TabContents::CancelInstantFade() { | 809 void TabContents::CancelInstantFade() { |
| 810 RenderWidgetHostView* rwhv = GetRenderWidgetHostView(); | 810 RenderWidgetHostView* rwhv = GetRenderWidgetHostView(); |
| 811 if (rwhv) | 811 if (rwhv) |
| 812 rwhv->SetVisuallyDeemphasized(NULL, false); | 812 rwhv->SetVisuallyDeemphasized(NULL, false); |
| 813 } | 813 } |
| 814 | 814 |
| 815 void TabContents::WasHidden() { | 815 void TabContents::WasHidden() { |
| 816 if (!capturing_contents()) { | 816 if (!capturing_contents()) { |
| (...skipping 2490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3307 } | 3307 } |
| 3308 | 3308 |
| 3309 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { | 3309 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { |
| 3310 render_manager_.SwapInRenderViewHost(rvh); | 3310 render_manager_.SwapInRenderViewHost(rvh); |
| 3311 } | 3311 } |
| 3312 | 3312 |
| 3313 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 3313 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
| 3314 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 3314 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
| 3315 rwh_view->SetSize(view()->GetContainerSize()); | 3315 rwh_view->SetSize(view()->GetContainerSize()); |
| 3316 } | 3316 } |
| OLD | NEW |