| 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_SHELL_STANDALONE_CONTEXT_H_ | 5 #ifndef MOJO_SHELL_STANDALONE_CONTEXT_H_ |
| 6 #define MOJO_SHELL_STANDALONE_CONTEXT_H_ | 6 #define MOJO_SHELL_STANDALONE_CONTEXT_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "mojo/edk/embedder/process_delegate.h" | 14 #include "mojo/edk/embedder/process_delegate.h" |
| 15 #include "mojo/shell/application_manager.h" | 15 #include "mojo/shell/application_manager.h" |
| 16 #include "mojo/shell/standalone/tracer.h" | 16 #include "mojo/shell/standalone/tracer.h" |
| 17 #include "url/gurl.h" | |
| 18 | 17 |
| 19 namespace base { | 18 namespace base { |
| 20 class SingleThreadTaskRunner; | 19 class SingleThreadTaskRunner; |
| 21 } | 20 } |
| 22 | 21 |
| 23 namespace package_manager { | 22 namespace package_manager { |
| 24 class ApplicationCatalogStore; | 23 class ApplicationCatalogStore; |
| 25 } | 24 } |
| 26 | 25 |
| 27 namespace mojo { | 26 namespace mojo { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 55 void RunCommandLineApplication(); | 54 void RunCommandLineApplication(); |
| 56 | 55 |
| 57 ApplicationManager* application_manager() { | 56 ApplicationManager* application_manager() { |
| 58 return application_manager_.get(); | 57 return application_manager_.get(); |
| 59 } | 58 } |
| 60 | 59 |
| 61 private: | 60 private: |
| 62 // edk::ProcessDelegate: | 61 // edk::ProcessDelegate: |
| 63 void OnShutdownComplete() override; | 62 void OnShutdownComplete() override; |
| 64 | 63 |
| 65 // Runs the app specified by |url|. | 64 // Runs the app specified by |name|. |
| 66 void Run(const GURL& url); | 65 void Run(const std::string& name); |
| 67 | 66 |
| 68 scoped_refptr<base::SingleThreadTaskRunner> shell_runner_; | 67 scoped_refptr<base::SingleThreadTaskRunner> shell_runner_; |
| 69 scoped_ptr<base::Thread> io_thread_; | 68 scoped_ptr<base::Thread> io_thread_; |
| 70 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; | 69 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; |
| 71 | 70 |
| 72 // Ensure this is destructed before task_runners_ since it owns a message pipe | 71 // Ensure this is destructed before task_runners_ since it owns a message pipe |
| 73 // that needs the IO thread to destruct cleanly. | 72 // that needs the IO thread to destruct cleanly. |
| 74 Tracer tracer_; | 73 Tracer tracer_; |
| 75 scoped_ptr<ApplicationManager> application_manager_; | 74 scoped_ptr<ApplicationManager> application_manager_; |
| 76 base::Time main_entry_time_; | 75 base::Time main_entry_time_; |
| 77 | 76 |
| 78 DISALLOW_COPY_AND_ASSIGN(Context); | 77 DISALLOW_COPY_AND_ASSIGN(Context); |
| 79 }; | 78 }; |
| 80 | 79 |
| 81 } // namespace shell | 80 } // namespace shell |
| 82 } // namespace mojo | 81 } // namespace mojo |
| 83 | 82 |
| 84 #endif // MOJO_SHELL_STANDALONE_CONTEXT_H_ | 83 #endif // MOJO_SHELL_STANDALONE_CONTEXT_H_ |
| OLD | NEW |