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 // Returns true if an extension's event page is active, | |
22 // or false if it is suspended. | |
23 virtual bool IsEventPageActive(const std::string& extension_id) = 0; | |
24 | |
25 // Wakes an extension's event page from a suspended state and calls | |
26 // |callback| after it is reactivated. | |
27 // | |
28 // The callback will be passed true if the extension was | |
mark a. foltz
2015/04/27 23:26:40
Rewrap this to 80 cols.
Kevin M
2015/04/28 21:12:14
Done.
| |
29 // woken up successfully, or false if an error occurred. | |
30 // | |
31 // Function will return true if a wake operation was scheduled successfully, | |
32 // or false if the event page was already active and did not require waking. | |
33 virtual bool WakeEventPage(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 |