summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/ui/panels/panel_bounds_animation.cc (renamed from chrome/browser/ui/panels/panel_slide_animation.cc)17
-rw-r--r--chrome/browser/ui/panels/panel_bounds_animation.h (renamed from chrome/browser/ui/panels/panel_slide_animation.h)20
-rw-r--r--chrome/browser/ui/panels/panel_browser_view.cc4
-rw-r--r--chrome/browser/ui/panels/panel_browser_view.h6
-rw-r--r--chrome/browser/ui/panels/panel_browser_view_browsertest.cc4
-rw-r--r--chrome/browser/ui/panels/panel_browser_window_gtk.cc5
-rw-r--r--chrome/browser/ui/panels/panel_browser_window_gtk.h9
-rw-r--r--chrome/browser/ui/panels/panel_window_controller_cocoa.mm4
-rw-r--r--chrome/chrome_browser.gypi4
9 files changed, 33 insertions, 40 deletions
diff --git a/chrome/browser/ui/panels/panel_slide_animation.cc b/chrome/browser/ui/panels/panel_bounds_animation.cc
index 6924987..cdf5c5a 100644
--- a/chrome/browser/ui/panels/panel_slide_animation.cc
+++ b/chrome/browser/ui/panels/panel_bounds_animation.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/panels/panel_slide_animation.h"
+#include "chrome/browser/ui/panels/panel_bounds_animation.h"
#include "chrome/browser/ui/panels/panel.h"
#include "chrome/browser/ui/panels/panel_manager.h"
@@ -16,10 +16,10 @@ const int kSetBoundsAnimationBigMinimizeMs = 1500;
}
-PanelSlideAnimation::PanelSlideAnimation(ui::AnimationDelegate* target,
- Panel* panel,
- const gfx::Rect& initial_bounds,
- const gfx::Rect& final_bounds)
+PanelBoundsAnimation::PanelBoundsAnimation(ui::AnimationDelegate* target,
+ Panel* panel,
+ const gfx::Rect& initial_bounds,
+ const gfx::Rect& final_bounds)
: ui::LinearAnimation(kDefaultFramerateHz, target),
panel_(panel),
for_big_minimize_(false),
@@ -42,16 +42,16 @@ PanelSlideAnimation::PanelSlideAnimation(ui::AnimationDelegate* target,
SetDuration(PanelManager::AdjustTimeInterval(duration));
}
-PanelSlideAnimation::~PanelSlideAnimation() {
+PanelBoundsAnimation::~PanelBoundsAnimation() {
}
-double PanelSlideAnimation::GetCurrentValue() const {
+double PanelBoundsAnimation::GetCurrentValue() const {
return ComputeAnimationValue(ui::LinearAnimation::GetCurrentValue(),
for_big_minimize_,
animation_stop_to_show_titlebar_);
}
-double PanelSlideAnimation::ComputeAnimationValue(double progress,
+double PanelBoundsAnimation::ComputeAnimationValue(double progress,
bool for_big_minimize, double animation_stop_to_show_titlebar) {
if (!for_big_minimize) {
// Cubic easing out.
@@ -78,4 +78,3 @@ double PanelSlideAnimation::ComputeAnimationValue(double progress,
}
return value;
}
-
diff --git a/chrome/browser/ui/panels/panel_slide_animation.h b/chrome/browser/ui/panels/panel_bounds_animation.h
index f133b0d..d5a4a3e 100644
--- a/chrome/browser/ui/panels/panel_slide_animation.h
+++ b/chrome/browser/ui/panels/panel_bounds_animation.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_PANELS_PANEL_SLIDE_ANIMATION_H_
-#define CHROME_BROWSER_UI_PANELS_PANEL_SLIDE_ANIMATION_H_
+#ifndef CHROME_BROWSER_UI_PANELS_PANEL_BOUNDS_ANIMATION_H_
+#define CHROME_BROWSER_UI_PANELS_PANEL_BOUNDS_ANIMATION_H_
#pragma once
#include "ui/base/animation/linear_animation.h"
@@ -13,13 +13,13 @@ class AnimationDelegate;
}
class Panel;
-class PanelSlideAnimation : public ui::LinearAnimation {
+class PanelBoundsAnimation : public ui::LinearAnimation {
public:
- PanelSlideAnimation(ui::AnimationDelegate* target,
- Panel* panel,
- const gfx::Rect& initial_bounds,
- const gfx::Rect& final_bounds);
- virtual ~PanelSlideAnimation();
+ PanelBoundsAnimation(ui::AnimationDelegate* target,
+ Panel* panel,
+ const gfx::Rect& initial_bounds,
+ const gfx::Rect& final_bounds);
+ virtual ~PanelBoundsAnimation();
virtual double GetCurrentValue() const OVERRIDE;
// Static because it is reused on Mac to override NSAnimation's calculation.
@@ -35,7 +35,7 @@ class PanelSlideAnimation : public ui::LinearAnimation {
bool for_big_minimize_;
double animation_stop_to_show_titlebar_;
- DISALLOW_COPY_AND_ASSIGN(PanelSlideAnimation);
+ DISALLOW_COPY_AND_ASSIGN(PanelBoundsAnimation);
};
-#endif // CHROME_BROWSER_UI_PANELS_PANEL_SLIDE_ANIMATION_H_
+#endif // CHROME_BROWSER_UI_PANELS_PANEL_BOUNDS_ANIMATION_H_
diff --git a/chrome/browser/ui/panels/panel_browser_view.cc b/chrome/browser/ui/panels/panel_browser_view.cc
index 00e3a11..cf175cb 100644
--- a/chrome/browser/ui/panels/panel_browser_view.cc
+++ b/chrome/browser/ui/panels/panel_browser_view.cc
@@ -7,9 +7,9 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "chrome/browser/ui/panels/panel.h"
+#include "chrome/browser/ui/panels/panel_bounds_animation.h"
#include "chrome/browser/ui/panels/panel_browser_frame_view.h"
#include "chrome/browser/ui/panels/panel_manager.h"
-#include "chrome/browser/ui/panels/panel_slide_animation.h"
#include "chrome/browser/ui/views/frame/browser_frame.h"
#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "chrome/browser/ui/webui/task_manager_dialog.h"
@@ -135,7 +135,7 @@ void PanelBrowserView::SetBoundsInternal(const gfx::Rect& new_bounds,
animation_start_bounds_ = GetBounds();
- bounds_animator_.reset(new PanelSlideAnimation(
+ bounds_animator_.reset(new PanelBoundsAnimation(
this, panel(), animation_start_bounds_, new_bounds));
bounds_animator_->Start();
}
diff --git a/chrome/browser/ui/panels/panel_browser_view.h b/chrome/browser/ui/panels/panel_browser_view.h
index dedb9fc..a21a923 100644
--- a/chrome/browser/ui/panels/panel_browser_view.h
+++ b/chrome/browser/ui/panels/panel_browser_view.h
@@ -14,10 +14,10 @@
#include "ui/base/animation/animation_delegate.h"
class Browser;
-class Panel;
class NativePanelTestingWin;
+class Panel;
+class PanelBoundsAnimation;
class PanelBrowserFrameView;
-class PanelSlideAnimation;
// A browser view that implements Panel specific behavior.
class PanelBrowserView : public BrowserView,
@@ -149,7 +149,7 @@ class PanelBrowserView : public BrowserView,
MouseDraggingState mouse_dragging_state_;
// Used to animate the bounds change.
- scoped_ptr<PanelSlideAnimation> bounds_animator_;
+ scoped_ptr<PanelBoundsAnimation> bounds_animator_;
gfx::Rect animation_start_bounds_;
// Is the panel in highlighted state to draw people's attention?
diff --git a/chrome/browser/ui/panels/panel_browser_view_browsertest.cc b/chrome/browser/ui/panels/panel_browser_view_browsertest.cc
index cbf6816..b259fe1 100644
--- a/chrome/browser/ui/panels/panel_browser_view_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_browser_view_browsertest.cc
@@ -9,10 +9,10 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/panels/base_panel_browser_test.h"
#include "chrome/browser/ui/panels/panel.h"
+#include "chrome/browser/ui/panels/panel_bounds_animation.h"
#include "chrome/browser/ui/panels/panel_browser_frame_view.h"
#include "chrome/browser/ui/panels/panel_browser_view.h"
#include "chrome/browser/ui/panels/panel_manager.h"
-#include "chrome/browser/ui/panels/panel_slide_animation.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
@@ -80,7 +80,7 @@ class PanelBrowserViewTest : public BasePanelBrowserTest {
return GetBrowserView(panel)->GetNativeHandle();
}
- PanelSlideAnimation* GetBoundsAnimator(Panel* panel) const {
+ PanelBoundsAnimation* GetBoundsAnimator(Panel* panel) const {
return GetBrowserView(panel)->bounds_animator_.get();
}
diff --git a/chrome/browser/ui/panels/panel_browser_window_gtk.cc b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
index 00dcb00..f8ed908 100644
--- a/chrome/browser/ui/panels/panel_browser_window_gtk.cc
+++ b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
@@ -7,12 +7,11 @@
#include "base/bind.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/panels/panel.h"
+#include "chrome/browser/ui/panels/panel_bounds_animation.h"
#include "chrome/browser/ui/panels/panel_manager.h"
#include "chrome/browser/ui/panels/panel_settings_menu_model.h"
-#include "chrome/browser/ui/panels/panel_slide_animation.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/notification_service.h"
-#include "ui/base/animation/slide_animation.h"
#include "ui/base/dragdrop/gtk_dnd_util.h"
#include "ui/base/x/work_area_watcher_x.h"
@@ -431,7 +430,7 @@ void PanelBrowserWindowGtk::StartBoundsAnimation(
animation_start_bounds_ = from_bounds;
}
- bounds_animator_.reset(new PanelSlideAnimation(
+ bounds_animator_.reset(new PanelBoundsAnimation(
this, panel_.get(), from_bounds, to_bounds));
bounds_animator_->Start();
diff --git a/chrome/browser/ui/panels/panel_browser_window_gtk.h b/chrome/browser/ui/panels/panel_browser_window_gtk.h
index 76c1963..83d3e70 100644
--- a/chrome/browser/ui/panels/panel_browser_window_gtk.h
+++ b/chrome/browser/ui/panels/panel_browser_window_gtk.h
@@ -14,15 +14,10 @@
#include "ui/base/x/work_area_watcher_x_observer.h"
class Panel;
+class PanelBoundsAnimation;
class PanelSettingsMenuModel;
class NativePanelTestingGtk;
-namespace ui {
-
-class LinearAnimation;
-
-}
-
class PanelBrowserWindowGtk : public BrowserWindowGtk,
public MenuGtk::Delegate,
public MessageLoopForUI::Observer,
@@ -195,7 +190,7 @@ class PanelBrowserWindowGtk : public BrowserWindowGtk,
base::Time disableMinimizeUntilTime_;
// Used to animate the bounds change.
- scoped_ptr<ui::LinearAnimation> bounds_animator_;
+ scoped_ptr<PanelBoundsAnimation> bounds_animator_;
gfx::Rect animation_start_bounds_;
// This records the bounds set on the last animation progress notification.
diff --git a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
index 7fc2506..b3d04d7 100644
--- a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
+++ b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
@@ -25,10 +25,10 @@
#import "chrome/browser/ui/cocoa/tab_contents/favicon_util.h"
#import "chrome/browser/ui/cocoa/tabs/throbber_view.h"
#include "chrome/browser/ui/panels/panel.h"
+#include "chrome/browser/ui/panels/panel_bounds_animation.h"
#include "chrome/browser/ui/panels/panel_browser_window_cocoa.h"
#include "chrome/browser/ui/panels/panel_manager.h"
#include "chrome/browser/ui/panels/panel_settings_menu_model.h"
-#include "chrome/browser/ui/panels/panel_slide_animation.h"
#import "chrome/browser/ui/panels/panel_titlebar_view_cocoa.h"
#include "chrome/browser/ui/toolbar/encoding_menu_controller.h"
#include "chrome/common/chrome_notification_types.h"
@@ -480,7 +480,7 @@ enum {
- (float)animation:(NSAnimation*)animation
valueForProgress:(NSAnimationProgress)progress {
- return PanelSlideAnimation::ComputeAnimationValue(
+ return PanelBoundsAnimation::ComputeAnimationValue(
progress, playingMinimizeAnimation_, animationStopToShowTitlebarOnly_);
}
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index a82ef24..f5b4447 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -3238,6 +3238,8 @@
'browser/ui/panels/native_panel.h',
'browser/ui/panels/panel.cc',
'browser/ui/panels/panel.h',
+ 'browser/ui/panels/panel_bounds_animation.cc',
+ 'browser/ui/panels/panel_bounds_animation.h',
'browser/ui/panels/panel_browser_frame_view.cc',
'browser/ui/panels/panel_browser_frame_view.h',
'browser/ui/panels/panel_browser_view.cc',
@@ -3264,8 +3266,6 @@
'browser/ui/panels/panel_overflow_strip.h',
'browser/ui/panels/panel_settings_menu_model.cc',
'browser/ui/panels/panel_settings_menu_model.h',
- 'browser/ui/panels/panel_slide_animation.cc',
- 'browser/ui/panels/panel_slide_animation.h',
'browser/ui/panels/panel_strip.cc',
'browser/ui/panels/panel_strip.h',
'browser/ui/panels/panel_titlebar_view_cocoa.h',