diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-09 18:25:03 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-09 18:25:03 +0000 |
commit | 7cf4091e5e3eb7b3ee40c8fdc886226100b3a2e7 (patch) | |
tree | 423fdaae7c04f5ea304640618000675feb4e3443 /app | |
parent | 57005ec7bf8cebf0e53a3e59dd9ca062ba1eb053 (diff) | |
download | chromium_src-7cf4091e5e3eb7b3ee40c8fdc886226100b3a2e7.zip chromium_src-7cf4091e5e3eb7b3ee40c8fdc886226100b3a2e7.tar.gz chromium_src-7cf4091e5e3eb7b3ee40c8fdc886226100b3a2e7.tar.bz2 |
Start deinlining non-empty virtual methods. (This will be automatically checked
for in the future.)
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/5574006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68746 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r-- | app/animation.cc | 8 | ||||
-rw-r--r-- | app/animation.h | 4 | ||||
-rw-r--r-- | app/menus/menu_model.cc | 8 | ||||
-rw-r--r-- | app/menus/menu_model.h | 4 | ||||
-rw-r--r-- | app/slide_animation.cc | 8 | ||||
-rw-r--r-- | app/slide_animation.h | 4 | ||||
-rw-r--r-- | app/throb_animation.cc | 4 | ||||
-rw-r--r-- | app/throb_animation.h | 2 |
8 files changed, 35 insertions, 7 deletions
diff --git a/app/animation.cc b/app/animation.cc index 28932c9..ff20117 100644 --- a/app/animation.cc +++ b/app/animation.cc @@ -107,6 +107,14 @@ bool Animation::ShouldRenderRichAnimation() { return true; } +bool Animation::ShouldSendCanceledFromStop() { + return false; +} + void Animation::SetStartTime(base::TimeTicks start_time) { start_time_ = start_time; } + +base::TimeDelta Animation::GetTimerInterval() const { + return timer_interval_; +} diff --git a/app/animation.h b/app/animation.h index 87dc43f..5affe61 100644 --- a/app/animation.h +++ b/app/animation.h @@ -72,7 +72,7 @@ class Animation : public AnimationContainerElement { // Invoked from stop to determine if cancel should be invoked. If this returns // true the delegate is notified the animation was canceled, otherwise the // delegate is notified the animation stopped. - virtual bool ShouldSendCanceledFromStop() { return false; } + virtual bool ShouldSendCanceledFromStop(); AnimationContainer* container() { return container_.get(); } base::TimeTicks start_time() const { return start_time_; } @@ -81,7 +81,7 @@ class Animation : public AnimationContainerElement { // AnimationContainer::Element overrides virtual void SetStartTime(base::TimeTicks start_time); virtual void Step(base::TimeTicks time_now) = 0; - virtual base::TimeDelta GetTimerInterval() const { return timer_interval_; } + virtual base::TimeDelta GetTimerInterval() const; private: // Interval for the animation. diff --git a/app/menus/menu_model.cc b/app/menus/menu_model.cc index cd554f2..3df2bcc9 100644 --- a/app/menus/menu_model.cc +++ b/app/menus/menu_model.cc @@ -6,6 +6,10 @@ namespace menus { +int MenuModel::GetFirstItemIndex(gfx::NativeMenu native_menu) const { + return 0; +} + bool MenuModel::IsVisibleAt(int index) const { return true; } @@ -29,6 +33,10 @@ bool MenuModel::GetModelAndIndexForCommandId(int command_id, return false; } +const gfx::Font* MenuModel::GetLabelFontAt(int index) const { + return NULL; +} + // Default implementation ignores the disposition. void MenuModel::ActivatedAtWithDisposition(int index, int disposition) { ActivatedAt(index); diff --git a/app/menus/menu_model.h b/app/menus/menu_model.h index 8247f60..62732cd 100644 --- a/app/menus/menu_model.h +++ b/app/menus/menu_model.h @@ -49,7 +49,7 @@ class MenuModel { // IMPORTANT: If the model implementation returns something _other_ than 0 // here, it must offset the values for |index| it passes to the // methods below by this number - this is NOT done automatically! - virtual int GetFirstItemIndex(gfx::NativeMenu native_menu) const { return 0; } + virtual int GetFirstItemIndex(gfx::NativeMenu native_menu) const; // Returns the number of items in the menu. virtual int GetItemCount() const = 0; @@ -70,7 +70,7 @@ class MenuModel { // Returns the font use for the label at the specified index. // If NULL, then use default font. - virtual const gfx::Font* GetLabelFontAt(int index) const { return NULL; } + virtual const gfx::Font* GetLabelFontAt(int index) const; // Gets the acclerator information for the specified index, returning true if // there is a shortcut accelerator for the item, false otherwise. diff --git a/app/slide_animation.cc b/app/slide_animation.cc index c79e3ec..9029fd8 100644 --- a/app/slide_animation.cc +++ b/app/slide_animation.cc @@ -80,6 +80,14 @@ void SlideAnimation::Hide() { Start(); } +void SlideAnimation::SetSlideDuration(int duration) { + slide_duration_ = duration; +} + +double SlideAnimation::GetCurrentValue() const { + return value_current_; +} + void SlideAnimation::AnimateToState(double state) { if (state > 1.0) state = 1.0; diff --git a/app/slide_animation.h b/app/slide_animation.h index d073db1..7c77445 100644 --- a/app/slide_animation.h +++ b/app/slide_animation.h @@ -61,11 +61,11 @@ class SlideAnimation : public LinearAnimation { // Sets the time a slide will take. Note that this isn't actually // the amount of time an animation will take as the current value of // the slide is considered. - virtual void SetSlideDuration(int duration) { slide_duration_ = duration; } + virtual void SetSlideDuration(int duration); int GetSlideDuration() const { return slide_duration_; } void SetTweenType(Tween::Type tween_type) { tween_type_ = tween_type; } - virtual double GetCurrentValue() const { return value_current_; } + virtual double GetCurrentValue() const; bool IsShowing() const { return showing_; } bool IsClosing() const { return !showing_ && value_end_ < value_current_; } diff --git a/app/throb_animation.cc b/app/throb_animation.cc index 65596b3..9ce8f5b 100644 --- a/app/throb_animation.cc +++ b/app/throb_animation.cc @@ -47,6 +47,10 @@ void ThrobAnimation::Hide() { SlideAnimation::Hide(); } +void ThrobAnimation::SetSlideDuration(int duration) { + slide_duration_ = duration; +} + void ThrobAnimation::Step(base::TimeTicks time_now) { LinearAnimation::Step(time_now); diff --git a/app/throb_animation.h b/app/throb_animation.h index e7baced..d3ac39e 100644 --- a/app/throb_animation.h +++ b/app/throb_animation.h @@ -33,7 +33,7 @@ class ThrobAnimation : public SlideAnimation { virtual void Hide(); // Overridden to maintain the slide duration. - virtual void SetSlideDuration(int duration) { slide_duration_ = duration; } + virtual void SetSlideDuration(int duration); // The number of cycles remaining until the animation stops. void set_cycles_remaining(int value) { cycles_remaining_ = value; } |