| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_ANDROID_UI_APPLICATION_LOADER_ANDROID_H_ | 5 #ifndef SHELL_ANDROID_UI_APPLICATION_LOADER_ANDROID_H_ |
| 6 #define SHELL_ANDROID_UI_APPLICATION_LOADER_ANDROID_H_ | 6 #define SHELL_ANDROID_UI_APPLICATION_LOADER_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "shell/application_manager/application_loader.h" | 10 #include "shell/application_manager/application_loader.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // ApplicationLoader overrides: | 29 // ApplicationLoader overrides: |
| 30 void Load( | 30 void Load( |
| 31 const GURL& url, | 31 const GURL& url, |
| 32 mojo::InterfaceRequest<mojo::Application> application_request) override; | 32 mojo::InterfaceRequest<mojo::Application> application_request) override; |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 class UILoader; | 35 class UILoader; |
| 36 | 36 |
| 37 // These functions are exected on the background thread. They call through | 37 // These functions are exected on the background thread. They call through |
| 38 // to |background_loader_| to do the actual loading. | 38 // to |loader_| to do the actual loading. |
| 39 // TODO: having this code take a |manager| is fragile (as ApplicationManager | |
| 40 // isn't thread safe). | |
| 41 void LoadOnUIThread( | 39 void LoadOnUIThread( |
| 42 const GURL& url, | 40 const GURL& url, |
| 43 mojo::InterfaceRequest<mojo::Application> application_request); | 41 mojo::InterfaceRequest<mojo::Application> application_request); |
| 44 void ShutdownOnUIThread(); | 42 void ShutdownOnUIThread(); |
| 45 | 43 |
| 46 scoped_ptr<ApplicationLoader> loader_; | 44 scoped_ptr<ApplicationLoader> loader_; |
| 47 base::MessageLoop* ui_message_loop_; | 45 base::MessageLoop* ui_message_loop_; |
| 48 | 46 |
| 49 DISALLOW_COPY_AND_ASSIGN(UIApplicationLoader); | 47 DISALLOW_COPY_AND_ASSIGN(UIApplicationLoader); |
| 50 }; | 48 }; |
| 51 | 49 |
| 52 } // namespace shell | 50 } // namespace shell |
| 53 | 51 |
| 54 #endif // SHELL_ANDROID_UI_APPLICATION_LOADER_ANDROID_H_ | 52 #endif // SHELL_ANDROID_UI_APPLICATION_LOADER_ANDROID_H_ |
| OLD | NEW |