| Index: extensions/browser/api/serial/serial_event_dispatcher.h
|
| diff --git a/chrome/browser/extensions/api/serial/serial_event_dispatcher.h b/extensions/browser/api/serial/serial_event_dispatcher.h
|
| similarity index 78%
|
| rename from chrome/browser/extensions/api/serial/serial_event_dispatcher.h
|
| rename to extensions/browser/api/serial/serial_event_dispatcher.h
|
| index 49abfd7d9d905fd0ac5cad2a1d7bbc787667ff91..427c9561ddbed41d2ba93876363a6e19c599fa46 100644
|
| --- a/chrome/browser/extensions/api/serial/serial_event_dispatcher.h
|
| +++ b/extensions/browser/api/serial/serial_event_dispatcher.h
|
| @@ -2,22 +2,26 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_EVENT_DISPATCHER_H_
|
| -#define CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_EVENT_DISPATCHER_H_
|
| +#ifndef EXTENSIONS_BROWSER_API_SERIAL_SERIAL_EVENT_DISPATCHER_H_
|
| +#define EXTENSIONS_BROWSER_API_SERIAL_SERIAL_EVENT_DISPATCHER_H_
|
| +
|
| +#include <string>
|
|
|
| -#include "chrome/common/extensions/api/serial.h"
|
| #include "extensions/browser/api/api_resource_manager.h"
|
| +#include "extensions/common/api/serial.h"
|
|
|
| -class Profile;
|
| +namespace content {
|
| +class BrowserContext;
|
| +}
|
|
|
| namespace extensions {
|
|
|
| struct Event;
|
| class SerialConnection;
|
|
|
| -namespace api {
|
| +namespace core_api {
|
|
|
| -// Per-profile dispatcher for events on serial connections.
|
| +// Per-browser-context dispatcher for events on serial connections.
|
| class SerialEventDispatcher : public BrowserContextKeyedAPI {
|
| public:
|
| explicit SerialEventDispatcher(content::BrowserContext* context);
|
| @@ -46,7 +50,7 @@ class SerialEventDispatcher : public BrowserContextKeyedAPI {
|
| ~ReceiveParams();
|
|
|
| content::BrowserThread::ID thread_id;
|
| - void* profile_id;
|
| + void* browser_context_id;
|
| std::string extension_id;
|
| scoped_refptr<ConnectionData> connections;
|
| int connection_id;
|
| @@ -61,17 +65,17 @@ class SerialEventDispatcher : public BrowserContextKeyedAPI {
|
| static void PostEvent(const ReceiveParams& params,
|
| scoped_ptr<extensions::Event> event);
|
|
|
| - static void DispatchEvent(void* profile_id,
|
| + static void DispatchEvent(void* browser_context_id,
|
| const std::string& extension_id,
|
| scoped_ptr<extensions::Event> event);
|
|
|
| content::BrowserThread::ID thread_id_;
|
| - Profile* const profile_;
|
| + content::BrowserContext* const context_;
|
| scoped_refptr<ConnectionData> connections_;
|
| };
|
|
|
| -} // namespace api
|
| +} // namespace core_api
|
|
|
| } // namespace extensions
|
|
|
| -#endif // CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_EVENT_DISPATCHER_H_
|
| +#endif // EXTENSIONS_BROWSER_API_SERIAL_SERIAL_EVENT_DISPATCHER_H_
|
|
|