| 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 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 | 8 |
| 9 MSVC_PUSH_WARNING_LEVEL(0); | 9 MSVC_PUSH_WARNING_LEVEL(0); |
| 10 #include "Cursor.h" | 10 #include "Cursor.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 if (delegate_) { | 66 if (delegate_) { |
| 67 delegate_->SetWindowRect(this, bounds); | 67 delegate_->SetWindowRect(this, bounds); |
| 68 delegate_->Show(this, WindowOpenDisposition()); | 68 delegate_->Show(this, WindowOpenDisposition()); |
| 69 } | 69 } |
| 70 } | 70 } |
| 71 | 71 |
| 72 void WebWidgetImpl::InitWithItems(WebCore::FramelessScrollView* widget, | 72 void WebWidgetImpl::InitWithItems(WebCore::FramelessScrollView* widget, |
| 73 const WebRect& bounds, | 73 const WebRect& bounds, |
| 74 int item_height, | 74 int item_height, |
| 75 int selected_index, | 75 int selected_index, |
| 76 const std::vector<MenuItem>& items) { | 76 const std::vector<WebMenuItem>& items) { |
| 77 widget_ = widget; | 77 widget_ = widget; |
| 78 widget_->setClient(this); | 78 widget_->setClient(this); |
| 79 | 79 |
| 80 if (delegate_) { | 80 if (delegate_) { |
| 81 delegate_->SetWindowRect(this, bounds); | 81 delegate_->ShowAsPopupWithItems(this, bounds, item_height, |
| 82 delegate_->ShowWithItems(this, bounds, item_height, selected_index, items); | 82 selected_index, items); |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 | 85 |
| 86 void WebWidgetImpl::MouseMove(const WebMouseEvent& event) { | 86 void WebWidgetImpl::MouseMove(const WebMouseEvent& event) { |
| 87 // don't send mouse move messages if the mouse hasn't moved. | 87 // don't send mouse move messages if the mouse hasn't moved. |
| 88 if (event.x != last_mouse_position_.x || | 88 if (event.x != last_mouse_position_.x || |
| 89 event.y != last_mouse_position_.y) { | 89 event.y != last_mouse_position_.y) { |
| 90 last_mouse_position_ = WebPoint(event.x, event.y); | 90 last_mouse_position_ = WebPoint(event.x, event.y); |
| 91 widget_->handleMouseMoveEvent(MakePlatformMouseEvent(widget_, event)); | 91 widget_->handleMouseMoveEvent(MakePlatformMouseEvent(widget_, event)); |
| 92 } | 92 } |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 void WebWidgetImpl::onScrollPositionChanged(Widget* widget) { | 297 void WebWidgetImpl::onScrollPositionChanged(Widget* widget) { |
| 298 } | 298 } |
| 299 | 299 |
| 300 bool WebWidgetImpl::isHidden() { | 300 bool WebWidgetImpl::isHidden() { |
| 301 if (!delegate_) | 301 if (!delegate_) |
| 302 return true; | 302 return true; |
| 303 | 303 |
| 304 return delegate_->IsHidden(this); | 304 return delegate_->IsHidden(this); |
| 305 } | 305 } |
| 306 #endif | 306 #endif |
| OLD | NEW |