diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-15 20:42:54 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-15 20:42:54 +0000 |
commit | f409f566b898a7b10e1baceecbcaa26cfd0b17f3 (patch) | |
tree | 475c09c88b6159ccd447204ae54b565b07f25113 /chrome/browser/autocomplete | |
parent | 72a9cd3f9e52ff4ff16df9bb018a23c08e455af7 (diff) | |
download | chromium_src-f409f566b898a7b10e1baceecbcaa26cfd0b17f3.zip chromium_src-f409f566b898a7b10e1baceecbcaa26cfd0b17f3.tar.gz chromium_src-f409f566b898a7b10e1baceecbcaa26cfd0b17f3.tar.bz2 |
Make the omnibox popup look nicer. Add dropshadow images (not final). Experiment with some effects.
Adds a positioner interface that allows the popup to size itself to the width of the edit view + the width of the star and go buttons. (Basically the toolbar needs to help the popup position itself).
No results yet!
Review URL: http://codereview.chromium.org/68011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13784 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete')
4 files changed, 16 insertions, 7 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc index cfdf3bc..648a90f 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc @@ -398,11 +398,13 @@ AutocompleteEditViewWin::AutocompleteEditViewWin( HWND hwnd, Profile* profile, CommandUpdater* command_updater, - bool popup_window_mode) + bool popup_window_mode, + AutocompletePopupPositioner* popup_positioner) : model_(new AutocompleteEditModel(this, controller, profile)), popup_view_(AutocompletePopupView::CreatePopupView(font, this, model_.get(), - profile)), + profile, + popup_positioner)), controller_(controller), parent_view_(parent_view), toolbar_model_(toolbar_model), diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.h b/chrome/browser/autocomplete/autocomplete_edit_view_win.h index 85ea856..9bff0c2 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_win.h +++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.h @@ -16,6 +16,7 @@ #include "chrome/browser/autocomplete/autocomplete.h" #include "chrome/browser/autocomplete/autocomplete_edit_view.h" #include "chrome/browser/toolbar_model.h" +#include "chrome/browser/views/autocomplete/autocomplete_popup_win.h" #include "chrome/common/gfx/chrome_font.h" #include "chrome/common/page_transition_types.h" #include "chrome/views/controls/menu/menu.h" @@ -66,7 +67,8 @@ class AutocompleteEditViewWin HWND hwnd, Profile* profile, CommandUpdater* command_updater, - bool popup_window_mode); + bool popup_window_mode, + AutocompletePopupPositioner* popup_positioner); ~AutocompleteEditViewWin(); views::View* parent_view() const { return parent_view_; } diff --git a/chrome/browser/autocomplete/autocomplete_popup_view.h b/chrome/browser/autocomplete/autocomplete_popup_view.h index 9690ac0..05017e4 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_view.h +++ b/chrome/browser/autocomplete/autocomplete_popup_view.h @@ -18,6 +18,7 @@ class ChromeFont; #if defined(OS_WIN) class AutocompleteEditViewWin; class AutocompleteEditModel; +class AutocompletePopupPositioner; class Profile; #endif @@ -51,7 +52,8 @@ class AutocompletePopupView { const ChromeFont& font, AutocompleteEditViewWin* edit_view, AutocompleteEditModel* edit_model, - Profile* profile); + Profile* profile, + AutocompletePopupPositioner* popup_positioner); #endif }; diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_win.cc b/chrome/browser/autocomplete/autocomplete_popup_view_win.cc index 578edbb..4ae5dd1 100755 --- a/chrome/browser/autocomplete/autocomplete_popup_view_win.cc +++ b/chrome/browser/autocomplete/autocomplete_popup_view_win.cc @@ -683,8 +683,11 @@ AutocompletePopupView* AutocompletePopupView::CreatePopupView( const ChromeFont& font, AutocompleteEditViewWin* edit_view, AutocompleteEditModel* edit_model, - Profile* profile) { - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableOmnibox2)) - return new AutocompletePopupWin(font, edit_view, edit_model, profile); + Profile* profile, + AutocompletePopupPositioner* popup_positioner) { + if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableOmnibox2)) { + return new AutocompletePopupWin(font, edit_view, edit_model, profile, + popup_positioner); + } return new AutocompletePopupViewWin(font, edit_view, edit_model, profile); } |