initialize bluetooth for linux
This commit is contained in:
parent
1cc0d0599e
commit
a09e270efd
2 changed files with 16 additions and 0 deletions
|
@ -48,6 +48,11 @@
|
|||
#include "ui/gfx/platform_font_win.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
#include "device/bluetooth/bluetooth_adapter_factory.h"
|
||||
#include "device/bluetooth/dbus/dbus_bluez_manager_wrapper_linux.h"
|
||||
#endif
|
||||
|
||||
using content::BrowserThread;
|
||||
|
||||
namespace brightray {
|
||||
|
@ -219,6 +224,9 @@ void BrowserMainParts::PostMainMessageLoopStart() {
|
|||
// if X exits before us.
|
||||
ui::SetX11ErrorHandlers(BrowserX11ErrorHandler, BrowserX11IOErrorHandler);
|
||||
#endif
|
||||
#if defined(OS_LINUX)
|
||||
bluez::DBusBluezManagerWrapperLinux::Initialize();
|
||||
#endif
|
||||
}
|
||||
|
||||
void BrowserMainParts::PostMainMessageLoopRun() {
|
||||
|
@ -244,4 +252,11 @@ int BrowserMainParts::PreCreateThreads() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void BrowserMainParts::PostDestroyThreads() {
|
||||
#if defined(OS_LINUX)
|
||||
device::BluetoothAdapterFactory::Shutdown();
|
||||
bluez::DBusBluezManagerWrapperLinux::Shutdown();
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace brightray
|
||||
|
|
|
@ -45,6 +45,7 @@ class BrowserMainParts : public content::BrowserMainParts {
|
|||
void PostMainMessageLoopStart() override;
|
||||
void PostMainMessageLoopRun() override;
|
||||
int PreCreateThreads() override;
|
||||
void PostDestroyThreads() override;
|
||||
|
||||
private:
|
||||
#if defined(OS_MACOSX)
|
||||
|
|
Loading…
Add table
Reference in a new issue