OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "mojo/shell/shell_application_delegate.h" | 5 #include "mojo/shell/shell_application_delegate.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/process/process.h" | 11 #include "base/process/process.h" |
| 12 #include "mojo/edk/embedder/embedder.h" |
| 13 #include "mojo/edk/embedder/scoped_platform_handle.h" |
12 #include "mojo/shell/application_manager.h" | 14 #include "mojo/shell/application_manager.h" |
13 #include "mojo/shell/public/cpp/application_connection.h" | 15 #include "mojo/shell/public/cpp/application_connection.h" |
14 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h" | |
15 | 16 |
16 namespace mojo { | 17 namespace mojo { |
17 namespace shell { | 18 namespace shell { |
18 | 19 |
19 ShellApplicationDelegate::ShellApplicationDelegate( | 20 ShellApplicationDelegate::ShellApplicationDelegate( |
20 mojo::shell::ApplicationManager* manager) | 21 mojo::shell::ApplicationManager* manager) |
21 : manager_(manager) {} | 22 : manager_(manager) {} |
22 ShellApplicationDelegate::~ShellApplicationDelegate() {} | 23 ShellApplicationDelegate::~ShellApplicationDelegate() {} |
23 | 24 |
24 void ShellApplicationDelegate::Initialize(ApplicationImpl* app) {} | 25 void ShellApplicationDelegate::Initialize(ApplicationImpl* app) {} |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 base::ProcessId great_grandparent = | 68 base::ProcessId great_grandparent = |
68 base::GetParentProcessId(base::Process(grandparent_pid).Handle()); | 69 base::GetParentProcessId(base::Process(grandparent_pid).Handle()); |
69 if (great_grandparent != base::GetCurrentProcId()) | 70 if (great_grandparent != base::GetCurrentProcId()) |
70 #endif | 71 #endif |
71 { | 72 { |
72 NOTREACHED(); | 73 NOTREACHED(); |
73 return; | 74 return; |
74 } | 75 } |
75 } | 76 } |
76 | 77 |
77 embedder::ScopedPlatformHandle platform_pipe; | 78 edk::ScopedPlatformHandle platform_pipe; |
78 MojoResult rv = embedder::PassWrappedPlatformHandle( | 79 MojoResult rv = edk::PassWrappedPlatformHandle( |
79 pipe.release().value(), &platform_pipe); | 80 pipe.release().value(), &platform_pipe); |
80 CHECK_EQ(rv, MOJO_RESULT_OK); | 81 CHECK_EQ(rv, MOJO_RESULT_OK); |
81 embedder::ChildProcessLaunched(process.Handle(), std::move(platform_pipe)); | 82 edk::ChildProcessLaunched(process.Handle(), std::move(platform_pipe)); |
82 } | 83 } |
83 | 84 |
84 void ShellApplicationDelegate::AddListener( | 85 void ShellApplicationDelegate::AddListener( |
85 mojom::ApplicationManagerListenerPtr listener) { | 86 mojom::ApplicationManagerListenerPtr listener) { |
86 manager_->AddListener(std::move(listener)); | 87 manager_->AddListener(std::move(listener)); |
87 } | 88 } |
88 | 89 |
89 } // namespace shell | 90 } // namespace shell |
90 } // namespace mojo | 91 } // namespace mojo |
OLD | NEW |