| OLD | NEW |
| 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 Loading... |
| 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 if (root_children[i] != view_->window_ && root_children[i] != parent_) |
| 807 root_children[i]->RemoveObserver(this); |
| 808 } |
| 802 #endif | 809 #endif |
| 803 } | 810 } |
| 804 } | 811 } |
| 805 | 812 |
| 806 // Overridden RootWindowObserver: | 813 // Overridden RootWindowObserver: |
| 807 virtual void OnRootWindowHostMoved(const aura::RootWindow* root, | 814 virtual void OnRootWindowHostMoved(const aura::RootWindow* root, |
| 808 const gfx::Point& new_origin) OVERRIDE { | 815 const gfx::Point& new_origin) OVERRIDE { |
| 809 TRACE_EVENT1("ui", | 816 TRACE_EVENT1("ui", |
| 810 "WebContentsViewAura::WindowObserver::OnRootWindowHostMoved", | 817 "WebContentsViewAura::WindowObserver::OnRootWindowHostMoved", |
| 811 "new_origin", new_origin.ToString()); | 818 "new_origin", new_origin.ToString()); |
| (...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1698 event.location(), | 1705 event.location(), |
| 1699 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), | 1706 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), |
| 1700 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); | 1707 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); |
| 1701 if (drag_dest_delegate_) | 1708 if (drag_dest_delegate_) |
| 1702 drag_dest_delegate_->OnDrop(); | 1709 drag_dest_delegate_->OnDrop(); |
| 1703 current_drop_data_.reset(); | 1710 current_drop_data_.reset(); |
| 1704 return current_drag_op_; | 1711 return current_drag_op_; |
| 1705 } | 1712 } |
| 1706 | 1713 |
| 1707 } // namespace content | 1714 } // namespace content |
| OLD | NEW |