summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webwidget_impl.cc
diff options
context:
space:
mode:
authorpaulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-24 19:05:03 +0000
committerpaulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-24 19:05:03 +0000
commit6b01318fe807d9a6dca2a31ce7f0242ef3c93453 (patch)
tree21d1c01eca0241e4b8526744b2dacb094967f2ac /webkit/glue/webwidget_impl.cc
parentc4848bad345fa487c5abc4645d1721d38aa28ac5 (diff)
downloadchromium_src-6b01318fe807d9a6dca2a31ce7f0242ef3c93453.zip
chromium_src-6b01318fe807d9a6dca2a31ce7f0242ef3c93453.tar.gz
chromium_src-6b01318fe807d9a6dca2a31ce7f0242ef3c93453.tar.bz2
First stage of implementing HTML select popup menus for
the Mac test_shell. Once the changes to WebKit/WebCore/platform/chromium/PopupMenuChromium* have been upstreamed (then landed in our tree), we can enable them in test_shell. The WebKit part is contained in this bug: https://bugs.webkit.org/show_bug.cgi?id=24692 BUG=5095 (http://crbug.com/5095) Review URL: http://codereview.chromium.org/48149 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12382 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webwidget_impl.cc')
-rw-r--r--webkit/glue/webwidget_impl.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/webkit/glue/webwidget_impl.cc b/webkit/glue/webwidget_impl.cc
index b745a66..5cf6bbe 100644
--- a/webkit/glue/webwidget_impl.cc
+++ b/webkit/glue/webwidget_impl.cc
@@ -62,6 +62,20 @@ void WebWidgetImpl::Init(WebCore::FramelessScrollView* widget,
}
}
+void WebWidgetImpl::InitWithItems(WebCore::FramelessScrollView* widget,
+ const gfx::Rect& bounds,
+ int item_height,
+ int selected_index,
+ const std::vector<MenuItem>& items) {
+ widget_ = widget;
+ widget_->setClient(this);
+
+ if (delegate_) {
+ delegate_->SetWindowRect(this, bounds);
+ delegate_->ShowWithItems(this, bounds, item_height, selected_index, items);
+ }
+}
+
void WebWidgetImpl::MouseMove(const WebMouseEvent& event) {
// don't send mouse move messages if the mouse hasn't moved.
if (event.x != last_mouse_position_.x() ||