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

Unified Diff: chrome/browser/extensions/api/omnibox/omnibox_api.h

Issue 23710022: Convert NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED to CallbackList (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean-up Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/omnibox/omnibox_api.h
diff --git a/chrome/browser/extensions/api/omnibox/omnibox_api.h b/chrome/browser/extensions/api/omnibox/omnibox_api.h
index 3792dc536c29a085b343b32cabf343a950b1818b..fdfbc82b36b4ea3027c47d8fef0b398a2d9bfa0c 100644
--- a/chrome/browser/extensions/api/omnibox/omnibox_api.h
+++ b/chrome/browser/extensions/api/omnibox/omnibox_api.h
@@ -10,11 +10,13 @@
#include <vector>
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
Avi (use Gerrit) 2013/10/02 22:27:52 not used; don't include
Cait (Slow) 2013/10/03 15:36:45 Done.
#include "base/strings/string16.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/extensions/extension_icon_manager.h"
+#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/common/extensions/api/omnibox.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -98,6 +100,9 @@ class OmniboxAPI : public ProfileKeyedAPI,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // BrowserContextKeyedService implementation.
+ virtual void Shutdown() OVERRIDE;
+
// Returns the icon to display in the omnibox for the given extension.
gfx::Image GetOmniboxIcon(const std::string& extension_id);
@@ -110,6 +115,8 @@ class OmniboxAPI : public ProfileKeyedAPI,
typedef std::set<const Extension*> PendingExtensions;
+ void OnTemplateURLsLoaded();
+
// ProfileKeyedAPI implementation.
static const char* service_name() {
return "OmniboxAPI";
@@ -130,6 +137,8 @@ class OmniboxAPI : public ProfileKeyedAPI,
ExtensionIconManager omnibox_icon_manager_;
ExtensionIconManager omnibox_popup_icon_manager_;
+ scoped_ptr<TemplateURLService::Subscription> template_url_sub_;
+
DISALLOW_COPY_AND_ASSIGN(OmniboxAPI);
};

Powered by Google App Engine
This is Rietveld 408576698