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

Unified Diff: ash/display/mouse_cursor_event_filter.cc

Issue 296053005: Fix more cases of unreachable code on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | chrome/browser/extensions/extension_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/mouse_cursor_event_filter.cc
diff --git a/ash/display/mouse_cursor_event_filter.cc b/ash/display/mouse_cursor_event_filter.cc
index ba770452aad02c93a02ee1ce85a373b726550b82..f5960d0ced01831101788907e19bffb9370f3d81 100644
--- a/ash/display/mouse_cursor_event_filter.cc
+++ b/ash/display/mouse_cursor_event_filter.cc
@@ -469,15 +469,12 @@ void MouseCursorEventFilter::GetSrcAndDstRootWindows(aura::Window** src_root,
bool MouseCursorEventFilter::WarpMouseCursorIfNecessaryForTest(
aura::Window* target_root,
const gfx::Point& point_in_screen) {
- if (enable_mouse_warp_in_native_coords) {
- gfx::Point native = point_in_screen;
- wm::ConvertPointFromScreen(target_root, &native);
- target_root->GetHost()->ConvertPointToNativeScreen(&native);
- return WarpMouseCursorInNativeCoords(native, point_in_screen);
- } else {
+ if (!enable_mouse_warp_in_native_coords)
return WarpMouseCursorInScreenCoords(target_root, point_in_screen);
- }
- return true;
+ gfx::Point native = point_in_screen;
+ wm::ConvertPointFromScreen(target_root, &native);
+ target_root->GetHost()->ConvertPointToNativeScreen(&native);
+ return WarpMouseCursorInNativeCoords(native, point_in_screen);
}
} // namespace ash
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698