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

Side by Side Diff: mash/quick_launch/quick_launch_application.cc

Issue 2087333002: mus::GpuService: Support establish GpuChannel asynchronously. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the unittests Created 4 years, 5 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 | « content/renderer/render_thread_impl.cc ('k') | ui/views/mus/views_mus_test_suite.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 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 "mash/quick_launch/quick_launch_application.h" 5 #include "mash/quick_launch/quick_launch_application.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "components/mus/common/gpu_service.h"
12 #include "mash/public/interfaces/launchable.mojom.h" 13 #include "mash/public/interfaces/launchable.mojom.h"
13 #include "mojo/public/c/system/main.h" 14 #include "mojo/public/c/system/main.h"
14 #include "services/catalog/public/interfaces/catalog.mojom.h" 15 #include "services/catalog/public/interfaces/catalog.mojom.h"
15 #include "services/shell/public/cpp/application_runner.h" 16 #include "services/shell/public/cpp/application_runner.h"
16 #include "services/shell/public/cpp/connector.h" 17 #include "services/shell/public/cpp/connector.h"
17 #include "services/shell/public/cpp/shell_client.h" 18 #include "services/shell/public/cpp/shell_client.h"
18 #include "services/tracing/public/cpp/tracing_impl.h" 19 #include "services/tracing/public/cpp/tracing_impl.h"
19 #include "ui/views/background.h" 20 #include "ui/views/background.h"
20 #include "ui/views/controls/textfield/textfield.h" 21 #include "ui/views/controls/textfield/textfield.h"
21 #include "ui/views/controls/textfield/textfield_controller.h" 22 #include "ui/views/controls/textfield/textfield_controller.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 DCHECK(it != windows_.end()); 161 DCHECK(it != windows_.end());
161 windows_.erase(it); 162 windows_.erase(it);
162 if (windows_.empty() && base::MessageLoop::current()->is_running()) 163 if (windows_.empty() && base::MessageLoop::current()->is_running())
163 base::MessageLoop::current()->QuitWhenIdle(); 164 base::MessageLoop::current()->QuitWhenIdle();
164 } 165 }
165 166
166 void QuickLaunchApplication::Initialize(shell::Connector* connector, 167 void QuickLaunchApplication::Initialize(shell::Connector* connector,
167 const shell::Identity& identity, 168 const shell::Identity& identity,
168 uint32_t id) { 169 uint32_t id) {
169 connector_ = connector; 170 connector_ = connector;
171 mus::GpuService::Initialize(connector);
170 tracing_.Initialize(connector, identity.name()); 172 tracing_.Initialize(connector, identity.name());
171 173
172 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); 174 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak"));
173 window_manager_connection_ = 175 window_manager_connection_ =
174 views::WindowManagerConnection::Create(connector, identity); 176 views::WindowManagerConnection::Create(connector, identity);
175 177
176 Launch(mojom::kWindow, mojom::LaunchMode::MAKE_NEW); 178 Launch(mojom::kWindow, mojom::LaunchMode::MAKE_NEW);
177 } 179 }
178 180
179 bool QuickLaunchApplication::AcceptConnection(shell::Connection* connection) { 181 bool QuickLaunchApplication::AcceptConnection(shell::Connection* connection) {
(...skipping 18 matching lines...) Expand all
198 windows_.push_back(window); 200 windows_.push_back(window);
199 } 201 }
200 202
201 void QuickLaunchApplication::Create(shell::Connection* connection, 203 void QuickLaunchApplication::Create(shell::Connection* connection,
202 mojom::LaunchableRequest request) { 204 mojom::LaunchableRequest request) {
203 bindings_.AddBinding(this, std::move(request)); 205 bindings_.AddBinding(this, std::move(request));
204 } 206 }
205 207
206 } // namespace quick_launch 208 } // namespace quick_launch
207 } // namespace mash 209 } // namespace mash
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | ui/views/mus/views_mus_test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698