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

Unified Diff: ui/views/widget/widget.cc

Issue 10827271: Replace views::Event with ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/widget.h ('k') | ui/views/window/custom_frame_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget.cc
===================================================================
--- ui/views/widget/widget.cc (revision 151055)
+++ ui/views/widget/widget.cc (working copy)
@@ -54,18 +54,11 @@
// restore any previously active event afterwards.
class ScopedEvent {
public:
- ScopedEvent(Widget* widget, const Event& event)
+ ScopedEvent(Widget* widget, const ui::Event& event)
: widget_(widget),
- event_(&event),
- ui_event_(NULL) {
+ event_(&event) {
widget->event_stack_.push(this);
}
- ScopedEvent(Widget* widget, const ui::Event& ui_event)
- : widget_(widget),
- event_(NULL),
- ui_event_(&ui_event) {
- widget->event_stack_.push(this);
- }
~ScopedEvent() {
if (widget_)
@@ -76,18 +69,13 @@
widget_ = NULL;
}
- const Event* event() {
+ const ui::Event* event() {
return event_;
}
- const ui::Event* ui_event() {
- return ui_event_;
- }
private:
Widget* widget_;
- const Event* event_;
- // TODO(beng): remove once views::Event is gone.
- const ui::Event* ui_event_;
+ const ui::Event* event_;
DISALLOW_COPY_AND_ASSIGN(ScopedEvent);
};
@@ -882,7 +870,7 @@
return native_widget_->HasCapture();
}
-const Event* Widget::GetCurrentEvent() {
+const ui::Event* Widget::GetCurrentEvent() {
return event_stack_.empty() ? NULL : event_stack_.top()->event();
}
« no previous file with comments | « ui/views/widget/widget.h ('k') | ui/views/window/custom_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698