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

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

Issue 155378: Replace ShowAsPopupWithItems to CreatePopupWidgetWithInfo. Also,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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/glue/webworker_impl.cc » ('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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 const WebRect& bounds) { 63 const WebRect& bounds) {
64 widget_ = widget; 64 widget_ = widget;
65 widget_->setClient(this); 65 widget_->setClient(this);
66 66
67 if (delegate_) { 67 if (delegate_) {
68 delegate_->SetWindowRect(this, bounds); 68 delegate_->SetWindowRect(this, bounds);
69 delegate_->Show(this, WindowOpenDisposition()); 69 delegate_->Show(this, WindowOpenDisposition());
70 } 70 }
71 } 71 }
72 72
73 void WebWidgetImpl::InitWithItems(WebCore::FramelessScrollView* widget,
74 const WebRect& bounds,
75 int item_height,
76 int selected_index,
77 const std::vector<WebMenuItem>& items) {
78 widget_ = widget;
79 widget_->setClient(this);
80
81 if (delegate_) {
82 delegate_->ShowAsPopupWithItems(this, bounds, item_height,
83 selected_index, items);
84 }
85 }
86
87 void WebWidgetImpl::MouseMove(const WebMouseEvent& event) { 73 void WebWidgetImpl::MouseMove(const WebMouseEvent& event) {
88 // don't send mouse move messages if the mouse hasn't moved. 74 // don't send mouse move messages if the mouse hasn't moved.
89 if (event.x != last_mouse_position_.x || 75 if (event.x != last_mouse_position_.x ||
90 event.y != last_mouse_position_.y) { 76 event.y != last_mouse_position_.y) {
91 last_mouse_position_ = WebPoint(event.x, event.y); 77 last_mouse_position_ = WebPoint(event.x, event.y);
92 widget_->handleMouseMoveEvent(MakePlatformMouseEvent(widget_, event)); 78 widget_->handleMouseMoveEvent(MakePlatformMouseEvent(widget_, event));
93 } 79 }
94 } 80 }
95 81
96 void WebWidgetImpl::MouseLeave(const WebMouseEvent& event) { 82 void WebWidgetImpl::MouseLeave(const WebMouseEvent& event) {
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 // WebCore::FramelessScrollViewClient 270 // WebCore::FramelessScrollViewClient
285 271
286 void WebWidgetImpl::popupClosed(WebCore::FramelessScrollView* widget) { 272 void WebWidgetImpl::popupClosed(WebCore::FramelessScrollView* widget) {
287 DCHECK(widget == widget_); 273 DCHECK(widget == widget_);
288 if (widget_) { 274 if (widget_) {
289 widget_->setClient(NULL); 275 widget_->setClient(NULL);
290 widget_ = NULL; 276 widget_ = NULL;
291 } 277 }
292 delegate_->CloseWidgetSoon(this); 278 delegate_->CloseWidgetSoon(this);
293 } 279 }
OLDNEW
« no previous file with comments | « webkit/glue/webwidget_impl.h ('k') | webkit/glue/webworker_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698