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

Side by Side Diff: ash/mus/test/wm_test_helper.cc

Issue 2777223002: Gets chrome --mus some what working (Closed)
Patch Set: fix mac Created 3 years, 9 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/mus/bridge/wm_shell_mus.cc ('k') | ash/mus/window_manager.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/mus/test/wm_test_helper.h" 5 #include "ash/mus/test/wm_test_helper.h"
6 6
7 #include "ash/common/wm_shell.h" 7 #include "ash/common/wm_shell.h"
8 #include "ash/common/wm_window.h" 8 #include "ash/common/wm_window.h"
9 #include "ash/mus/screen_mus.h" 9 #include "ash/mus/screen_mus.h"
10 #include "ash/mus/window_manager.h" 10 #include "ash/mus/window_manager.h"
11 #include "ash/mus/window_manager_application.h" 11 #include "ash/mus/window_manager_application.h"
12 #include "ash/public/cpp/config.h"
12 #include "ash/test/test_shell_delegate.h" 13 #include "ash/test/test_shell_delegate.h"
13 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
14 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
15 #include "base/strings/string_number_conversions.h" 16 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/string_split.h" 17 #include "base/strings/string_split.h"
17 #include "base/test/sequenced_worker_pool_owner.h" 18 #include "base/test/sequenced_worker_pool_owner.h"
18 #include "services/ui/public/cpp/property_type_converters.h" 19 #include "services/ui/public/cpp/property_type_converters.h"
19 #include "ui/aura/mus/window_tree_client.h" 20 #include "ui/aura/mus/window_tree_client.h"
20 #include "ui/aura/test/env_test_helper.h" 21 #include "ui/aura/test/env_test_helper.h"
21 #include "ui/aura/test/mus/window_tree_client_private.h" 22 #include "ui/aura/test/mus/window_tree_client_private.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 93
93 window_manager_app_ = base::MakeUnique<WindowManagerApplication>(); 94 window_manager_app_ = base::MakeUnique<WindowManagerApplication>();
94 95
95 message_loop_.reset(new base::MessageLoopForUI()); 96 message_loop_.reset(new base::MessageLoopForUI());
96 97
97 const size_t kMaxNumberThreads = 3u; // Matches that of content. 98 const size_t kMaxNumberThreads = 3u; // Matches that of content.
98 const char kThreadNamePrefix[] = "MashBlockingForTesting"; 99 const char kThreadNamePrefix[] = "MashBlockingForTesting";
99 blocking_pool_owner_ = base::MakeUnique<base::SequencedWorkerPoolOwner>( 100 blocking_pool_owner_ = base::MakeUnique<base::SequencedWorkerPoolOwner>(
100 kMaxNumberThreads, kThreadNamePrefix); 101 kMaxNumberThreads, kThreadNamePrefix);
101 102
102 window_manager_app_->window_manager_.reset(new WindowManager(nullptr)); 103 window_manager_app_->window_manager_ =
103 window_manager_app_->window_manager()->shell_delegate_for_test_ = 104 base::MakeUnique<WindowManager>(nullptr, Config::MASH);
105 window_manager_app_->window_manager()->shell_delegate_ =
104 base::MakeUnique<test::TestShellDelegate>(); 106 base::MakeUnique<test::TestShellDelegate>();
105 107
106 window_tree_client_setup_.InitForWindowManager( 108 window_tree_client_setup_.InitForWindowManager(
107 window_manager_app_->window_manager_.get(), 109 window_manager_app_->window_manager_.get(),
108 window_manager_app_->window_manager_.get()); 110 window_manager_app_->window_manager_.get());
109 aura::test::EnvTestHelper().SetWindowTreeClient( 111 aura::test::EnvTestHelper().SetWindowTreeClient(
110 window_tree_client_setup_.window_tree_client()); 112 window_tree_client_setup_.window_tree_client());
111 // See comment in AshTestHelper for details on why NetworkHandler is not 113 // See comment in AshTestHelper for details on why NetworkHandler is not
112 // initialized. 114 // initialized.
113 const bool init_network_handler = false; 115 const bool init_network_handler = false;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 const bool is_primary = 189 const bool is_primary =
188 screen->display_list().FindDisplayById(updated_display.id()) == 190 screen->display_list().FindDisplayById(updated_display.id()) ==
189 screen->display_list().GetPrimaryDisplayIterator(); 191 screen->display_list().GetPrimaryDisplayIterator();
190 screen->display_list().UpdateDisplay( 192 screen->display_list().UpdateDisplay(
191 updated_display, is_primary ? display::DisplayList::Type::PRIMARY 193 updated_display, is_primary ? display::DisplayList::Type::PRIMARY
192 : display::DisplayList::Type::NOT_PRIMARY); 194 : display::DisplayList::Type::NOT_PRIMARY);
193 } 195 }
194 196
195 } // namespace mus 197 } // namespace mus
196 } // namespace ash 198 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.cc ('k') | ash/mus/window_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698