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

Side by Side Diff: trunk/src/content/browser/web_contents/web_contents_view_aura.cc

Issue 63013004: Revert 235267 "Fix crash in WebContentsViewAura::WindowObserver ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « trunk/src/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/browser/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 window->GetRootWindow()->AddObserver(this); 792 window->GetRootWindow()->AddObserver(this);
793 #endif 793 #endif
794 } 794 }
795 } 795 }
796 796
797 virtual void OnWindowRemovingFromRootWindow(aura::Window* window) OVERRIDE { 797 virtual void OnWindowRemovingFromRootWindow(aura::Window* window) OVERRIDE {
798 if (window == view_->window_) { 798 if (window == view_->window_) {
799 window->GetDispatcher()->RemoveRootWindowObserver(this); 799 window->GetDispatcher()->RemoveRootWindowObserver(this);
800 #if defined(OS_WIN) 800 #if defined(OS_WIN)
801 window->GetRootWindow()->RemoveObserver(this); 801 window->GetRootWindow()->RemoveObserver(this);
802
803 const aura::Window::Windows& root_children =
804 window->GetRootWindow()->children();
805 for (size_t i = 0; i < root_children.size(); ++i)
806 root_children[i]->RemoveObserver(this);
807 #endif 802 #endif
808 } 803 }
809 } 804 }
810 805
811 // Overridden RootWindowObserver: 806 // Overridden RootWindowObserver:
812 virtual void OnRootWindowHostMoved(const aura::RootWindow* root, 807 virtual void OnRootWindowHostMoved(const aura::RootWindow* root,
813 const gfx::Point& new_origin) OVERRIDE { 808 const gfx::Point& new_origin) OVERRIDE {
814 TRACE_EVENT1("ui", 809 TRACE_EVENT1("ui",
815 "WebContentsViewAura::WindowObserver::OnRootWindowHostMoved", 810 "WebContentsViewAura::WindowObserver::OnRootWindowHostMoved",
816 "new_origin", new_origin.ToString()); 811 "new_origin", new_origin.ToString());
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
1703 event.location(), 1698 event.location(),
1704 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), 1699 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(),
1705 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); 1700 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
1706 if (drag_dest_delegate_) 1701 if (drag_dest_delegate_)
1707 drag_dest_delegate_->OnDrop(); 1702 drag_dest_delegate_->OnDrop();
1708 current_drop_data_.reset(); 1703 current_drop_data_.reset();
1709 return current_drag_op_; 1704 return current_drag_op_;
1710 } 1705 }
1711 1706
1712 } // namespace content 1707 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698