OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "chrome/browser/autocomplete/autocomplete.h" | 10 #include "chrome/browser/autocomplete/autocomplete.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 const gfx::Point& point) OVERRIDE; | 70 const gfx::Point& point) OVERRIDE; |
71 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 71 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
72 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; | 72 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; |
73 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; | 73 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
74 virtual void OnMouseCaptureLost() OVERRIDE; | 74 virtual void OnMouseCaptureLost() OVERRIDE; |
75 virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE; | 75 virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE; |
76 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; | 76 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; |
77 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; | 77 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; |
78 | 78 |
79 protected: | 79 protected: |
80 virtual void PaintResultViews(gfx::CanvasSkia* canvas); | 80 virtual void PaintResultViews(gfx::Canvas* canvas); |
81 | 81 |
82 // Calculates the height needed to show all the results in the model. | 82 // Calculates the height needed to show all the results in the model. |
83 virtual int CalculatePopupHeight(); | 83 virtual int CalculatePopupHeight(); |
84 virtual AutocompleteResultView* CreateResultView( | 84 virtual AutocompleteResultView* CreateResultView( |
85 AutocompleteResultViewModel* model, | 85 AutocompleteResultViewModel* model, |
86 int model_index, | 86 int model_index, |
87 const gfx::Font& font, | 87 const gfx::Font& font, |
88 const gfx::Font& bold_font); | 88 const gfx::Font& bold_font); |
89 | 89 |
90 // Overridden from views::View: | 90 // Overridden from views::View: |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 // The popup sizes vertically using an animation when the popup is getting | 171 // The popup sizes vertically using an animation when the popup is getting |
172 // shorter (not larger, that makes it look "slow"). | 172 // shorter (not larger, that makes it look "slow"). |
173 ui::SlideAnimation size_animation_; | 173 ui::SlideAnimation size_animation_; |
174 gfx::Rect start_bounds_; | 174 gfx::Rect start_bounds_; |
175 gfx::Rect target_bounds_; | 175 gfx::Rect target_bounds_; |
176 | 176 |
177 DISALLOW_COPY_AND_ASSIGN(AutocompletePopupContentsView); | 177 DISALLOW_COPY_AND_ASSIGN(AutocompletePopupContentsView); |
178 }; | 178 }; |
179 | 179 |
180 #endif // CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS_VIEW
_H_ | 180 #endif // CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS_VIEW
_H_ |
OLD | NEW |