| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_EXTENSION_FUNCTION_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_EXTENSION_FUNCTION_H_ | 
| 6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_EXTENSION_FUNCTION_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_EXTENSION_FUNCTION_H_ | 
| 7 | 7 | 
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" | 
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" | 
| 10 #include "chrome/browser/extensions/extension_function.h" | 10 #include "chrome/browser/extensions/extension_function.h" | 
| (...skipping 21 matching lines...) Expand all  Loading... | 
| 32   // ExtensionFunction: | 32   // ExtensionFunction: | 
| 33   virtual bool RunImpl() OVERRIDE; | 33   virtual bool RunImpl() OVERRIDE; | 
| 34 | 34 | 
| 35  private: | 35  private: | 
| 36   void RunOnAdapterReady(scoped_refptr<device::BluetoothAdapter> adapter); | 36   void RunOnAdapterReady(scoped_refptr<device::BluetoothAdapter> adapter); | 
| 37 | 37 | 
| 38   // Implemented by individual bluetooth extension functions, called | 38   // Implemented by individual bluetooth extension functions, called | 
| 39   // automatically once |adapter| has been initialized. | 39   // automatically once |adapter| has been initialized. | 
| 40   virtual bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) = 0; | 40   virtual bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) = 0; | 
| 41 | 41 | 
| 42   base::WeakPtrFactory<BluetoothExtensionFunction> weak_ptr_factory_; |  | 
| 43 |  | 
| 44   DISALLOW_COPY_AND_ASSIGN(BluetoothExtensionFunction); | 42   DISALLOW_COPY_AND_ASSIGN(BluetoothExtensionFunction); | 
| 45 }; | 43 }; | 
| 46 | 44 | 
| 47 }  // namespace api | 45 }  // namespace api | 
| 48 | 46 | 
| 49 }  // namespace extensions | 47 }  // namespace extensions | 
| 50 | 48 | 
| 51 #endif  // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_EXTENSION_FUNCTION_
    H_ | 49 #endif  // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_EXTENSION_FUNCTION_
    H_ | 
| OLD | NEW | 
|---|