Commit 69ba6253 authored by sadrul@chromium.org's avatar sadrul@chromium.org

views omnibox popup: Setup the parent Widget, instead of the parent NativeView.

In views-desktop world, the omnibox popup should be parented to the widget the
location-bar belongs to. This fixes pointer events on the popup in touchui.

BUG=none
TEST=manually

Review URL: http://codereview.chromium.org/7584024

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95838 0039d316-1c4b-4281-b951-d872f2087c98
parent 9a14ae61
......@@ -230,7 +230,7 @@ AutocompletePopupContentsView::AutocompletePopupContentsView(
OmniboxView* omnibox_view,
AutocompleteEditModel* edit_model,
Profile* profile,
const views::View* location_bar)
views::View* location_bar)
: model_(new AutocompletePopupModel(this, edit_model, profile)),
opt_in_view_(NULL),
omnibox_view_(omnibox_view),
......@@ -357,7 +357,7 @@ void AutocompletePopupContentsView::UpdatePopupAppearance() {
views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
params.can_activate = false;
params.transparent = true;
params.parent = location_bar_->GetWidget()->GetNativeView();
params.parent_widget = location_bar_->GetWidget();
params.bounds = GetPopupBounds();
popup_->Init(params);
popup_->SetContentsView(this);
......
......@@ -37,7 +37,7 @@ class AutocompletePopupContentsView : public views::View,
OmniboxView* omnibox_view,
AutocompleteEditModel* edit_model,
Profile* profile,
const views::View* location_bar);
views::View* location_bar);
virtual ~AutocompletePopupContentsView();
// Returns the bounds the popup should be shown at. This is the display bounds
......@@ -144,7 +144,7 @@ class AutocompletePopupContentsView : public views::View,
OmniboxView* omnibox_view_;
// An object that the popup positions itself against.
const views::View* location_bar_;
views::View* location_bar_;
// Our border, which can compute our desired bounds.
const BubbleBorder* bubble_border_;
......
......@@ -58,7 +58,7 @@ TouchAutocompletePopupContentsView::TouchAutocompletePopupContentsView(
OmniboxView* omnibox_view,
AutocompleteEditModel* edit_model,
Profile* profile,
const views::View* location_bar)
views::View* location_bar)
: AutocompletePopupContentsView(font, omnibox_view, edit_model, profile,
location_bar) {
}
......
......@@ -48,7 +48,7 @@ class TouchAutocompletePopupContentsView
OmniboxView* omnibox_view,
AutocompleteEditModel* edit_model,
Profile* profile,
const views::View* location_bar);
views::View* location_bar);
virtual ~TouchAutocompletePopupContentsView();
// AutocompletePopupContentsView:
......
......@@ -140,7 +140,7 @@ OmniboxViewViews::OmniboxViewViews(AutocompleteEditController* controller,
Profile* profile,
CommandUpdater* command_updater,
bool popup_window_mode,
const views::View* location_bar)
views::View* location_bar)
: model_(new AutocompleteEditModel(this, controller, profile)),
popup_view_(CreatePopupView(profile, location_bar)),
controller_(controller),
......@@ -690,7 +690,7 @@ void OmniboxViewViews::SelectRange(size_t caret, size_t end) {
AutocompletePopupView* OmniboxViewViews::CreatePopupView(
Profile* profile,
const View* location_bar) {
View* location_bar) {
#if defined(TOUCH_UI)
typedef TouchAutocompletePopupContentsView AutocompleteContentsView;
#else
......
......@@ -47,7 +47,7 @@ class OmniboxViewViews : public views::View,
Profile* profile,
CommandUpdater* command_updater,
bool popup_window_mode,
const views::View* location_bar);
views::View* location_bar);
virtual ~OmniboxViewViews();
// Initialize, create the underlying views, etc;
......@@ -157,7 +157,7 @@ class OmniboxViewViews : public views::View,
void SelectRange(size_t caret, size_t end);
AutocompletePopupView* CreatePopupView(Profile* profile,
const View* location_bar);
View* location_bar);
views::Textfield* textfield_;
......
......@@ -398,7 +398,7 @@ OmniboxViewWin::OmniboxViewWin(const gfx::Font& font,
Profile* profile,
CommandUpdater* command_updater,
bool popup_window_mode,
const views::View* location_bar)
views::View* location_bar)
: model_(new AutocompleteEditModel(this, controller, profile)),
popup_view_(new AutocompletePopupContentsView(font, this, model_.get(),
profile, location_bar)),
......
......@@ -69,7 +69,7 @@ class OmniboxViewWin
Profile* profile,
CommandUpdater* command_updater,
bool popup_window_mode,
const views::View* location_bar);
views::View* location_bar);
~OmniboxViewWin();
views::View* parent_view() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment