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

Side by Side Diff: shell/context.cc

Issue 1483823004: EDK: Move {platform_handle,scoped_platform_handle}.* to //mojo/edk/platform. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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 | « shell/child_process_host.h ('k') | no next file » | 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 "shell/context.h" 5 #include "shell/context.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 // TODO(vtl): Probably these failures should be checked before |Init()|, and 312 // TODO(vtl): Probably these failures should be checked before |Init()|, and
313 // this function simply shouldn't fail. 313 // this function simply shouldn't fail.
314 if (!shell_file_root_.is_valid()) 314 if (!shell_file_root_.is_valid())
315 return false; 315 return false;
316 if (!ConfigureURLMappings(command_line, this)) 316 if (!ConfigureURLMappings(command_line, this))
317 return false; 317 return false;
318 318
319 mojo::embedder::InitIPCSupport(mojo::embedder::ProcessType::MASTER, 319 mojo::embedder::InitIPCSupport(mojo::embedder::ProcessType::MASTER,
320 task_runners_->shell_runner().Clone(), this, 320 task_runners_->shell_runner().Clone(), this,
321 task_runners_->io_runner().Clone(), 321 task_runners_->io_runner().Clone(),
322 mojo::embedder::ScopedPlatformHandle()); 322 mojo::platform::ScopedPlatformHandle());
323 323
324 scoped_ptr<NativeRunnerFactory> runner_factory; 324 scoped_ptr<NativeRunnerFactory> runner_factory;
325 if (command_line.HasSwitch(switches::kEnableMultiprocess)) 325 if (command_line.HasSwitch(switches::kEnableMultiprocess))
326 runner_factory.reset(new OutOfProcessNativeRunnerFactory(this)); 326 runner_factory.reset(new OutOfProcessNativeRunnerFactory(this));
327 else 327 else
328 runner_factory.reset(new InProcessNativeRunnerFactory(this)); 328 runner_factory.reset(new InProcessNativeRunnerFactory(this));
329 application_manager_.set_blocking_pool(task_runners_->blocking_pool()); 329 application_manager_.set_blocking_pool(task_runners_->blocking_pool());
330 application_manager_.set_native_runner_factory(runner_factory.Pass()); 330 application_manager_.set_native_runner_factory(runner_factory.Pass());
331 331
332 InitContentHandlers(&application_manager_, command_line); 332 InitContentHandlers(&application_manager_, command_line);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 if (app_urls_.find(url) != app_urls_.end()) { 397 if (app_urls_.find(url) != app_urls_.end()) {
398 app_urls_.erase(url); 398 app_urls_.erase(url);
399 if (app_urls_.empty() && base::MessageLoop::current()->is_running()) { 399 if (app_urls_.empty() && base::MessageLoop::current()->is_running()) {
400 DCHECK(task_runners_->shell_runner()->RunsTasksOnCurrentThread()); 400 DCHECK(task_runners_->shell_runner()->RunsTasksOnCurrentThread());
401 base::MessageLoop::current()->Quit(); 401 base::MessageLoop::current()->Quit();
402 } 402 }
403 } 403 }
404 } 404 }
405 405
406 } // namespace shell 406 } // namespace shell
OLDNEW
« no previous file with comments | « shell/child_process_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698