| OLD | NEW |
| 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 #ifndef MOJO_RUNNER_CONTEXT_H_ | 5 #ifndef MOJO_RUNNER_CONTEXT_H_ |
| 6 #define MOJO_RUNNER_CONTEXT_H_ | 6 #define MOJO_RUNNER_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "mojo/edk/embedder/process_delegate.h" | |
| 15 #include "mojo/runner/scoped_user_data_dir.h" | 14 #include "mojo/runner/scoped_user_data_dir.h" |
| 16 #include "mojo/runner/task_runners.h" | 15 #include "mojo/runner/task_runners.h" |
| 17 #include "mojo/shell/application_manager.h" | 16 #include "mojo/shell/application_manager.h" |
| 18 #include "url/gurl.h" | 17 #include "url/gurl.h" |
| 19 | 18 |
| 19 #if defined(USE_CHROME_EDK) |
| 20 #include "mojo/edk/embedder/process_delegate.h" |
| 21 #else |
| 22 #include "third_party/mojo/src/mojo/edk/embedder/process_delegate.h" |
| 23 #endif |
| 24 |
| 20 namespace mojo { | 25 namespace mojo { |
| 21 namespace package_manager { | 26 namespace package_manager { |
| 22 class PackageManagerImpl; | 27 class PackageManagerImpl; |
| 23 } | 28 } |
| 24 namespace runner { | 29 namespace runner { |
| 25 | 30 |
| 26 class NativeApplicationLoader; | 31 class NativeApplicationLoader; |
| 27 | 32 |
| 28 // The "global" context for the shell's main process. | 33 // The "global" context for the shell's main process. |
| 34 #if defined(USE_CHROME_EDK) |
| 35 class Context : public edk::ProcessDelegate { |
| 36 #else |
| 29 class Context : public embedder::ProcessDelegate { | 37 class Context : public embedder::ProcessDelegate { |
| 38 #endif |
| 30 public: | 39 public: |
| 31 explicit Context(const base::FilePath& shell_file_root); | 40 explicit Context(const base::FilePath& shell_file_root); |
| 32 ~Context() override; | 41 ~Context() override; |
| 33 | 42 |
| 34 static void EnsureEmbedderIsInitialized(); | 43 static void EnsureEmbedderIsInitialized(); |
| 35 | 44 |
| 36 // This must be called with a message loop set up for the current thread, | 45 // This must be called with a message loop set up for the current thread, |
| 37 // which must remain alive until after Shutdown() is called. Returns true on | 46 // which must remain alive until after Shutdown() is called. Returns true on |
| 38 // success. | 47 // success. |
| 39 bool Init(); | 48 bool Init(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 base::Closure app_complete_callback_; | 86 base::Closure app_complete_callback_; |
| 78 base::Time main_entry_time_; | 87 base::Time main_entry_time_; |
| 79 | 88 |
| 80 DISALLOW_COPY_AND_ASSIGN(Context); | 89 DISALLOW_COPY_AND_ASSIGN(Context); |
| 81 }; | 90 }; |
| 82 | 91 |
| 83 } // namespace runner | 92 } // namespace runner |
| 84 } // namespace mojo | 93 } // namespace mojo |
| 85 | 94 |
| 86 #endif // MOJO_RUNNER_CONTEXT_H_ | 95 #endif // MOJO_RUNNER_CONTEXT_H_ |
| OLD | NEW |