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

Unified Diff: ui/views/event_utils_aura.cc

Issue 202173005: Fix "unreachable code" warnings (MSVC warning 4702) in ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/shell_dialogs/select_file_dialog.cc ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/event_utils_aura.cc
===================================================================
--- ui/views/event_utils_aura.cc (revision 256983)
+++ ui/views/event_utils_aura.cc (working copy)
@@ -34,7 +34,7 @@
target_window = window->GetHost()->GetAcceleratedWidget();
}
return RepostLocatedEventWin(target_window, event);
-#endif
+#else
if (!window)
return false;
@@ -49,22 +49,21 @@
spc->ConvertPointFromScreen(root_window, &root_loc);
scoped_ptr<ui::LocatedEvent> relocated;
- if (event.IsMouseEvent()) {
- const ui::MouseEvent& orig = static_cast<const ui::MouseEvent&>(event);
- relocated.reset(new ui::MouseEvent(orig));
- } else if (event.IsGestureEvent()) {
+ if (!event.IsMouseEvent()) {
// TODO(rbyers): Gesture event repost is tricky to get right
// crbug.com/170987.
+ DCHECK(event.IsGestureEvent());
return false;
- } else {
- NOTREACHED();
- return false;
}
+
+ const ui::MouseEvent& orig = static_cast<const ui::MouseEvent&>(event);
+ relocated.reset(new ui::MouseEvent(orig));
relocated->set_location(root_loc);
relocated->set_root_location(root_loc);
root_window->GetHost()->dispatcher()->RepostEvent(*relocated);
return true;
+#endif
}
} // namespace views
« no previous file with comments | « ui/shell_dialogs/select_file_dialog.cc ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698