Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: mojo/shell/context.h

Issue 696563002: Cache ShellImpl by resolved URL, not initial URL (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/application_manager/application_manager_unittest.cc ('k') | mojo/shell/context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_CONTEXT_H_ 5 #ifndef MOJO_SHELL_CONTEXT_H_
6 #define MOJO_SHELL_CONTEXT_H_ 6 #define MOJO_SHELL_CONTEXT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 15 matching lines...) Expand all
26 class ExternalApplicationListener; 26 class ExternalApplicationListener;
27 27
28 // The "global" context for the shell's main process. 28 // The "global" context for the shell's main process.
29 class Context : ApplicationManager::Delegate { 29 class Context : ApplicationManager::Delegate {
30 public: 30 public:
31 Context(); 31 Context();
32 ~Context() override; 32 ~Context() override;
33 33
34 void Init(); 34 void Init();
35 35
36 // ApplicationManager::Delegate override.
37 void OnApplicationError(const GURL& gurl) override;
38
39 void Run(const GURL& url); 36 void Run(const GURL& url);
40 ScopedMessagePipeHandle ConnectToServiceByName( 37 ScopedMessagePipeHandle ConnectToServiceByName(
41 const GURL& application_url, 38 const GURL& application_url,
42 const std::string& service_name); 39 const std::string& service_name);
43 40
44 TaskRunners* task_runners() { return task_runners_.get(); } 41 TaskRunners* task_runners() { return task_runners_.get(); }
45 ApplicationManager* application_manager() { return &application_manager_; } 42 ApplicationManager* application_manager() { return &application_manager_; }
46 MojoURLResolver* mojo_url_resolver() { return &mojo_url_resolver_; } 43 MojoURLResolver* mojo_url_resolver() { return &mojo_url_resolver_; }
47 44
48 #if defined(OS_ANDROID) 45 #if defined(OS_ANDROID)
49 base::MessageLoop* ui_loop() const { return ui_loop_; } 46 base::MessageLoop* ui_loop() const { return ui_loop_; }
50 void set_ui_loop(base::MessageLoop* ui_loop) { ui_loop_ = ui_loop; } 47 void set_ui_loop(base::MessageLoop* ui_loop) { ui_loop_ = ui_loop; }
51 #endif // defined(OS_ANDROID) 48 #endif // defined(OS_ANDROID)
52 49
53 private: 50 private:
54 class NativeViewportApplicationLoader; 51 class NativeViewportApplicationLoader;
55 52
53 // ApplicationManager::Delegate override.
54 void OnApplicationError(const GURL& url) override;
55 GURL ResolveURL(const GURL& url) override;
56
56 std::set<GURL> app_urls_; 57 std::set<GURL> app_urls_;
57 scoped_ptr<TaskRunners> task_runners_; 58 scoped_ptr<TaskRunners> task_runners_;
58 scoped_ptr<ExternalApplicationListener> listener_; 59 scoped_ptr<ExternalApplicationListener> listener_;
59 ApplicationManager application_manager_; 60 ApplicationManager application_manager_;
60 MojoURLResolver mojo_url_resolver_; 61 MojoURLResolver mojo_url_resolver_;
61 scoped_ptr<Spy> spy_; 62 scoped_ptr<Spy> spy_;
62 #if defined(OS_ANDROID) 63 #if defined(OS_ANDROID)
63 base::MessageLoop* ui_loop_; 64 base::MessageLoop* ui_loop_;
64 #endif // defined(OS_ANDROID) 65 #endif // defined(OS_ANDROID)
65 66
66 DISALLOW_COPY_AND_ASSIGN(Context); 67 DISALLOW_COPY_AND_ASSIGN(Context);
67 }; 68 };
68 69
69 } // namespace shell 70 } // namespace shell
70 } // namespace mojo 71 } // namespace mojo
71 72
72 #endif // MOJO_SHELL_CONTEXT_H_ 73 #endif // MOJO_SHELL_CONTEXT_H_
OLDNEW
« no previous file with comments | « mojo/application_manager/application_manager_unittest.cc ('k') | mojo/shell/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698