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

Side by Side Diff: extensions/browser/process_manager.h

Issue 182253010: Register a Service Worker when an extension is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test passes! Don't know if it's right though Created 6 years, 9 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 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 EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ 5 #ifndef EXTENSIONS_BROWSER_PROCESS_MANAGER_H_
6 #define EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ 6 #define EXTENSIONS_BROWSER_PROCESS_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 return background_hosts_; 48 return background_hosts_;
49 } 49 }
50 50
51 typedef std::set<content::RenderViewHost*> ViewSet; 51 typedef std::set<content::RenderViewHost*> ViewSet;
52 const ViewSet GetAllViews() const; 52 const ViewSet GetAllViews() const;
53 53
54 // Creates a new UI-less extension instance. Like CreateViewHost, but not 54 // Creates a new UI-less extension instance. Like CreateViewHost, but not
55 // displayed anywhere. Returns false if no background host can be created, 55 // displayed anywhere. Returns false if no background host can be created,
56 // for example for hosted apps and extensions that aren't enabled in 56 // for example for hosted apps and extensions that aren't enabled in
57 // Incognito. 57 // Incognito.
58 virtual bool CreateBackgroundHost(const Extension* extension, 58 virtual bool CreateBackgroundHost(
59 const GURL& url); 59 const Extension* extension,
60 const GURL& url,
61 const base::Closure& continuation = base::Closure());
60 62
61 // Gets the ExtensionHost for the background page for an extension, or NULL if 63 // Gets the ExtensionHost for the background page for an extension, or NULL if
62 // the extension isn't running or doesn't have a background page. 64 // the extension isn't running or doesn't have a background page.
63 ExtensionHost* GetBackgroundHostForExtension(const std::string& extension_id); 65 ExtensionHost* GetBackgroundHostForExtension(const std::string& extension_id);
64 66
65 // Returns the SiteInstance that the given URL belongs to. 67 // Returns the SiteInstance that the given URL belongs to.
66 // TODO(aa): This only returns correct results for extensions and packaged 68 // TODO(aa): This only returns correct results for extensions and packaged
67 // apps, not hosted apps. 69 // apps, not hosted apps.
68 virtual content::SiteInstance* GetSiteInstanceForURL(const GURL& url); 70 virtual content::SiteInstance* GetSiteInstanceForURL(const GURL& url);
69 71
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 ImpulseCallbackForTesting keepalive_impulse_decrement_callback_for_testing_; 241 ImpulseCallbackForTesting keepalive_impulse_decrement_callback_for_testing_;
240 242
241 base::WeakPtrFactory<ProcessManager> weak_ptr_factory_; 243 base::WeakPtrFactory<ProcessManager> weak_ptr_factory_;
242 244
243 DISALLOW_COPY_AND_ASSIGN(ProcessManager); 245 DISALLOW_COPY_AND_ASSIGN(ProcessManager);
244 }; 246 };
245 247
246 } // namespace extensions 248 } // namespace extensions
247 249
248 #endif // EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ 250 #endif // EXTENSIONS_BROWSER_PROCESS_MANAGER_H_
OLDNEW
« no previous file with comments | « content/renderer/service_worker/embedded_worker_dispatcher.cc ('k') | extensions/browser/process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698