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

Side by Side Diff: chrome/browser/extensions/api/streams_private/streams_private_api.cc

Issue 12381035: Move Mime type handling to streamsPrivate API, so that it works on Desktop Chrome. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix base files 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
OLDNEW
(Empty)
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.
4
5 #include "chrome/browser/extensions/api/streams_private/streams_private_api.h"
6
7 #include "base/json/json_writer.h"
8 #include "base/lazy_instance.h"
9 #include "base/stl_util.h"
10 #include "base/strings/string_number_conversions.h"
11 #include "base/values.h"
12 #include "chrome/browser/extensions/event_router.h"
13 #include "chrome/browser/extensions/extension_function_registry.h"
14 #include "chrome/browser/extensions/extension_input_module_constants.h"
15 #include "chrome/browser/extensions/extension_system.h"
16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/common/extensions/extension_manifest_constants.h"
18 #include "chrome/common/extensions/mime_types_handler.h"
19
20 namespace keys = extension_input_module_constants;
21
22 namespace events {
23
24 const char kOnExecuteMimeTypeHandler[] =
25 "streamsPrivate.onExecuteMimeTypeHandler";
26
27 } // namespace events
28
29 namespace extensions {
30
31 StreamsPrivateAPI::StreamsPrivateAPI(Profile* profile)
32 : profile_(profile) {
33 ManifestHandler::Register(extension_manifest_keys::kMIMETypes,
34 make_linked_ptr(new MimeTypesHandlerParser));
35 }
36
37 StreamsPrivateAPI::~StreamsPrivateAPI() {
38 }
39
40 static base::LazyInstance<ProfileKeyedAPIFactory<StreamsPrivateAPI> >
41 g_factory = LAZY_INSTANCE_INITIALIZER;
42
43 // static
44 ProfileKeyedAPIFactory<StreamsPrivateAPI>*
45 StreamsPrivateAPI::GetFactoryInstance() {
46 return &g_factory.Get();
47 }
48
49 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698