1 // Copyright (c) 2012 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.
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_INVALIDATION_MAPPER_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_INVALIDATION_MAPPER_H_
10 namespace extensions {
12 // Interface for mapping extension IDs to object IDs.
13 // TODO(dcheng): This interface is somewhat misnamed... think of a better name.
14 class PushMessagingInvalidationMapper {
16 virtual ~PushMessagingInvalidationMapper() {}
18 // Informs the mapper that |extension_id| was just installed. The mapper uses
19 // this information to suppress the initial invalidation on each subchannel
20 // for that extension to avoid spurious push messages at install time.
21 virtual void SuppressInitialInvalidationsForExtension(
22 const std::string& extension_id) = 0;
24 // Register/unregister the object IDs associated with |extension_id|.
25 virtual void RegisterExtension(const std::string& extension_id) = 0;
26 virtual void UnregisterExtension(const std::string& extension_id) = 0;
29 } // namespace extensions
31 #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_INVALIDATION_MAPPER_H_