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

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 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 void RootWindow::OnHostResized(const gfx::Size& size) { 705 void RootWindow::OnHostResized(const gfx::Size& size) {
706 TRACE_EVENT1("ui", "RootWindow::OnHostResized", 706 TRACE_EVENT1("ui", "RootWindow::OnHostResized",
707 "size", size.ToString()); 707 "size", size.ToString());
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.
716 gfx::Point point; 715 gfx::Point point;
717 if (host_->QueryMouseLocation(&point)) { 716 if (host_->QueryMouseLocation(&point)) {
718 SetLastMouseLocation(window(), 717 host_->ConvertPointFromHost(&point);
719 ui::ConvertPointToDIP(window()->layer(), point)); 718 SetLastMouseLocation(window(), point);
720 } 719 }
721 synthesize_mouse_move_ = false; 720 synthesize_mouse_move_ = false;
722 } 721 }
723 722
724 RootWindow* RootWindow::AsRootWindow() { 723 RootWindow* RootWindow::AsRootWindow() {
725 return this; 724 return this;
726 } 725 }
727 726
728 const RootWindow* RootWindow::AsRootWindow() const { 727 const RootWindow* RootWindow::AsRootWindow() const {
729 return this; 728 return this;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 break; 940 break;
942 941
943 default: 942 default:
944 NOTREACHED(); 943 NOTREACHED();
945 break; 944 break;
946 } 945 }
947 PreDispatchLocatedEvent(target, event); 946 PreDispatchLocatedEvent(target, event);
948 } 947 }
949 948
950 } // namespace aura 949 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698