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

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

Issue 1096313003: Create interface "EventPageTracker" for checking an extension's (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix IWYU linter error while I'm at it. 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 | extensions/browser/process_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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.
32 // Callback will be run asynchronously if true, and never run if false.
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_
OLDNEW
« no previous file with comments | « no previous file | extensions/browser/process_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698