Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(776)

Side by Side Diff: chrome/browser/autocomplete/autocomplete_popup_view.h

Issue 1578021: Shift omnibox dropdown in and up on Windows, and square off the top, so it co... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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;
17 class AutocompletePopupModel; 16 class AutocompletePopupModel;
18 class BubblePositioner;
19 namespace gfx {
20 class Font;
21 }
22 class AutocompleteEditViewWin;
23 class AutocompleteEditModel;
24 class Profile;
25 17
26 class AutocompletePopupView { 18 class AutocompletePopupView {
27 public: 19 public:
28 virtual ~AutocompletePopupView() {} 20 virtual ~AutocompletePopupView() {}
29 21
30 // Returns true if the popup is currently open. 22 // Returns true if the popup is currently open.
31 virtual bool IsOpen() const = 0; 23 virtual bool IsOpen() const = 0;
32 24
33 // Invalidates one line of the autocomplete popup. 25 // Invalidates one line of the autocomplete popup.
34 virtual void InvalidateLine(size_t line) = 0; 26 virtual void InvalidateLine(size_t line) = 0;
35 27
36 // Redraws the popup window to match any changes in the result set; this may 28 // Redraws the popup window to match any changes in the result set; this may
37 // mean opening or closing the window. 29 // mean opening or closing the window.
38 virtual void UpdatePopupAppearance() = 0; 30 virtual void UpdatePopupAppearance() = 0;
39 31
40 // Paint any pending updates. 32 // Paint any pending updates.
41 virtual void PaintUpdatesNow() = 0; 33 virtual void PaintUpdatesNow() = 0;
42 34
43 // This method is called when the view should cancel any active drag (e.g. 35 // This method is called when the view should cancel any active drag (e.g.
44 // because the user pressed ESC). The view may or may not need to take any 36 // because the user pressed ESC). The view may or may not need to take any
45 // action (e.g. releasing mouse capture). Note that this can be called when 37 // action (e.g. releasing mouse capture). Note that this can be called when
46 // no drag is in progress. 38 // no drag is in progress.
47 virtual void OnDragCanceled() = 0; 39 virtual void OnDragCanceled() = 0;
48 40
49 // Returns the popup's model. 41 // Returns the popup's model.
50 virtual AutocompletePopupModel* GetModel() = 0; 42 virtual AutocompletePopupModel* GetModel() = 0;
51
52 #if !defined(OS_MACOSX)
53 // Create a popup view implementation. It may make sense for this to become
54 // platform independent eventually.
55 static AutocompletePopupView* CreatePopupView(
56 const gfx::Font& font,
57 AutocompleteEditView* edit_view,
58 AutocompleteEditModel* edit_model,
59 Profile* profile,
60 const BubblePositioner* bubble_positioner);
61 #endif
62 }; 43 };
63 44
64 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_H_ 45 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698