Move NaClModulesHandler to src/extensions

This is a first, very small step towards making NaCl work in app_shell.

BUG=400577
TEST=compiles
TBR=brettw@chromium.org for moving a few lines out of chrome/common/BUILD.gn into extensions/common/BUILD.gn

Review URL: https://codereview.chromium.org/435343002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288136 0039d316-1c4b-4281-b951-d872f2087c98
parent 62c928ae
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
#include <string> #include <string>
#include "base/scoped_observer.h" #include "base/scoped_observer.h"
#include "chrome/common/extensions/manifest_handlers/nacl_modules_handler.h"
#include "extensions/browser/browser_context_keyed_api_factory.h" #include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/extension_registry_observer.h" #include "extensions/browser/extension_registry_observer.h"
#include "extensions/common/manifest_handlers/nacl_modules_handler.h"
class GURL; class GURL;
class Profile; class Profile;
......
...@@ -420,10 +420,6 @@ ...@@ -420,10 +420,6 @@
'<(DEPTH)/components/nacl.gyp:nacl_common', '<(DEPTH)/components/nacl.gyp:nacl_common',
'<(DEPTH)/ppapi/native_client/src/trusted/plugin/plugin.gyp:nacl_trusted_plugin', '<(DEPTH)/ppapi/native_client/src/trusted/plugin/plugin.gyp:nacl_trusted_plugin',
], ],
'sources': [
'common/extensions/manifest_handlers/nacl_modules_handler.cc',
'common/extensions/manifest_handlers/nacl_modules_handler.h',
],
}], }],
['enable_printing==0', { ['enable_printing==0', {
'sources!': [ 'sources!': [
......
...@@ -135,10 +135,6 @@ static_library("common") { ...@@ -135,10 +135,6 @@ static_library("common") {
deps += [ deps += [
#'<(DEPTH)/components/nacl.gyp:nacl_common', TODO(GYP) #'<(DEPTH)/components/nacl.gyp:nacl_common', TODO(GYP)
] ]
sources += [
"extensions/manifest_handlers/nacl_modules_handler.cc",
"extensions/manifest_handlers/nacl_modules_handler.h",
]
} }
# Printing. # Printing.
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "chrome/common/extensions/manifest_handlers/content_scripts_handler.h" #include "chrome/common/extensions/manifest_handlers/content_scripts_handler.h"
#include "chrome/common/extensions/manifest_handlers/mime_types_handler.h" #include "chrome/common/extensions/manifest_handlers/mime_types_handler.h"
#include "chrome/common/extensions/manifest_handlers/minimum_chrome_version_checker.h" #include "chrome/common/extensions/manifest_handlers/minimum_chrome_version_checker.h"
#include "chrome/common/extensions/manifest_handlers/nacl_modules_handler.h"
#include "chrome/common/extensions/manifest_handlers/settings_overrides_handler.h" #include "chrome/common/extensions/manifest_handlers/settings_overrides_handler.h"
#include "chrome/common/extensions/manifest_handlers/synthesize_browser_action_handler.h" #include "chrome/common/extensions/manifest_handlers/synthesize_browser_action_handler.h"
#include "chrome/common/extensions/manifest_handlers/theme_handler.h" #include "chrome/common/extensions/manifest_handlers/theme_handler.h"
...@@ -61,9 +60,6 @@ void RegisterChromeManifestHandlers() { ...@@ -61,9 +60,6 @@ void RegisterChromeManifestHandlers() {
#endif #endif
(new MimeTypesHandlerParser)->Register(); (new MimeTypesHandlerParser)->Register();
(new MinimumChromeVersionChecker)->Register(); (new MinimumChromeVersionChecker)->Register();
#if !defined(DISABLE_NACL)
(new NaClModulesHandler)->Register();
#endif
(new OAuth2ManifestHandler)->Register(); (new OAuth2ManifestHandler)->Register();
(new OmniboxHandler)->Register(); (new OmniboxHandler)->Register();
(new OptionsPageHandler)->Register(); (new OptionsPageHandler)->Register();
......
...@@ -224,6 +224,13 @@ source_set("common") { ...@@ -224,6 +224,13 @@ source_set("common") {
] ]
} }
if (enable_nacl) {
sources += [
"manifest_handlers/nacl_modules_handler.cc",
"manifest_handlers/nacl_modules_handler.h",
]
}
if (is_win) { if (is_win) {
cflags = [ cflags = [
"/wd4267", # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. "/wd4267", # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "extensions/common/manifest_handlers/icons_handler.h" #include "extensions/common/manifest_handlers/icons_handler.h"
#include "extensions/common/manifest_handlers/incognito_info.h" #include "extensions/common/manifest_handlers/incognito_info.h"
#include "extensions/common/manifest_handlers/kiosk_mode_info.h" #include "extensions/common/manifest_handlers/kiosk_mode_info.h"
#include "extensions/common/manifest_handlers/nacl_modules_handler.h"
#include "extensions/common/manifest_handlers/offline_enabled_info.h" #include "extensions/common/manifest_handlers/offline_enabled_info.h"
#include "extensions/common/manifest_handlers/sandboxed_page_info.h" #include "extensions/common/manifest_handlers/sandboxed_page_info.h"
#include "extensions/common/manifest_handlers/shared_module_info.h" #include "extensions/common/manifest_handlers/shared_module_info.h"
...@@ -28,6 +29,9 @@ void RegisterCommonManifestHandlers() { ...@@ -28,6 +29,9 @@ void RegisterCommonManifestHandlers() {
(new IconsHandler)->Register(); (new IconsHandler)->Register();
(new IncognitoHandler)->Register(); (new IncognitoHandler)->Register();
(new KioskModeHandler)->Register(); (new KioskModeHandler)->Register();
#if !defined(DISABLE_NACL)
(new NaClModulesHandler)->Register();
#endif
(new OfflineEnabledHandler)->Register(); (new OfflineEnabledHandler)->Register();
(new SandboxedPageHandler)->Register(); (new SandboxedPageHandler)->Register();
(new SharedModuleHandler)->Register(); (new SharedModuleHandler)->Register();
......
// Copyright 2013 The Chromium Authors. All rights reserved. // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "chrome/common/extensions/manifest_handlers/nacl_modules_handler.h" #include "extensions/common/manifest_handlers/nacl_modules_handler.h"
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
......
// Copyright 2013 The Chromium Authors. All rights reserved. // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_NACL_MODULES_HANDLER_H_ #ifndef EXTENSIONS_COMMON_MANIFEST_HANDLERS_NACL_MODULES_HANDLER_H_
#define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_NACL_MODULES_HANDLER_H_ #define EXTENSIONS_COMMON_MANIFEST_HANDLERS_NACL_MODULES_HANDLER_H_
#include <list> #include <list>
#include <string> #include <string>
...@@ -38,4 +38,4 @@ class NaClModulesHandler : public ManifestHandler { ...@@ -38,4 +38,4 @@ class NaClModulesHandler : public ManifestHandler {
} // namespace extensions } // namespace extensions
#endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_NACL_MODULES_HANDLER_H_ #endif // EXTENSIONS_COMMON_MANIFEST_HANDLERS_NACL_MODULES_HANDLER_H_
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
'../components/components.gyp:url_matcher', '../components/components.gyp:url_matcher',
'../content/content.gyp:content_common', '../content/content.gyp:content_common',
'../crypto/crypto.gyp:crypto', '../crypto/crypto.gyp:crypto',
# For Mojo generated headers for generated_api.cc.
'../device/serial/serial.gyp:device_serial_mojo',
'../ipc/ipc.gyp:ipc', '../ipc/ipc.gyp:ipc',
'../net/net.gyp:net', '../net/net.gyp:net',
'../third_party/re2/re2.gyp:re2', '../third_party/re2/re2.gyp:re2',
...@@ -231,6 +233,14 @@ ...@@ -231,6 +233,14 @@
'common/manifest_handlers/externally_connectable.h', 'common/manifest_handlers/externally_connectable.h',
], ],
}], }],
['disable_nacl==0', {
# NaClModulesHandler does not use any code in NaCl, so no dependency
# on nacl_common.
'sources': [
'common/manifest_handlers/nacl_modules_handler.cc',
'common/manifest_handlers/nacl_modules_handler.h',
],
}],
], ],
}, },
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment