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

Side by Side Diff: ash/wm/dock/docked_window_layout_manager_unittest.cc

Issue 152223002: Renames LauncherID, LauncherItem and LauncherItems... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OWNERS Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « ash/test/test_shell_delegate.cc ('k') | ash/wm/dock/docked_window_resizer_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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ash/wm/dock/docked_window_layout_manager.h" 5 #include "ash/wm/dock/docked_window_layout_manager.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shelf/shelf.h" 9 #include "ash/shelf/shelf.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 int docked_width(const DockedWindowLayoutManager* layout_manager) const { 66 int docked_width(const DockedWindowLayoutManager* layout_manager) const {
67 return layout_manager->docked_width_; 67 return layout_manager->docked_width_;
68 } 68 }
69 69
70 aura::Window* CreateTestWindow(const gfx::Rect& bounds) { 70 aura::Window* CreateTestWindow(const gfx::Rect& bounds) {
71 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( 71 aura::Window* window = CreateTestWindowInShellWithDelegateAndType(
72 NULL, window_type_, 0, bounds); 72 NULL, window_type_, 0, bounds);
73 if (window_type_ == ui::wm::WINDOW_TYPE_PANEL) { 73 if (window_type_ == ui::wm::WINDOW_TYPE_PANEL) {
74 test::TestShelfDelegate* shelf_delegate = 74 test::TestShelfDelegate* shelf_delegate =
75 test::TestShelfDelegate::instance(); 75 test::TestShelfDelegate::instance();
76 shelf_delegate->AddLauncherItem(window); 76 shelf_delegate->AddShelfItem(window);
77 PanelLayoutManager* manager = 77 PanelLayoutManager* manager =
78 static_cast<PanelLayoutManager*>(GetPanelContainer(window)-> 78 static_cast<PanelLayoutManager*>(GetPanelContainer(window)->
79 layout_manager()); 79 layout_manager());
80 manager->Relayout(); 80 manager->Relayout();
81 } 81 }
82 return window; 82 return window;
83 } 83 }
84 84
85 aura::Window* CreateTestWindowWithDelegate( 85 aura::Window* CreateTestWindowWithDelegate(
86 const gfx::Rect& bounds, 86 const gfx::Rect& bounds,
87 aura::test::TestWindowDelegate* delegate) { 87 aura::test::TestWindowDelegate* delegate) {
88 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( 88 aura::Window* window = CreateTestWindowInShellWithDelegateAndType(
89 delegate, window_type_, 0, bounds); 89 delegate, window_type_, 0, bounds);
90 if (window_type_ == ui::wm::WINDOW_TYPE_PANEL) { 90 if (window_type_ == ui::wm::WINDOW_TYPE_PANEL) {
91 test::TestShelfDelegate* shelf_delegate = 91 test::TestShelfDelegate* shelf_delegate =
92 test::TestShelfDelegate::instance(); 92 test::TestShelfDelegate::instance();
93 shelf_delegate->AddLauncherItem(window); 93 shelf_delegate->AddShelfItem(window);
94 PanelLayoutManager* manager = 94 PanelLayoutManager* manager =
95 static_cast<PanelLayoutManager*>(GetPanelContainer(window)-> 95 static_cast<PanelLayoutManager*>(GetPanelContainer(window)->
96 layout_manager()); 96 layout_manager());
97 manager->Relayout(); 97 manager->Relayout();
98 } 98 }
99 return window; 99 return window;
100 } 100 }
101 101
102 aura::Window* GetPanelContainer(aura::Window* panel) { 102 aura::Window* GetPanelContainer(aura::Window* panel) {
103 return Shell::GetContainer(panel->GetRootWindow(), 103 return Shell::GetContainer(panel->GetRootWindow(),
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 EXPECT_EQ(work_area.height(), window->GetBoundsInScreen().height()); 831 EXPECT_EQ(work_area.height(), window->GetBoundsInScreen().height());
832 } 832 }
833 833
834 // Tests run twice - on both panels and normal windows 834 // Tests run twice - on both panels and normal windows
835 INSTANTIATE_TEST_CASE_P(NormalOrPanel, 835 INSTANTIATE_TEST_CASE_P(NormalOrPanel,
836 DockedWindowLayoutManagerTest, 836 DockedWindowLayoutManagerTest,
837 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, 837 testing::Values(ui::wm::WINDOW_TYPE_NORMAL,
838 ui::wm::WINDOW_TYPE_PANEL)); 838 ui::wm::WINDOW_TYPE_PANEL));
839 } // namespace internal 839 } // namespace internal
840 } // namespace ash 840 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/test_shell_delegate.cc ('k') | ash/wm/dock/docked_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698