Index: ash/frame/caption_buttons/frame_caption_button_container_view.cc |
diff --git a/ash/frame/caption_buttons/frame_caption_button_container_view.cc b/ash/frame/caption_buttons/frame_caption_button_container_view.cc |
index 03f0297c839dc2cf9803a4542664c09a563e383c..9ecfae041b91addacf4352a7ff03dd76140ef842 100644 |
--- a/ash/frame/caption_buttons/frame_caption_button_container_view.cc |
+++ b/ash/frame/caption_buttons/frame_caption_button_container_view.cc |
@@ -11,7 +11,7 @@ |
#include "ash/frame/caption_buttons/frame_size_button.h" |
#include "ash/shell.h" |
#include "ash/shell_port.h" |
-#include "ash/wm/maximize_mode/maximize_mode_controller.h" |
+#include "ash/wm/tablet_mode/tablet_mode_controller.h" |
#include "ui/base/hit_test.h" |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/compositor/scoped_animation_duration_scale_mode.h" |
@@ -35,11 +35,11 @@ |
// Duration of the animation of the alpha of |size_button_|. |
const int kAlphaAnimationDurationMs = 250; |
-// Delay during |maximize_mode_animation_| hide to wait before beginning to |
+// Delay during |tablet_mode_animation_| hide to wait before beginning to |
// animate the position of |minimize_button_|. |
const int kHidePositionDelayMs = 100; |
-// Duration of |maximize_mode_animation_| hiding. |
+// Duration of |tablet_mode_animation_| hiding. |
// Hiding size button 250 |
// |------------------------| |
// Delay 100 Slide minimize button 500 |
@@ -47,39 +47,39 @@ |
const int kHideAnimationDurationMs = |
kHidePositionDelayMs + kPositionAnimationDurationMs; |
-// Delay during |maximize_mode_animation_| show to wait before beginning to |
+// Delay during |tablet_mode_animation_| show to wait before beginning to |
// animate the alpha of |size_button_|. |
const int kShowAnimationAlphaDelayMs = 100; |
-// Duration of |maximize_mode_animation_| showing. |
+// Duration of |tablet_mode_animation_| showing. |
// Slide minimize button 500 |
// |-------------------------------------------------| |
// Delay 100 Show size button 250 |
// |---------|-----------------------| |
const int kShowAnimationDurationMs = kPositionAnimationDurationMs; |
-// Value of |maximize_mode_animation_| showing to begin animating alpha of |
+// Value of |tablet_mode_animation_| showing to begin animating alpha of |
// |size_button_|. |
float SizeButtonShowStartValue() { |
return static_cast<float>(kShowAnimationAlphaDelayMs) / |
kShowAnimationDurationMs; |
} |
-// Amount of |maximize_mode_animation_| showing to animate the alpha of |
+// Amount of |tablet_mode_animation_| showing to animate the alpha of |
// |size_button_|. |
float SizeButtonShowDuration() { |
return static_cast<float>(kAlphaAnimationDurationMs) / |
kShowAnimationDurationMs; |
} |
-// Amount of |maximize_mode_animation_| hiding to animate the alpha of |
+// Amount of |tablet_mode_animation_| hiding to animate the alpha of |
// |size_button_|. |
float SizeButtonHideDuration() { |
return static_cast<float>(kAlphaAnimationDurationMs) / |
kHideAnimationDurationMs; |
} |
-// Value of |maximize_mode_animation_| hiding to begin animating the position of |
+// Value of |tablet_mode_animation_| hiding to begin animating the position of |
// |minimize_button_|. |
float HidePositionStartValue() { |
return 1.0f - |
@@ -115,12 +115,12 @@ |
size_button_(NULL), |
close_button_(NULL) { |
bool size_button_visibility = ShouldSizeButtonBeVisible(); |
- maximize_mode_animation_.reset(new gfx::SlideAnimation(this)); |
- maximize_mode_animation_->SetTweenType(gfx::Tween::LINEAR); |
+ tablet_mode_animation_.reset(new gfx::SlideAnimation(this)); |
+ tablet_mode_animation_->SetTweenType(gfx::Tween::LINEAR); |
// Ensure animation tracks visibility of size button. |
if (size_button_visibility) |
- maximize_mode_animation_->Reset(1.0f); |
+ tablet_mode_animation_->Reset(1.0f); |
// Insert the buttons left to right. |
minimize_button_ = new FrameCaptionButton(this, CAPTION_BUTTON_ICON_MINIMIZE); |
@@ -144,7 +144,7 @@ |
FrameCaptionButtonContainerView::~FrameCaptionButtonContainerView() {} |
void FrameCaptionButtonContainerView::TestApi::EndAnimations() { |
- container_view_->maximize_mode_animation_->End(); |
+ container_view_->tablet_mode_animation_->End(); |
} |
void FrameCaptionButtonContainerView::SetButtonImage( |
@@ -196,11 +196,11 @@ |
bool visible = ShouldSizeButtonBeVisible(); |
if (visible) { |
size_button_->SetVisible(true); |
- maximize_mode_animation_->SetSlideDuration(kShowAnimationDurationMs); |
- maximize_mode_animation_->Show(); |
+ tablet_mode_animation_->SetSlideDuration(kShowAnimationDurationMs); |
+ tablet_mode_animation_->Show(); |
} else { |
- maximize_mode_animation_->SetSlideDuration(kHideAnimationDurationMs); |
- maximize_mode_animation_->Hide(); |
+ tablet_mode_animation_->SetSlideDuration(kHideAnimationDurationMs); |
+ tablet_mode_animation_->Hide(); |
} |
} |
@@ -231,8 +231,8 @@ |
child->SetBounds(x, 0, size.width(), size.height()); |
x += size.width(); |
} |
- if (maximize_mode_animation_->is_animating()) { |
- AnimationProgressed(maximize_mode_animation_.get()); |
+ if (tablet_mode_animation_->is_animating()) { |
+ AnimationProgressed(tablet_mode_animation_.get()); |
} |
} |
@@ -245,7 +245,7 @@ |
// Ensure that position is calculated at least once. |
AnimationProgressed(animation); |
- double current_value = maximize_mode_animation_->GetCurrentValue(); |
+ double current_value = tablet_mode_animation_->GetCurrentValue(); |
if (current_value == 0.0) { |
size_button_->SetVisible(false); |
PreferredSizeChanged(); |
@@ -257,7 +257,7 @@ |
double current_value = animation->GetCurrentValue(); |
int size_alpha = 0; |
int minimize_x = 0; |
- if (maximize_mode_animation_->IsShowing()) { |
+ if (tablet_mode_animation_->IsShowing()) { |
double scaled_value = |
CapAnimationValue((current_value - SizeButtonShowStartValue()) / |
SizeButtonShowDuration()); |
@@ -308,8 +308,8 @@ |
bool FrameCaptionButtonContainerView::ShouldSizeButtonBeVisible() const { |
return !Shell::Get() |
- ->maximize_mode_controller() |
- ->IsMaximizeModeWindowManagerEnabled() && |
+ ->tablet_mode_controller() |
+ ->IsTabletModeWindowManagerEnabled() && |
frame_->widget_delegate()->CanMaximize(); |
} |