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

Side by Side Diff: ui/views/mus/platform_test_helper_mus.cc

Issue 1899323002: Add mash shelf application id support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address simpler comments. Created 4 years, 8 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 | « services/shell/public/cpp/shell_connection.h ('k') | ui/views/mus/window_manager_connection.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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/memory/ptr_util.h" 6 #include "base/memory/ptr_util.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "services/shell/background/background_shell.h" 8 #include "services/shell/background/background_shell.h"
9 #include "services/shell/background/tests/test_catalog_store.h" 9 #include "services/shell/background/tests/test_catalog_store.h"
10 #include "services/shell/public/cpp/connector.h" 10 #include "services/shell/public/cpp/connector.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // TODO(rockot): Remove this RunLoop. http://crbug.com/594852. 53 // TODO(rockot): Remove this RunLoop. http://crbug.com/594852.
54 base::RunLoop wait_loop; 54 base::RunLoop wait_loop;
55 shell_connection_->set_initialize_handler(wait_loop.QuitClosure()); 55 shell_connection_->set_initialize_handler(wait_loop.QuitClosure());
56 wait_loop.Run(); 56 wait_loop.Run();
57 57
58 // ui/views/mus requires a WindowManager running, for now use the desktop 58 // ui/views/mus requires a WindowManager running, for now use the desktop
59 // one. 59 // one.
60 shell::Connector* connector = shell_connection_->connector(); 60 shell::Connector* connector = shell_connection_->connector();
61 connector->Connect("mojo:desktop_wm"); 61 connector->Connect("mojo:desktop_wm");
62 WindowManagerConnection::Create(connector); 62 WindowManagerConnection::Create(connector, shell_connection_->identity());
63 63
64 // On X we need to reset the ContextFactory before every NativeWidgetMus 64 // On X we need to reset the ContextFactory before every NativeWidgetMus
65 // is created. 65 // is created.
66 // TODO(sad): this is a hack, figure out a better solution. 66 // TODO(sad): this is a hack, figure out a better solution.
67 ViewsDelegate::GetInstance()->set_native_widget_factory(base::Bind( 67 ViewsDelegate::GetInstance()->set_native_widget_factory(base::Bind(
68 &PlatformTestHelperMus::CreateNativeWidgetMus, base::Unretained(this), 68 &PlatformTestHelperMus::CreateNativeWidgetMus, base::Unretained(this),
69 std::map<std::string, std::vector<uint8_t>>())); 69 std::map<std::string, std::vector<uint8_t>>()));
70 } 70 }
71 71
72 ~PlatformTestHelperMus() override { 72 ~PlatformTestHelperMus() override {
(...skipping 26 matching lines...) Expand all
99 }; 99 };
100 100
101 } // namespace 101 } // namespace
102 102
103 // static 103 // static
104 std::unique_ptr<PlatformTestHelper> PlatformTestHelper::Create() { 104 std::unique_ptr<PlatformTestHelper> PlatformTestHelper::Create() {
105 return base::WrapUnique(new PlatformTestHelperMus); 105 return base::WrapUnique(new PlatformTestHelperMus);
106 } 106 }
107 107
108 } // namespace views 108 } // namespace views
OLDNEW
« no previous file with comments | « services/shell/public/cpp/shell_connection.h ('k') | ui/views/mus/window_manager_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698