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/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE { | 782 virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE { |
783 if (window == view_->window_) | 783 if (window == view_->window_) |
784 return; | 784 return; |
785 | 785 |
786 window->RemoveObserver(this); | 786 window->RemoveObserver(this); |
787 UpdateConstrainedWindows(window); | 787 UpdateConstrainedWindows(window); |
788 } | 788 } |
789 | 789 |
790 virtual void OnWindowVisibilityChanged(aura::Window* window, | 790 virtual void OnWindowVisibilityChanged(aura::Window* window, |
791 bool visible) OVERRIDE { | 791 bool visible) OVERRIDE { |
792 if (window == view_->window_) | 792 if (window == view_->window_ || |
793 return; | 793 window->parent() == parent_ || |
794 | |
795 if (window->parent() == parent_ || | |
796 window->parent() == view_->window_->GetRootWindow()) { | 794 window->parent() == view_->window_->GetRootWindow()) { |
797 UpdateConstrainedWindows(NULL); | 795 UpdateConstrainedWindows(NULL); |
798 } | 796 } |
799 } | 797 } |
800 #endif | 798 #endif |
801 | 799 |
802 virtual void OnWindowParentChanged(aura::Window* window, | 800 virtual void OnWindowParentChanged(aura::Window* window, |
803 aura::Window* parent) OVERRIDE { | 801 aura::Window* parent) OVERRIDE { |
804 if (window != view_->window_) | 802 if (window != view_->window_) |
805 return; | 803 return; |
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1790 event.location(), | 1788 event.location(), |
1791 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), | 1789 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), |
1792 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); | 1790 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); |
1793 if (drag_dest_delegate_) | 1791 if (drag_dest_delegate_) |
1794 drag_dest_delegate_->OnDrop(); | 1792 drag_dest_delegate_->OnDrop(); |
1795 current_drop_data_.reset(); | 1793 current_drop_data_.reset(); |
1796 return current_drag_op_; | 1794 return current_drag_op_; |
1797 } | 1795 } |
1798 | 1796 |
1799 } // namespace content | 1797 } // namespace content |
OLD | NEW |