Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(704)

Side by Side Diff: ash/wm/overview/window_selector_unittest.cc

Issue 2878133002: mash: Serialize ShelfIDs for property conversion and transport. (Closed)
Patch Set: Address comments. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/shell/window_watcher.cc ('k') | ash/wm/panels/panel_layout_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(ShelfID(base::IntToString(id++)).Serialize());
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
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
OLDNEW
« no previous file with comments | « ash/shell/window_watcher.cc ('k') | ash/wm/panels/panel_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698