Commit 0bbe26e3 authored by jamescook's avatar jamescook Committed by Commit bot

Revert "app_shell: Add experimental shellPrivate extension API"

This reverts commit e99bfcb9.

Going forward app_shell specific APIs will go in //extensions/shell

BUG=424651
TEST=compiles

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

Cr-Commit-Position: refs/heads/master@{#300150}
parent 14ad520f
......@@ -159,8 +159,6 @@ source_set("browser") {
"api/serial/serial_connection.h",
"api/serial/serial_event_dispatcher.cc",
"api/serial/serial_event_dispatcher.h",
"api/shell_private/shell_private_api.cc",
"api/shell_private/shell_private_api.h",
"api/socket/socket.cc",
"api/socket/socket.h",
"api/socket/socket_api.cc",
......
jamescook@chromium.org
rockot@chromium.org
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "extensions/browser/api/shell_private/shell_private_api.h"
namespace extensions {
ShellPrivatePrintHelloFunction::ShellPrivatePrintHelloFunction() {
}
ShellPrivatePrintHelloFunction::~ShellPrivatePrintHelloFunction() {
}
ExtensionFunction::ResponseAction ShellPrivatePrintHelloFunction::Run() {
// Warning so it shows in Release and avoids presubmit check for INFO.
LOG(WARNING) << "hello";
return RespondNow(NoArguments());
}
} // namespace extensions
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef EXTENSIONS_BROWSER_API_SHELL_PRIVATE_SHELL_PRIVATE_API_H_
#define EXTENSIONS_BROWSER_API_SHELL_PRIVATE_SHELL_PRIVATE_API_H_
#include "base/macros.h"
#include "extensions/browser/extension_function.h"
namespace extensions {
// Synchronously prints "hello" to the console.
class ShellPrivatePrintHelloFunction : public UIThreadExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("shellPrivate.printHello", UNKNOWN);
ShellPrivatePrintHelloFunction();
protected:
virtual ~ShellPrivatePrintHelloFunction();
// ExtensionFunction:
virtual ResponseAction Run() override;
private:
DISALLOW_COPY_AND_ASSIGN(ShellPrivatePrintHelloFunction);
};
} // namespace extensions
#endif // EXTENSIONS_BROWSER_API_SHELL_PRIVATE_SHELL_PRIVATE_API_H_
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "extensions/browser/api/shell_private/shell_private_api.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "extensions/browser/api_unittest.h"
namespace extensions {
typedef ApiUnitTest ShellPrivateApiTest;
// Verifies that the printHello function exists and can be called without
// crashing.
TEST_F(ShellPrivateApiTest, PrintHello) {
scoped_ptr<base::Value> result =
RunFunctionAndReturnValue(new ShellPrivatePrintHelloFunction, "[]");
// Function returns nothing.
EXPECT_FALSE(result.get());
}
} // namespace extensions
......@@ -204,11 +204,6 @@
"dependencies": ["permission:serial"],
"contexts": ["blessed_extension"]
},
"shellPrivate": {
"channel": "trunk",
"extension_types": ["platform_app"],
"contexts": ["blessed_extension"]
},
"socket": {
"dependencies": ["permission:socket"],
"contexts": ["blessed_extension"]
......
......@@ -30,7 +30,6 @@
'power.idl',
'runtime.json',
'serial.idl',
'shell_private.idl',
'socket.idl',
'sockets_tcp.idl',
'sockets_tcp_server.idl',
......
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// <code>chrome.shellPrivate</code> API with experimental APIs for app_shell.
[nodoc] namespace shellPrivate {
interface Functions {
// Prints "hello" to the Chrome log.
static void printHello();
};
};
......@@ -446,8 +446,6 @@
'browser/api/serial/serial_connection.h',
'browser/api/serial/serial_event_dispatcher.cc',
'browser/api/serial/serial_event_dispatcher.h',
'browser/api/shell_private/shell_private_api.cc',
'browser/api/shell_private/shell_private_api.h',
'browser/api/socket/socket.cc',
'browser/api/socket/socket.h',
'browser/api/socket/socket_api.cc',
......@@ -1112,7 +1110,6 @@
'browser/api/declarative_webrequest/webrequest_condition_unittest.cc',
'browser/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc',
'browser/api/power/power_api_unittest.cc',
'browser/api/shell_private/shell_private_api_unittest.cc',
'browser/api/sockets_tcp/sockets_tcp_api_unittest.cc',
'browser/api/storage/settings_quota_unittest.cc',
'browser/api/storage/storage_api_unittest.cc',
......
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