| 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 |
| 11 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_H_ | 11 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_H_ |
| 12 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_H_ | 12 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_H_ |
| 13 | 13 |
| 14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 15 | 15 |
| 16 class AutocompleteEditView; | 16 class AutocompleteEditView; |
| 17 class AutocompletePopupModel; | 17 class AutocompletePopupModel; |
| 18 namespace gfx { | 18 namespace gfx { |
| 19 class Font; | 19 class Font; |
| 20 class Rect; | 20 class Rect; |
| 21 } | 21 } |
| 22 #if defined(OS_WIN) | 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 // Returns the bounds at which the popup should be shown, in screen | 32 // Returns the bounds at which the popup should be shown, in screen |
| (...skipping 18 matching lines...) Expand all Loading... |
| 51 | 51 |
| 52 // Called by the model when hover is enabled or disabled. | 52 // Called by the model when hover is enabled or disabled. |
| 53 virtual void OnHoverEnabledOrDisabled(bool disabled) = 0; | 53 virtual void OnHoverEnabledOrDisabled(bool disabled) = 0; |
| 54 | 54 |
| 55 // Paint any pending updates. | 55 // Paint any pending updates. |
| 56 virtual void PaintUpdatesNow() = 0; | 56 virtual void PaintUpdatesNow() = 0; |
| 57 | 57 |
| 58 // Returns the popup's model. | 58 // Returns the popup's model. |
| 59 virtual AutocompletePopupModel* GetModel() = 0; | 59 virtual AutocompletePopupModel* GetModel() = 0; |
| 60 | 60 |
| 61 #if defined(OS_WIN) | 61 #if defined(OS_WIN) || defined(OS_LINUX) |
| 62 // Create a popup view implementation. It may make sense for this to become | 62 // Create a popup view implementation. It may make sense for this to become |
| 63 // platform independent eventually. | 63 // platform independent eventually. |
| 64 static AutocompletePopupView* CreatePopupView( | 64 static AutocompletePopupView* CreatePopupView( |
| 65 const gfx::Font& font, | 65 const gfx::Font& font, |
| 66 AutocompleteEditViewWin* edit_view, | 66 AutocompleteEditView* edit_view, |
| 67 AutocompleteEditModel* edit_model, | 67 AutocompleteEditModel* edit_model, |
| 68 Profile* profile, | 68 Profile* profile, |
| 69 AutocompletePopupPositioner* popup_positioner); | 69 AutocompletePopupPositioner* popup_positioner); |
| 70 #endif | 70 #endif |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_H_ | 73 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_H_ |
| OLD | NEW |