Chromium Code Reviews| 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 "ui/aura/window.h" | 5 #include "ui/aura/window.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 695 layer_->SetBounds(actual_new_bounds); | 695 layer_->SetBounds(actual_new_bounds); |
| 696 | 696 |
| 697 // If we are currently not the layer's delegate, we will not get bounds | 697 // If we are currently not the layer's delegate, we will not get bounds |
| 698 // changed notification from the layer (this typically happens after animating | 698 // changed notification from the layer (this typically happens after animating |
| 699 // hidden). We must notify ourselves. | 699 // hidden). We must notify ourselves. |
| 700 if (layer_->delegate() != this) | 700 if (layer_->delegate() != this) |
| 701 OnLayerBoundsChanged(old_bounds, ContainsMouse()); | 701 OnLayerBoundsChanged(old_bounds, ContainsMouse()); |
| 702 } | 702 } |
| 703 | 703 |
| 704 void Window::SetVisible(bool visible) { | 704 void Window::SetVisible(bool visible) { |
| 705 if (visible == layer_->GetTargetVisibility()) | 705 if (visible == layer_->GetTargetVisibility()) { |
| 706 // After calling SetVisible, IsVisible should immediately return the target | |
| 707 // visibility state. | |
|
sky
2013/09/13 21:46:44
I think this is wrong. The reason you're seeing th
flackr
2013/09/13 22:28:38
I should provide some context. PanelLayoutManager:
sky
2013/09/16 17:03:35
725 updates visibility, so how come PanelLayoutMan
| |
| 708 visible_ = visible; | |
| 706 return; // No change. | 709 return; // No change. |
| 710 } | |
| 707 | 711 |
| 708 FOR_EACH_OBSERVER(WindowObserver, observers_, | 712 FOR_EACH_OBSERVER(WindowObserver, observers_, |
| 709 OnWindowVisibilityChanging(this, visible)); | 713 OnWindowVisibilityChanging(this, visible)); |
| 710 | 714 |
| 711 RootWindow* root_window = GetRootWindow(); | 715 RootWindow* root_window = GetRootWindow(); |
| 712 if (root_window) | 716 if (root_window) |
| 713 root_window->DispatchMouseExitToHidingWindow(this); | 717 root_window->DispatchMouseExitToHidingWindow(this); |
| 714 | 718 |
| 715 client::VisibilityClient* visibility_client = | 719 client::VisibilityClient* visibility_client = |
| 716 client::GetVisibilityClient(this); | 720 client::GetVisibilityClient(this); |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1093 bool contains_mouse = false; | 1097 bool contains_mouse = false; |
| 1094 if (IsVisible()) { | 1098 if (IsVisible()) { |
| 1095 RootWindow* root_window = GetRootWindow(); | 1099 RootWindow* root_window = GetRootWindow(); |
| 1096 contains_mouse = root_window && | 1100 contains_mouse = root_window && |
| 1097 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); | 1101 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); |
| 1098 } | 1102 } |
| 1099 return contains_mouse; | 1103 return contains_mouse; |
| 1100 } | 1104 } |
| 1101 | 1105 |
| 1102 } // namespace aura | 1106 } // namespace aura |
| OLD | NEW |