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

Side by Side Diff: chrome/browser/extensions/api/page_launcher/page_launcher_api.cc

Issue 12253022: Manifest handler for all keys background-related. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/page_launcher/page_launcher_api.h" 5 #include "chrome/browser/extensions/api/page_launcher/page_launcher_api.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/memory/linked_ptr.h" 8 #include "base/memory/linked_ptr.h"
9 #include "chrome/browser/extensions/event_router.h" 9 #include "chrome/browser/extensions/event_router.h"
10 #include "chrome/browser/extensions/extension_system.h" 10 #include "chrome/browser/extensions/extension_system.h"
11 #include "chrome/common/extensions/api/page_launcher.h" 11 #include "chrome/common/extensions/api/page_launcher.h"
12 #include "chrome/common/extensions/api/page_launcher/page_launcher_handler.h" 12 #include "chrome/common/extensions/api/page_launcher/page_launcher_handler.h"
13 #include "chrome/common/extensions/extension_manifest_constants.h"
14 #include "chrome/common/extensions/manifest_handler.h"
15 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
16 14
17 namespace extensions { 15 namespace extensions {
18 16
19 static base::LazyInstance<ProfileKeyedAPIFactory<PageLauncherAPI> > 17 static base::LazyInstance<ProfileKeyedAPIFactory<PageLauncherAPI> >
20 g_factory = LAZY_INSTANCE_INITIALIZER; 18 g_factory = LAZY_INSTANCE_INITIALIZER;
21 19
22 PageLauncherAPI::PageLauncherAPI(Profile* profile) { 20 PageLauncherAPI::PageLauncherAPI(Profile* profile) {
23 ManifestHandler::Register(extension_manifest_keys::kPageLauncher, 21 (new PageLauncherHandler)->Register();
24 make_linked_ptr(new PageLauncherHandler));
25 } 22 }
26 23
27 PageLauncherAPI::~PageLauncherAPI() { 24 PageLauncherAPI::~PageLauncherAPI() {
28 } 25 }
29 26
30 // static 27 // static
31 void PageLauncherAPI::DispatchOnClickedEvent( 28 void PageLauncherAPI::DispatchOnClickedEvent(
32 Profile* profile, 29 Profile* profile,
33 const std::string& extension_id, 30 const std::string& extension_id,
34 const GURL& url, 31 const GURL& url,
(...skipping 15 matching lines...) Expand all
50 event_router->DispatchEventToExtension(extension_id, event.Pass()); 47 event_router->DispatchEventToExtension(extension_id, event.Pass());
51 } 48 }
52 49
53 50
54 // static 51 // static
55 ProfileKeyedAPIFactory<PageLauncherAPI>* PageLauncherAPI::GetFactoryInstance() { 52 ProfileKeyedAPIFactory<PageLauncherAPI>* PageLauncherAPI::GetFactoryInstance() {
56 return &g_factory.Get(); 53 return &g_factory.Get();
57 } 54 }
58 55
59 } // namespace extensions 56 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/omnibox/omnibox_api.cc ('k') | chrome/browser/extensions/api/runtime/runtime_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698