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

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

Issue 48149: Use cocoa controls for HTML select popups in test_shell (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 const gfx::Rect& bounds) { 55 const gfx::Rect& bounds) {
56 widget_ = widget; 56 widget_ = widget;
57 widget_->setClient(this); 57 widget_->setClient(this);
58 58
59 if (delegate_) { 59 if (delegate_) {
60 delegate_->SetWindowRect(this, bounds); 60 delegate_->SetWindowRect(this, bounds);
61 delegate_->Show(this, WindowOpenDisposition()); 61 delegate_->Show(this, WindowOpenDisposition());
62 } 62 }
63 } 63 }
64 64
65 void WebWidgetImpl::InitWithItems(WebCore::FramelessScrollView* widget,
66 const gfx::Rect& bounds,
67 int item_height,
68 int selected_index,
69 const std::vector<MenuItem>& items) {
70 widget_ = widget;
71 widget_->setClient(this);
72
73 if (delegate_) {
74 delegate_->SetWindowRect(this, bounds);
darin (slow to review) 2009/04/01 18:02:50 it seems kind of strange to have to pass bounds tw
75 delegate_->ShowWithItems(this, bounds, item_height, selected_index, items);
76 }
77 }
78
65 void WebWidgetImpl::MouseMove(const WebMouseEvent& event) { 79 void WebWidgetImpl::MouseMove(const WebMouseEvent& event) {
66 // don't send mouse move messages if the mouse hasn't moved. 80 // don't send mouse move messages if the mouse hasn't moved.
67 if (event.x != last_mouse_position_.x() || 81 if (event.x != last_mouse_position_.x() ||
68 event.y != last_mouse_position_.y()) { 82 event.y != last_mouse_position_.y()) {
69 last_mouse_position_.SetPoint(event.x, event.y); 83 last_mouse_position_.SetPoint(event.x, event.y);
70 84
71 widget_->handleMouseMoveEvent(MakePlatformMouseEvent(widget_, event)); 85 widget_->handleMouseMoveEvent(MakePlatformMouseEvent(widget_, event));
72 } 86 }
73 } 87 }
74 88
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 void WebWidgetImpl::onScrollPositionChanged(Widget* widget) { 288 void WebWidgetImpl::onScrollPositionChanged(Widget* widget) {
275 } 289 }
276 290
277 bool WebWidgetImpl::isHidden() { 291 bool WebWidgetImpl::isHidden() {
278 if (!delegate_) 292 if (!delegate_)
279 return true; 293 return true;
280 294
281 return delegate_->IsHidden(); 295 return delegate_->IsHidden();
282 } 296 }
283 #endif 297 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698