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

Side by Side Diff: shell/application_manager/application_manager.h

Issue 868463008: Remove Client relationship between mojo.Shell/mojo.Application (Closed) Base URL: git@github.com:domokit/mojo.git@app_impl_init
Patch Set: fix android Created 5 years, 10 months 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
OLDNEW
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_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ 5 #ifndef SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_
6 #define SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ 6 #define SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 ConnectToServiceByName(application_url, Interface::Name_); 65 ConnectToServiceByName(application_url, Interface::Name_);
66 ptr->Bind(service_handle.Pass()); 66 ptr->Bind(service_handle.Pass());
67 } 67 }
68 68
69 ScopedMessagePipeHandle ConnectToServiceByName( 69 ScopedMessagePipeHandle ConnectToServiceByName(
70 const GURL& application_url, 70 const GURL& application_url,
71 const std::string& interface_name); 71 const std::string& interface_name);
72 72
73 void RegisterExternalApplication(const GURL& application_url, 73 void RegisterExternalApplication(const GURL& application_url,
74 const std::vector<std::string>& args, 74 const std::vector<std::string>& args,
75 ScopedMessagePipeHandle shell_handle); 75 ApplicationPtr application);
76 76
77 // Sets the default Loader to be used if not overridden by SetLoaderForURL() 77 // Sets the default Loader to be used if not overridden by SetLoaderForURL()
78 // or SetLoaderForScheme(). 78 // or SetLoaderForScheme().
79 void set_default_loader(scoped_ptr<ApplicationLoader> loader) { 79 void set_default_loader(scoped_ptr<ApplicationLoader> loader) {
80 default_loader_ = loader.Pass(); 80 default_loader_ = loader.Pass();
81 } 81 }
82 // Sets a Loader to be used for a specific url. 82 // Sets a Loader to be used for a specific url.
83 void SetLoaderForURL(scoped_ptr<ApplicationLoader> loader, const GURL& url); 83 void SetLoaderForURL(scoped_ptr<ApplicationLoader> loader, const GURL& url);
84 // Sets a Loader to be used for a specific url scheme. 84 // Sets a Loader to be used for a specific url scheme.
85 void SetLoaderForScheme(scoped_ptr<ApplicationLoader> loader, 85 void SetLoaderForScheme(scoped_ptr<ApplicationLoader> loader,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 ShellImpl* GetShellImpl(const GURL& url); 120 ShellImpl* GetShellImpl(const GURL& url);
121 121
122 void ConnectToClient(ShellImpl* shell_impl, 122 void ConnectToClient(ShellImpl* shell_impl,
123 const GURL& url, 123 const GURL& url,
124 const GURL& requestor_url, 124 const GURL& requestor_url,
125 InterfaceRequest<ServiceProvider> services, 125 InterfaceRequest<ServiceProvider> services,
126 ServiceProviderPtr exposed_services); 126 ServiceProviderPtr exposed_services);
127 127
128 void LoadWithContentHandler(const GURL& content_handler_url, 128 void LoadWithContentHandler(const GURL& content_handler_url,
129 ScopedMessagePipeHandle shell_handle, 129 InterfaceRequest<Application> application_request,
130 URLResponsePtr url_response); 130 URLResponsePtr url_response);
131 131
132 // Return the appropriate loader for |url|. This can return NULL if there is 132 // Return the appropriate loader for |url|. This can return NULL if there is
133 // no default loader configured. 133 // no default loader configured.
134 ApplicationLoader* GetLoaderForURL(const GURL& url, 134 ApplicationLoader* GetLoaderForURL(const GURL& url,
135 IncludeDefaultLoader fallback); 135 IncludeDefaultLoader fallback);
136 136
137 // Removes a ContentHandler when it encounters an error. 137 // Removes a ContentHandler when it encounters an error.
138 void OnContentHandlerError(ContentHandlerConnection* content_handler); 138 void OnContentHandlerError(ContentHandlerConnection* content_handler);
139 139
(...skipping 11 matching lines...) Expand all
151 URLToArgsMap url_to_args_; 151 URLToArgsMap url_to_args_;
152 152
153 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_; 153 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_;
154 154
155 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); 155 DISALLOW_COPY_AND_ASSIGN(ApplicationManager);
156 }; 156 };
157 157
158 } // namespace mojo 158 } // namespace mojo
159 159
160 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ 160 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698