Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef EXTENSIONS_BROWSER_EVENT_PAGE_TRACKER_H_ | |
| 6 #define EXTENSIONS_BROWSER_EVENT_PAGE_TRACKER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/callback.h" | |
| 11 | |
| 12 namespace extensions { | |
| 13 | |
| 14 class Extension; | |
| 15 class ExtensionHost; | |
| 16 | |
| 17 // Defines a set of methods that can be used to track an extension's event page | |
| 18 // suspend state. | |
| 19 class EventPageTracker { | |
| 20 public: | |
| 21 // Gets the ExtensionHost for the background page for an extension, or null if | |
| 22 // the extension isn't running or doesn't have a background page. | |
| 23 // | |
| 24 // A non-null return value indicates that an extension's event page is active; | |
| 25 // null indicates that it is suspended. | |
| 26 virtual ExtensionHost* GetBackgroundHostForExtension( | |
| 27 const std::string& extension_id) = 0; | |
|
not at google - send to devlin
2015/04/24 20:05:08
GetEventPageForExtension? Just "background host" i
Kevin Marshall
2015/04/24 21:04:53
This function is a pre-existing method in ProcessM
not at google - send to devlin
2015/04/24 21:20:43
Sure, if you prefer a bool then makes sense to cre
| |
| 28 | |
| 29 // Wakes an extension from a suspended state. | |
| 30 // |callback| is called with true if the extension was successfully loaded | |
| 31 // or if it was already active; false if the extension failed | |
| 32 // to load. | |
| 33 virtual void WakeExtension(const std::string& extension_id, | |
| 34 const base::Callback<void(bool)>& callback) = 0; | |
| 35 }; | |
| 36 | |
| 37 } // namespace extensions | |
| 38 | |
| 39 #endif // EXTENSIONS_BROWSER_EVENT_PAGE_TRACKER_H_ | |
| OLD | NEW |