summaryrefslogtreecommitdiffstats
path: root/ash/wm/dock
diff options
context:
space:
mode:
Diffstat (limited to 'ash/wm/dock')
-rw-r--r--ash/wm/dock/docked_window_layout_manager.cc3
-rw-r--r--ash/wm/dock/docked_window_resizer_unittest.cc11
2 files changed, 8 insertions, 6 deletions
diff --git a/ash/wm/dock/docked_window_layout_manager.cc b/ash/wm/dock/docked_window_layout_manager.cc
index 40088a4..0a648a0 100644
--- a/ash/wm/dock/docked_window_layout_manager.cc
+++ b/ash/wm/dock/docked_window_layout_manager.cc
@@ -37,6 +37,7 @@
#include "ui/gfx/image/image_skia_operations.h"
#include "ui/gfx/rect.h"
#include "ui/views/background.h"
+#include "ui/views/corewm/window_util.h"
namespace ash {
namespace internal {
@@ -189,7 +190,7 @@ namespace {
// Returns true if a window is a popup or a transient child.
bool IsPopupOrTransient(const aura::Window* window) {
return (window->type() == ui::wm::WINDOW_TYPE_POPUP ||
- window->transient_parent());
+ views::corewm::GetTransientParent(window));
}
// Certain windows (minimized, hidden or popups) do not matter to docking.
diff --git a/ash/wm/dock/docked_window_resizer_unittest.cc b/ash/wm/dock/docked_window_resizer_unittest.cc
index b15117d..05cb9b3 100644
--- a/ash/wm/dock/docked_window_resizer_unittest.cc
+++ b/ash/wm/dock/docked_window_resizer_unittest.cc
@@ -32,6 +32,7 @@
#include "ui/aura/test/test_window_delegate.h"
#include "ui/base/hit_test.h"
#include "ui/base/ui_base_types.h"
+#include "ui/views/corewm/window_util.h"
#include "ui/views/widget/widget.h"
namespace ash {
@@ -1295,10 +1296,10 @@ TEST_P(DockedWindowResizerTest, DragWindowWithTransientChild) {
scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
scoped_ptr<aura::Window> child(CreateTestWindowInShellWithDelegateAndType(
NULL, ui::wm::WINDOW_TYPE_NORMAL, 0, gfx::Rect(20, 20, 150, 20)));
- window->AddTransientChild(child.get());
+ views::corewm::AddTransientChild(window.get(), child.get());
if (window->parent() != child->parent())
window->parent()->AddChild(child.get());
- EXPECT_EQ(window.get(), child->transient_parent());
+ EXPECT_EQ(window.get(), views::corewm::GetTransientParent(child.get()));
DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, window.get(), 20);
@@ -1345,8 +1346,8 @@ TEST_P(DockedWindowResizerTest, DragWindowWithModalTransientChild) {
// While still dragging create a modal window and make it a transient child of
// the |window|.
scoped_ptr<aura::Window> child(CreateModalWindow(gfx::Rect(20, 20, 150, 20)));
- window->AddTransientChild(child.get());
- EXPECT_EQ(window.get(), child->transient_parent());
+ views::corewm::AddTransientChild(window.get(), child.get());
+ EXPECT_EQ(window.get(), views::corewm::GetTransientParent(child.get()));
EXPECT_EQ(internal::kShellWindowId_SystemModalContainer,
child->parent()->id());
@@ -1366,7 +1367,7 @@ TEST_P(DockedWindowResizerTest, DragWindowWithModalTransientChild) {
EXPECT_EQ(gfx::Point(20, 20).ToString(),
child->GetBoundsInScreen().origin().ToString());
// The |child| should still be a transient child of |window|.
- EXPECT_EQ(window.get(), child->transient_parent());
+ EXPECT_EQ(window.get(), views::corewm::GetTransientParent(child.get()));
}
// Tests that side snapping a window undocks it, closes the dock and then snaps.