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

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

Issue 1105063002: Documents what ApplicationManager::Delegate do (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | shell/application_manager/application_manager.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 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 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 17 matching lines...) Expand all
28 28
29 namespace shell { 29 namespace shell {
30 30
31 class Fetcher; 31 class Fetcher;
32 class ShellImpl; 32 class ShellImpl;
33 33
34 class ApplicationManager { 34 class ApplicationManager {
35 public: 35 public:
36 class Delegate { 36 class Delegate {
37 public: 37 public:
38 virtual ~Delegate(); 38 // Gives the delegate a chance to apply any mappings for the specified url.
39 virtual GURL ResolveURL(const GURL& url); 39 // This should not resolve 'mojo' urls, that is done by ResolveMojoURL().
40 virtual GURL ResolveMappings(const GURL& url); 40 virtual GURL ResolveMappings(const GURL& url) = 0;
41
42 // Used to map a url with the scheme 'mojo' to the appropriate url. Return
43 // |url| if the scheme is not 'mojo'.
44 virtual GURL ResolveMojoURL(const GURL& url) = 0;
45
46 protected:
47 virtual ~Delegate() {}
41 }; 48 };
42 49
43 // API for testing. 50 // API for testing.
44 class TestAPI { 51 class TestAPI {
45 public: 52 public:
46 explicit TestAPI(ApplicationManager* manager); 53 explicit TestAPI(ApplicationManager* manager);
47 ~TestAPI(); 54 ~TestAPI();
48 55
49 // Returns true if the shared instance has been created. 56 // Returns true if the shared instance has been created.
50 static bool HasCreatedInstance(); 57 static bool HasCreatedInstance();
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 ScopedVector<NativeRunner> native_runners_; 236 ScopedVector<NativeRunner> native_runners_;
230 bool disable_cache_; 237 bool disable_cache_;
231 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_; 238 base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_;
232 239
233 DISALLOW_COPY_AND_ASSIGN(ApplicationManager); 240 DISALLOW_COPY_AND_ASSIGN(ApplicationManager);
234 }; 241 };
235 242
236 } // namespace shell 243 } // namespace shell
237 244
238 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_ 245 #endif // SHELL_APPLICATION_MANAGER_APPLICATION_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | shell/application_manager/application_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698