| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_ |
| 7 | 7 |
| 8 #include "app/gfx/font.h" | 8 #include "app/gfx/font.h" |
| 9 #include "app/slide_animation.h" | 9 #include "app/slide_animation.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete.h" | 10 #include "chrome/browser/autocomplete/autocomplete.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 virtual bool IsSelectedIndex(size_t index) const; | 72 virtual bool IsSelectedIndex(size_t index) const; |
| 73 virtual bool IsHoveredIndex(size_t index) const; | 73 virtual bool IsHoveredIndex(size_t index) const; |
| 74 virtual void OpenIndex(size_t index, WindowOpenDisposition disposition); | 74 virtual void OpenIndex(size_t index, WindowOpenDisposition disposition); |
| 75 virtual void SetHoveredLine(size_t index); | 75 virtual void SetHoveredLine(size_t index); |
| 76 virtual void SetSelectedLine(size_t index, bool revert_to_default); | 76 virtual void SetSelectedLine(size_t index, bool revert_to_default); |
| 77 | 77 |
| 78 // Overridden from AnimationDelegate: | 78 // Overridden from AnimationDelegate: |
| 79 virtual void AnimationProgressed(const Animation* animation); | 79 virtual void AnimationProgressed(const Animation* animation); |
| 80 | 80 |
| 81 // Overridden from views::View: | 81 // Overridden from views::View: |
| 82 virtual void PaintChildren(gfx::Canvas* canvas); | 82 virtual void Paint(gfx::Canvas* canvas); |
| 83 virtual void PaintChildren(gfx::Canvas* canvas) { |
| 84 // We paint our children inside Paint(). |
| 85 } |
| 83 virtual void Layout(); | 86 virtual void Layout(); |
| 84 | 87 |
| 85 private: | 88 private: |
| 86 // Returns true if the model has a match at the specified index. | 89 // Returns true if the model has a match at the specified index. |
| 87 bool HasMatchAt(size_t index) const; | 90 bool HasMatchAt(size_t index) const; |
| 88 | 91 |
| 89 // Returns the match at the specified index within the popup model. | 92 // Returns the match at the specified index within the popup model. |
| 90 const AutocompleteMatch& GetMatchAtIndex(size_t index) const; | 93 const AutocompleteMatch& GetMatchAtIndex(size_t index) const; |
| 91 | 94 |
| 92 // Fill a path for the contents' roundrect. |bounding_rect| is the rect that | 95 // Fill a path for the contents' roundrect. |bounding_rect| is the rect that |
| (...skipping 30 matching lines...) Expand all Loading... |
| 123 // shorter (not larger, that makes it look "slow"). | 126 // shorter (not larger, that makes it look "slow"). |
| 124 SlideAnimation size_animation_; | 127 SlideAnimation size_animation_; |
| 125 gfx::Rect start_bounds_; | 128 gfx::Rect start_bounds_; |
| 126 gfx::Rect target_bounds_; | 129 gfx::Rect target_bounds_; |
| 127 | 130 |
| 128 DISALLOW_COPY_AND_ASSIGN(AutocompletePopupContentsView); | 131 DISALLOW_COPY_AND_ASSIGN(AutocompletePopupContentsView); |
| 129 }; | 132 }; |
| 130 | 133 |
| 131 | 134 |
| 132 #endif // #ifndef CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS
_VIEW_H_ | 135 #endif // #ifndef CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS
_VIEW_H_ |
| OLD | NEW |