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: ui/aura/root_window.cc

Issue 149743006: Fix crash of OmniboxViewViewsTest.SelectAllOnClick on Linux Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 708
709 DispatchDetails details = DispatchHeldEvents(); 709 DispatchDetails details = DispatchHeldEvents();
710 if (details.dispatcher_destroyed) 710 if (details.dispatcher_destroyed)
711 return; 711 return;
712 FOR_EACH_OBSERVER(RootWindowObserver, observers_, 712 FOR_EACH_OBSERVER(RootWindowObserver, observers_,
713 OnWindowTreeHostResized(this)); 713 OnWindowTreeHostResized(this));
714 714
715 // Constrain the mouse position within the new root Window size. 715 // Constrain the mouse position within the new root Window size.
716 gfx::Point point; 716 gfx::Point point;
717 if (host_->QueryMouseLocation(&point)) { 717 if (host_->QueryMouseLocation(&point)) {
718 SetLastMouseLocation(window(), 718 host_->ConvertPointFromHost(&point);
719 ui::ConvertPointToDIP(window()->layer(), point)); 719 SetLastMouseLocation(window(), point);
sadrul 2014/02/11 19:09:37 This is a good fix. Mind having a test for this?
720 } 720 }
721 synthesize_mouse_move_ = false; 721 synthesize_mouse_move_ = false;
722 } 722 }
723 723
724 RootWindow* RootWindow::AsRootWindow() { 724 RootWindow* RootWindow::AsRootWindow() {
725 return this; 725 return this;
726 } 726 }
727 727
728 const RootWindow* RootWindow::AsRootWindow() const { 728 const RootWindow* RootWindow::AsRootWindow() const {
729 return this; 729 return this;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 break; 941 break;
942 942
943 default: 943 default:
944 NOTREACHED(); 944 NOTREACHED();
945 break; 945 break;
946 } 946 }
947 PreDispatchLocatedEvent(target, event); 947 PreDispatchLocatedEvent(target, event);
948 } 948 }
949 949
950 } // namespace aura 950 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698