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

Unified Diff: extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc

Issue 420663003: Extensions: Move bluetooth APIs to extensions/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android, gn Created 6 years, 4 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: extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc
diff --git a/chrome/browser/extensions/api/bluetooth_socket/bluetooth_socket_api.cc b/extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc
similarity index 96%
rename from chrome/browser/extensions/api/bluetooth_socket/bluetooth_socket_api.cc
rename to extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc
index cbd8f834a38e05c0719ac6931a1382cb7df641c6..77d19d1a66658057b6a00403e723f56351e20680 100644
--- a/chrome/browser/extensions/api/bluetooth_socket/bluetooth_socket_api.cc
+++ b/extensions/browser/api/bluetooth_socket/bluetooth_socket_api.cc
@@ -2,27 +2,30 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/extensions/api/bluetooth_socket/bluetooth_socket_api.h"
+#include "extensions/browser/api/bluetooth_socket/bluetooth_socket_api.h"
#include <stdint.h>
-#include "chrome/browser/extensions/api/bluetooth_socket/bluetooth_api_socket.h"
-#include "chrome/browser/extensions/api/bluetooth_socket/bluetooth_socket_event_dispatcher.h"
-#include "chrome/common/extensions/api/bluetooth/bluetooth_manifest_data.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "device/bluetooth/bluetooth_adapter.h"
#include "device/bluetooth/bluetooth_adapter_factory.h"
#include "device/bluetooth/bluetooth_device.h"
#include "device/bluetooth/bluetooth_socket.h"
+#include "extensions/browser/api/bluetooth_socket/bluetooth_api_socket.h"
+#include "extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.h"
+#include "extensions/common/api/bluetooth/bluetooth_manifest_data.h"
#include "extensions/common/permissions/permissions_data.h"
#include "net/base/io_buffer.h"
using content::BrowserThread;
using extensions::BluetoothApiSocket;
-using extensions::api::bluetooth_socket::ListenOptions;
-using extensions::api::bluetooth_socket::SocketInfo;
-using extensions::api::bluetooth_socket::SocketProperties;
+using extensions::core_api::bluetooth_socket::ListenOptions;
+using extensions::core_api::bluetooth_socket::SocketInfo;
+using extensions::core_api::bluetooth_socket::SocketProperties;
+
+namespace extensions {
+namespace core_api {
namespace {
@@ -71,10 +74,10 @@ void SetSocketProperties(BluetoothApiSocket* socket,
}
}
-extensions::api::BluetoothSocketEventDispatcher* GetSocketEventDispatcher(
+BluetoothSocketEventDispatcher* GetSocketEventDispatcher(
content::BrowserContext* browser_context) {
- extensions::api::BluetoothSocketEventDispatcher* socket_event_dispatcher =
- extensions::api::BluetoothSocketEventDispatcher::Get(browser_context);
+ BluetoothSocketEventDispatcher* socket_event_dispatcher =
+ BluetoothSocketEventDispatcher::Get(browser_context);
DCHECK(socket_event_dispatcher)
<< "There is no socket event dispatcher. "
"If this assertion is failing during a test, then it is likely that "
@@ -113,9 +116,6 @@ bool IsValidPsm(int psm) {
} // namespace
-namespace extensions {
-namespace api {
-
BluetoothSocketAsyncApiFunction::BluetoothSocketAsyncApiFunction() {}
BluetoothSocketAsyncApiFunction::~BluetoothSocketAsyncApiFunction() {}
@@ -674,5 +674,5 @@ void BluetoothSocketGetSocketsFunction::Work() {
results_ = bluetooth_socket::GetSockets::Results::Create(socket_infos);
}
-} // namespace api
+} // namespace core_api
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698