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

Side by Side Diff: chrome/browser/chromeos/extensions/bluetooth_event_router.h

Issue 9822001: Basic infrastructure for the Bluetooth API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more review comments Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_BLUETOOTH_EVENT_ROUTER_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_BLUETOOTH_EVENT_ROUTER_H_
7 #pragma once
8
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h"
11 #include "chrome/browser/profiles/profile.h"
12
13 namespace chromeos {
14
15 class ExtensionBluetoothEventRouter
16 : public chromeos::BluetoothAdapter::Observer {
17 public:
18 explicit ExtensionBluetoothEventRouter(Profile* profile);
19 virtual ~ExtensionBluetoothEventRouter();
20
21 const chromeos::BluetoothAdapter* adapter() const { return adapter_.get(); }
22
23 // Override from chromeos::BluetoothAdapter::Observer
24 virtual void AdapterPresentChanged(
25 chromeos::BluetoothAdapter* adapter, bool present) OVERRIDE;
26 virtual void AdapterPoweredChanged(
27 chromeos::BluetoothAdapter* adapter, bool has_power) OVERRIDE;
28 private:
29 void DispatchEvent(const char* event_name, bool value);
30
31 Profile* profile_;
32 scoped_ptr<chromeos::BluetoothAdapter> adapter_;
33 DISALLOW_COPY_AND_ASSIGN(ExtensionBluetoothEventRouter);
34 };
35
36 } // namespace chromeos
37
38 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_BLUETOOTH_EVENT_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698