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

Side by Side Diff: webkit/glue/webwidget_impl.cc

Issue 67018: Chrome side of the WebKit popup changes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « webkit/glue/webwidget_impl.h ('k') | webkit/tools/test_shell/mac/test_webview_delegate.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webkit/glue/webwidget_impl.h ('k') | webkit/tools/test_shell/mac/test_webview_delegate.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698