| 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/chrome_font.h" | 8 #include "app/gfx/font.h" |
| 9 #include "chrome/browser/autocomplete/autocomplete.h" | 9 #include "chrome/browser/autocomplete/autocomplete.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" | 10 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" |
| 11 #include "chrome/browser/autocomplete/autocomplete_popup_view.h" | 11 #include "chrome/browser/autocomplete/autocomplete_popup_view.h" |
| 12 #include "views/view.h" | 12 #include "views/view.h" |
| 13 #include "webkit/glue/window_open_disposition.h" | 13 #include "webkit/glue/window_open_disposition.h" |
| 14 | 14 |
| 15 class AutocompleteEditModel; | 15 class AutocompleteEditModel; |
| 16 class AutocompleteEditViewWin; | 16 class AutocompleteEditViewWin; |
| 17 class AutocompletePopupWin; | 17 class AutocompletePopupWin; |
| 18 class Profile; | 18 class Profile; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 // Overridden from AutocompleteResultViewModel: | 71 // Overridden from AutocompleteResultViewModel: |
| 72 virtual bool IsSelectedIndex(size_t index) const; | 72 virtual bool IsSelectedIndex(size_t index) const; |
| 73 virtual bool IsBookmarkedIndex(size_t index) const; | 73 virtual bool IsBookmarkedIndex(size_t index) const; |
| 74 virtual const AutocompleteMatch& GetMatchAtIndex(size_t index) const; | 74 virtual const AutocompleteMatch& GetMatchAtIndex(size_t index) const; |
| 75 virtual void OpenIndex(size_t index, WindowOpenDisposition disposition); | 75 virtual void OpenIndex(size_t index, WindowOpenDisposition disposition); |
| 76 virtual void SetHoveredLine(size_t index); | 76 virtual void SetHoveredLine(size_t index); |
| 77 virtual void SetSelectedLine(size_t index, bool revert_to_default); | 77 virtual void SetSelectedLine(size_t index, bool revert_to_default); |
| 78 | 78 |
| 79 // Overridden from views::View: | 79 // Overridden from views::View: |
| 80 virtual void PaintChildren(ChromeCanvas* canvas); | 80 virtual void PaintChildren(gfx::Canvas* canvas); |
| 81 virtual void Layout(); | 81 virtual void Layout(); |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 // Fill a path for the contents' roundrect. |bounding_rect| is the rect that | 84 // Fill a path for the contents' roundrect. |bounding_rect| is the rect that |
| 85 // bounds the path. | 85 // bounds the path. |
| 86 void MakeContentsPath(gfx::Path* path, const gfx::Rect& bounding_rect); | 86 void MakeContentsPath(gfx::Path* path, const gfx::Rect& bounding_rect); |
| 87 | 87 |
| 88 // Updates the window's blur region for the current size. | 88 // Updates the window's blur region for the current size. |
| 89 void UpdateBlurRegion(); | 89 void UpdateBlurRegion(); |
| 90 | 90 |
| 91 // Makes the contents of the canvas slightly transparent. | 91 // Makes the contents of the canvas slightly transparent. |
| 92 void MakeCanvasTransparent(ChromeCanvas* canvas); | 92 void MakeCanvasTransparent(gfx::Canvas* canvas); |
| 93 | 93 |
| 94 // The popup that contains this view. | 94 // The popup that contains this view. |
| 95 AutocompletePopupWin* popup_; | 95 AutocompletePopupWin* popup_; |
| 96 | 96 |
| 97 // The provider of our result set. | 97 // The provider of our result set. |
| 98 scoped_ptr<AutocompletePopupModel> model_; | 98 scoped_ptr<AutocompletePopupModel> model_; |
| 99 | 99 |
| 100 // The edit view that invokes us. | 100 // The edit view that invokes us. |
| 101 AutocompleteEditViewWin* edit_view_; | 101 AutocompleteEditViewWin* edit_view_; |
| 102 | 102 |
| 103 // An object that tells the popup how to position itself. | 103 // An object that tells the popup how to position itself. |
| 104 AutocompletePopupPositioner* popup_positioner_; | 104 AutocompletePopupPositioner* popup_positioner_; |
| 105 | 105 |
| 106 // The font that we should use for result rows. This is based on the font used | 106 // The font that we should use for result rows. This is based on the font used |
| 107 // by the edit that created us. | 107 // by the edit that created us. |
| 108 gfx::Font result_font_; | 108 gfx::Font result_font_; |
| 109 | 109 |
| 110 DISALLOW_COPY_AND_ASSIGN(AutocompletePopupContentsView); | 110 DISALLOW_COPY_AND_ASSIGN(AutocompletePopupContentsView); |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 | 113 |
| 114 #endif // #ifndef CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS
_VIEW_H_ | 114 #endif // #ifndef CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_CONTENTS
_VIEW_H_ |
| OLD | NEW |