OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <algorithm> | 5 #include <algorithm> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "ash/accessibility_delegate.h" | 8 #include "ash/accessibility_delegate.h" |
9 #include "ash/accessibility_types.h" | 9 #include "ash/accessibility_types.h" |
10 #include "ash/drag_drop/drag_drop_controller.h" | 10 #include "ash/drag_drop/drag_drop_controller.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
141 window->aura_window()->SetProperty(aura::client::kTopViewInset, | 141 window->aura_window()->SetProperty(aura::client::kTopViewInset, |
142 kHeaderHeight); | 142 kHeaderHeight); |
143 ParentWindowInPrimaryRootWindow(widget->GetNativeWindow()); | 143 ParentWindowInPrimaryRootWindow(widget->GetNativeWindow()); |
144 return widget; | 144 return widget; |
145 } | 145 } |
146 | 146 |
147 aura::Window* CreatePanelWindow(const gfx::Rect& bounds) { | 147 aura::Window* CreatePanelWindow(const gfx::Rect& bounds) { |
148 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( | 148 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( |
149 nullptr, ui::wm::WINDOW_TYPE_PANEL, 0, bounds); | 149 nullptr, ui::wm::WINDOW_TYPE_PANEL, 0, bounds); |
150 static int id = 0; | 150 static int id = 0; |
151 window->SetProperty(kShelfIDKey, new ShelfID(base::IntToString(id++))); | 151 std::string shelf_id(ash::ShelfID(base::IntToString(id++)).Serialize()); |
James Cook
2017/05/15 16:37:23
Is ash:: needed?
msw
2017/05/15 19:21:32
Done.
| |
152 window->SetProperty(kShelfIDKey, new std::string(shelf_id)); | |
152 window->SetProperty(aura::client::kTopViewInset, kHeaderHeight); | 153 window->SetProperty(aura::client::kTopViewInset, kHeaderHeight); |
153 shelf_view_test()->RunMessageLoopUntilAnimationsDone(); | 154 shelf_view_test()->RunMessageLoopUntilAnimationsDone(); |
154 return window; | 155 return window; |
155 } | 156 } |
156 | 157 |
157 bool WindowsOverlapping(aura::Window* window1, aura::Window* window2) { | 158 bool WindowsOverlapping(aura::Window* window1, aura::Window* window2) { |
158 gfx::Rect window1_bounds = GetTransformedTargetBounds(window1); | 159 gfx::Rect window1_bounds = GetTransformedTargetBounds(window1); |
159 gfx::Rect window2_bounds = GetTransformedTargetBounds(window2); | 160 gfx::Rect window2_bounds = GetTransformedTargetBounds(window2); |
160 return window1_bounds.Intersects(window2_bounds); | 161 return window1_bounds.Intersects(window2_bounds); |
161 } | 162 } |
(...skipping 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1856 aura::client::WINDOW_MOVE_SOURCE_MOUSE)); | 1857 aura::client::WINDOW_MOVE_SOURCE_MOUSE)); |
1857 ASSERT_TRUE(resizer.get()); | 1858 ASSERT_TRUE(resizer.get()); |
1858 gfx::Point location = resizer->GetInitialLocation(); | 1859 gfx::Point location = resizer->GetInitialLocation(); |
1859 location.Offset(20, 20); | 1860 location.Offset(20, 20); |
1860 resizer->Drag(location, 0); | 1861 resizer->Drag(location, 0); |
1861 ToggleOverview(); | 1862 ToggleOverview(); |
1862 resizer->RevertDrag(); | 1863 resizer->RevertDrag(); |
1863 } | 1864 } |
1864 | 1865 |
1865 } // namespace ash | 1866 } // namespace ash |
OLD | NEW |