| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // This file defines the interface class AutocompletePopupView. Each toolkit | 5 // This file defines the interface class AutocompletePopupView. Each toolkit |
| 6 // will implement the popup view differently, so that code is inheriently | 6 // will implement the popup view differently, so that code is inheriently |
| 7 // platform specific. However, the AutocompletePopupModel needs to do some | 7 // platform specific. However, the AutocompletePopupModel needs to do some |
| 8 // communication with the view. Since the model is shared between platforms, | 8 // communication with the view. Since the model is shared between platforms, |
| 9 // we need to define an interface that all view implementations will share. | 9 // we need to define an interface that all view implementations will share. |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #if defined(OS_WIN) || defined(OS_LINUX) | 22 #if defined(OS_WIN) || defined(OS_LINUX) |
| 23 class AutocompleteEditViewWin; | 23 class AutocompleteEditViewWin; |
| 24 class AutocompleteEditModel; | 24 class AutocompleteEditModel; |
| 25 class Profile; | 25 class Profile; |
| 26 #endif | 26 #endif |
| 27 | 27 |
| 28 // An object in the browser UI can implement this interface to provide display | 28 // An object in the browser UI can implement this interface to provide display |
| 29 // bounds for the autocomplete popup view. | 29 // bounds for the autocomplete popup view. |
| 30 class AutocompletePopupPositioner { | 30 class AutocompletePopupPositioner { |
| 31 public: | 31 public: |
| 32 virtual ~AutocompletePopupPositioner() { } |
| 33 |
| 32 // Returns the bounds at which the popup should be shown, in screen | 34 // Returns the bounds at which the popup should be shown, in screen |
| 33 // coordinates. The height is ignored, since the popup is sized to its | 35 // coordinates. The height is ignored, since the popup is sized to its |
| 34 // contents automatically. | 36 // contents automatically. |
| 35 virtual gfx::Rect GetPopupBounds() const = 0; | 37 virtual gfx::Rect GetPopupBounds() const = 0; |
| 36 }; | 38 }; |
| 37 | 39 |
| 38 class AutocompletePopupView { | 40 class AutocompletePopupView { |
| 39 public: | 41 public: |
| 40 virtual ~AutocompletePopupView() { } | 42 virtual ~AutocompletePopupView() { } |
| 41 | 43 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 64 static AutocompletePopupView* CreatePopupView( | 66 static AutocompletePopupView* CreatePopupView( |
| 65 const gfx::Font& font, | 67 const gfx::Font& font, |
| 66 AutocompleteEditView* edit_view, | 68 AutocompleteEditView* edit_view, |
| 67 AutocompleteEditModel* edit_model, | 69 AutocompleteEditModel* edit_model, |
| 68 Profile* profile, | 70 Profile* profile, |
| 69 AutocompletePopupPositioner* popup_positioner); | 71 AutocompletePopupPositioner* popup_positioner); |
| 70 #endif | 72 #endif |
| 71 }; | 73 }; |
| 72 | 74 |
| 73 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_H_ | 75 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_H_ |
| OLD | NEW |