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 // Tracks an extension's event page suspend state. | |
| 18 class EventPageTracker { | |
| 19 public: | |
| 20 // Returns true if an extension's event page is active, | |
| 21 // or false if it is suspended. | |
| 22 virtual bool IsEventPageSuspended(const std::string& extension_id) = 0; | |
| 23 | |
| 24 // Wakes an extension's event page from a suspended state and calls | |
| 25 // |callback| after it is reactivated. | |
| 26 // | |
| 27 // |callback| will be passed true if the extension was reactivated | |
| 28 // successfully, or false if an error occurred. | |
| 29 // | |
| 30 // Returns true if a wake operation was scheduled successfully, | |
| 31 // or false if the event page was already awake. | |
|
not at google - send to devlin
2015/04/28 21:35:11
Add a comment to the effect of "|callback| will be
| |
| 32 virtual bool WakeEventPage(const std::string& extension_id, | |
| 33 const base::Callback<void(bool)>& callback) = 0; | |
| 34 }; | |
| 35 | |
| 36 } // namespace extensions | |
| 37 | |
| 38 #endif // EXTENSIONS_BROWSER_EVENT_PAGE_TRACKER_H_ | |
| OLD | NEW |