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

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

Issue 489493004: Update view manager to support content handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blah to the blizzah Created 6 years, 3 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 | Annotate | Revision Log
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 MOJO_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ 5 #ifndef MOJO_APPLICATION_MANAGER_APPLICATION_MANAGER_H_
6 #define MOJO_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ 6 #define MOJO_APPLICATION_MANAGER_APPLICATION_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "mojo/application_manager/application_loader.h" 14 #include "mojo/application_manager/application_loader.h"
15 #include "mojo/application_manager/application_manager_export.h" 15 #include "mojo/application_manager/application_manager_export.h"
16 #include "mojo/public/interfaces/application/service_provider.mojom.h" 16 #include "mojo/public/interfaces/application/service_provider.mojom.h"
17 #include "mojo/services/public/interfaces/content_handler/content_handler.mojom. h"
17 #include "url/gurl.h" 18 #include "url/gurl.h"
18 19
19 namespace mojo { 20 namespace mojo {
20 21
21 class MOJO_APPLICATION_MANAGER_EXPORT ApplicationManager { 22 class MOJO_APPLICATION_MANAGER_EXPORT ApplicationManager {
22 public: 23 public:
23 class MOJO_APPLICATION_MANAGER_EXPORT Delegate { 24 class MOJO_APPLICATION_MANAGER_EXPORT Delegate {
24 public: 25 public:
25 virtual ~Delegate(); 26 virtual ~Delegate();
26 // Send when the Applicaiton holding the handle on the other end of the 27 // Send when the Applicaiton holding the handle on the other end of the
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 void ConnectToClient(ShellImpl* shell_impl, 114 void ConnectToClient(ShellImpl* shell_impl,
114 const GURL& url, 115 const GURL& url,
115 const GURL& requestor_url, 116 const GURL& requestor_url,
116 ServiceProviderPtr service_provider); 117 ServiceProviderPtr service_provider);
117 118
118 void RegisterLoadedApplication(const GURL& service_url, 119 void RegisterLoadedApplication(const GURL& service_url,
119 const GURL& requestor_url, 120 const GURL& requestor_url,
120 ServiceProviderPtr service_provider, 121 ServiceProviderPtr service_provider,
121 ScopedMessagePipeHandle* shell_handle); 122 ScopedMessagePipeHandle* shell_handle);
122 123
123 void LoadWithContentHandler(const GURL& content_url, 124 void LoadWithContentHandler(
124 const GURL& requestor_url, 125 const GURL& content_url,
125 const GURL& content_handler_url, 126 const GURL& requestor_url,
126 URLResponsePtr content, 127 const GURL& content_handler_url,
127 ServiceProviderPtr service_provider); 128 URLResponsePtr url_response,
129 URLLoaderPtr url_loader,
130 ServiceProviderPtr service_provider);
128 131
129 // Returns the Loader to use for a url (using default if not overridden.) 132 // Returns the Loader to use for a url (using default if not overridden.)
130 // The preference is to use a loader that's been specified for an url first, 133 // The preference is to use a loader that's been specified for an url first,
131 // then one that's been specified for a scheme, then the default. 134 // then one that's been specified for a scheme, then the default.
132 ApplicationLoader* GetLoaderForURL(const GURL& url); 135 ApplicationLoader* GetLoaderForURL(const GURL& url);
133 136
134 // Removes a ShellImpl when it encounters an error. 137 // Removes a ShellImpl when it encounters an error.
135 void OnShellImplError(ShellImpl* shell_impl); 138 void OnShellImplError(ShellImpl* shell_impl);
136 139
137 Delegate* delegate_; 140 Delegate* delegate_;
138 // Loader management. 141 // Loader management.
139 URLToLoaderMap url_to_loader_; 142 URLToLoaderMap url_to_loader_;
140 SchemeToLoaderMap scheme_to_loader_; 143 SchemeToLoaderMap scheme_to_loader_;
141 scoped_ptr<ApplicationLoader> default_loader_; 144 scoped_ptr<ApplicationLoader> default_loader_;
142 Interceptor* interceptor_; 145 Interceptor* interceptor_;
143 146
144 URLToShellImplMap url_to_shell_impl_; 147 URLToShellImplMap url_to_shell_impl_;
145 URLToContentHandlerMap url_to_content_handler_; 148 URLToContentHandlerMap url_to_content_handler_;
146 149
147 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_; 150 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_;
148 151
149 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); 152 DISALLOW_COPY_AND_ASSIGN(ApplicationManager);
150 }; 153 };
151 154
152 } // namespace mojo 155 } // namespace mojo
153 156
154 #endif // MOJO_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ 157 #endif // MOJO_APPLICATION_MANAGER_APPLICATION_MANAGER_H_
OLDNEW
« no previous file with comments | « mojo/application_manager/application_loader.cc ('k') | mojo/application_manager/application_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698