template_url_service_observer.h 989 B

1234567891011121314151617181920212223242526
  1. // Copyright 2014 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. #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_OBSERVER_H_
  5. #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_OBSERVER_H_
  6. #include "base/observer_list_types.h"
  7. // TemplateURLServiceObserver is notified whenever the set of TemplateURLs
  8. // are modified.
  9. class TemplateURLServiceObserver : public base::CheckedObserver {
  10. public:
  11. // Notification that the template url model has changed in some way.
  12. virtual void OnTemplateURLServiceChanged() = 0;
  13. // Notification that the template url service is shutting down. Observers that
  14. // might outlive the service can use this to clear out any raw pointers to the
  15. // service.
  16. virtual void OnTemplateURLServiceShuttingDown() {}
  17. protected:
  18. ~TemplateURLServiceObserver() override {}
  19. };
  20. #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_OBSERVER_H_