Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2815)

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.h

Issue 200783003: [OriginChip] Add animations for the hiding and showing of the chip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix uncompilable GTK unit test and a couple other issues Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/omnibox/omnibox_view_views.h
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.h b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
index 350c7cfb66668ae5b75bb577cdbe1adb5512adc4..02a0252d2ad15ef463466a8739cd9d261242f6e0 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.h
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
@@ -12,6 +12,7 @@
#include "chrome/browser/ui/omnibox/omnibox_view.h"
#include "chrome/browser/ui/toolbar/toolbar_model.h"
#include "ui/base/window_open_disposition.h"
+#include "ui/gfx/animation/animation_delegate.h"
#include "ui/gfx/range/range.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/controls/textfield/textfield_controller.h"
@@ -24,6 +25,10 @@ class LocationBarView;
class OmniboxPopupView;
class Profile;
+namespace gfx {
+class SlideAnimation;
+}
+
namespace ui {
class OSExchangeData;
} // namespace ui
@@ -32,6 +37,7 @@ class OSExchangeData;
class OmniboxViewViews
: public views::Textfield,
public OmniboxView,
+ public gfx::AnimationDelegate,
#if defined(OS_CHROMEOS)
public
chromeos::input_method::InputMethodManager::CandidateWindowObserver,
@@ -52,8 +58,12 @@ class OmniboxViewViews
// Initialize, create the underlying views, etc;
void Init();
+ // Starts an animation that fades in the entire OmniboxView.
+ void FadeIn();
+
// views::Textfield:
virtual const char* GetClassName() const OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
@@ -115,6 +125,10 @@ class OmniboxViewViews
virtual base::string16 GetLabelForCommandId(int command_id) const OVERRIDE;
virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
+ // gfx::AnimationDelegate:
+ virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
+ virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
+
// views::TextfieldController:
virtual void ContentsChanged(views::Textfield* sender,
const base::string16& new_contents) OVERRIDE;
@@ -204,6 +218,8 @@ class OmniboxViewViews
// and gets a tap. So we use this variable to remember focus state before tap.
bool select_all_on_gesture_tap_;
+ scoped_ptr<gfx::SlideAnimation> fade_in_animation_;
+
DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews);
};

Powered by Google App Engine
This is Rietveld 408576698