| 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 SHELL_CONTEXT_H_ | 5 #ifndef SHELL_CONTEXT_H_ |
| 6 #define SHELL_CONTEXT_H_ | 6 #define SHELL_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "shell/application_manager/application_manager.h" | 11 #include "shell/application_manager/application_manager.h" |
| 12 #include "shell/mojo_url_resolver.h" | |
| 13 #include "shell/task_runners.h" | 12 #include "shell/task_runners.h" |
| 13 #include "shell/url_resolver.h" |
| 14 | 14 |
| 15 namespace mojo { | 15 namespace mojo { |
| 16 | 16 |
| 17 namespace shell { | 17 namespace shell { |
| 18 | 18 |
| 19 class DynamicApplicationLoader; | 19 class DynamicApplicationLoader; |
| 20 class ExternalApplicationListener; | 20 class ExternalApplicationListener; |
| 21 | 21 |
| 22 // The "global" context for the shell's main process. | 22 // The "global" context for the shell's main process. |
| 23 class Context : ApplicationManager::Delegate { | 23 class Context : ApplicationManager::Delegate { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 46 static void EnsureEmbedderIsInitialized(); | 46 static void EnsureEmbedderIsInitialized(); |
| 47 bool Init(); | 47 bool Init(); |
| 48 | 48 |
| 49 void Run(const GURL& url); | 49 void Run(const GURL& url); |
| 50 ScopedMessagePipeHandle ConnectToServiceByName( | 50 ScopedMessagePipeHandle ConnectToServiceByName( |
| 51 const GURL& application_url, | 51 const GURL& application_url, |
| 52 const std::string& service_name); | 52 const std::string& service_name); |
| 53 | 53 |
| 54 TaskRunners* task_runners() { return task_runners_.get(); } | 54 TaskRunners* task_runners() { return task_runners_.get(); } |
| 55 ApplicationManager* application_manager() { return &application_manager_; } | 55 ApplicationManager* application_manager() { return &application_manager_; } |
| 56 MojoURLResolver* mojo_url_resolver() { return &mojo_url_resolver_; } | 56 URLResolver* url_resolver() { return &url_resolver_; } |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 class NativeViewportApplicationLoader; | 59 class NativeViewportApplicationLoader; |
| 60 | 60 |
| 61 // ApplicationManager::Delegate override. | 61 // ApplicationManager::Delegate override. |
| 62 void OnApplicationError(const GURL& url) override; | 62 void OnApplicationError(const GURL& url) override; |
| 63 GURL ResolveURL(const GURL& url) override; | 63 GURL ResolveURL(const GURL& url) override; |
| 64 GURL ResolveMappings(const GURL& url) override; | 64 GURL ResolveMappings(const GURL& url) override; |
| 65 | 65 |
| 66 std::set<GURL> app_urls_; | 66 std::set<GURL> app_urls_; |
| 67 scoped_ptr<TaskRunners> task_runners_; | 67 scoped_ptr<TaskRunners> task_runners_; |
| 68 scoped_ptr<ExternalApplicationListener> listener_; | 68 scoped_ptr<ExternalApplicationListener> listener_; |
| 69 ApplicationManager application_manager_; | 69 ApplicationManager application_manager_; |
| 70 MojoURLResolver mojo_url_resolver_; | 70 URLResolver url_resolver_; |
| 71 GURL shell_file_root_; | 71 GURL shell_file_root_; |
| 72 GURL command_line_cwd_; | 72 GURL command_line_cwd_; |
| 73 | 73 |
| 74 DISALLOW_COPY_AND_ASSIGN(Context); | 74 DISALLOW_COPY_AND_ASSIGN(Context); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace shell | 77 } // namespace shell |
| 78 } // namespace mojo | 78 } // namespace mojo |
| 79 | 79 |
| 80 #endif // SHELL_CONTEXT_H_ | 80 #endif // SHELL_CONTEXT_H_ |
| OLD | NEW |