OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_INLINE_OMNIBOX_POPUP_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_INLINE_OMNIBOX_POPUP_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_INLINE_OMNIBOX_POPUP_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_INLINE_OMNIBOX_POPUP_VIEW_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" | 9 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" |
10 #include "chrome/browser/ui/omnibox/omnibox_popup_view.h" | 10 #include "chrome/browser/ui/omnibox/omnibox_popup_view.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 virtual const SkBitmap* GetIconIfExtensionMatch(size_t index) const OVERRIDE; | 58 virtual const SkBitmap* GetIconIfExtensionMatch(size_t index) const OVERRIDE; |
59 | 59 |
60 // Overridden from ui::AnimationDelegate: | 60 // Overridden from ui::AnimationDelegate: |
61 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 61 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
62 | 62 |
63 // Overridden from views::View: | 63 // Overridden from views::View: |
64 virtual gfx::Size GetPreferredSize() OVERRIDE; | 64 virtual gfx::Size GetPreferredSize() OVERRIDE; |
65 virtual void Layout() OVERRIDE; | 65 virtual void Layout() OVERRIDE; |
66 virtual views::View* GetEventHandlerForPoint( | 66 virtual views::View* GetEventHandlerForPoint( |
67 const gfx::Point& point) OVERRIDE; | 67 const gfx::Point& point) OVERRIDE; |
68 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 68 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
69 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; | 69 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; |
70 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; | 70 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
71 virtual void OnMouseCaptureLost() OVERRIDE; | 71 virtual void OnMouseCaptureLost() OVERRIDE; |
72 virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE; | 72 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; |
73 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; | 73 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; |
74 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; | 74 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; |
75 virtual ui::GestureStatus OnGestureEvent( | 75 virtual ui::GestureStatus OnGestureEvent( |
76 const views::GestureEvent& event) OVERRIDE; | 76 const views::GestureEvent& event) OVERRIDE; |
77 | 77 |
78 protected: | 78 protected: |
79 virtual ~InlineOmniboxPopupView(); | 79 virtual ~InlineOmniboxPopupView(); |
80 | 80 |
81 // Calculates the height needed to show all the results in the model. | 81 // Calculates the height needed to show all the results in the model. |
82 virtual int CalculatePopupHeight(); | 82 virtual int CalculatePopupHeight(); |
83 virtual OmniboxResultView* CreateResultView( | 83 virtual OmniboxResultView* CreateResultView( |
84 OmniboxResultViewModel* model, | 84 OmniboxResultViewModel* model, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 // shorter (not larger, that makes it look "slow"). | 151 // shorter (not larger, that makes it look "slow"). |
152 ui::SlideAnimation size_animation_; | 152 ui::SlideAnimation size_animation_; |
153 // TODO(sky): convert to sizes. | 153 // TODO(sky): convert to sizes. |
154 gfx::Rect start_bounds_; | 154 gfx::Rect start_bounds_; |
155 gfx::Rect target_bounds_; | 155 gfx::Rect target_bounds_; |
156 | 156 |
157 DISALLOW_COPY_AND_ASSIGN(InlineOmniboxPopupView); | 157 DISALLOW_COPY_AND_ASSIGN(InlineOmniboxPopupView); |
158 }; | 158 }; |
159 | 159 |
160 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_INLINE_OMNIBOX_POPUP_VIEW_H_ | 160 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_INLINE_OMNIBOX_POPUP_VIEW_H_ |
OLD | NEW |