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

Side by Side Diff: chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc

Issue 8400077: chromeos: Rename functions to be PascalCase. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h" 5 #include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/observer_list.h" 8 #include "base/observer_list.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chromeos/bluetooth/bluetooth_device.h" 10 #include "chrome/browser/chromeos/bluetooth/bluetooth_device.h"
11 #include "chrome/browser/chromeos/dbus/bluetooth_adapter_client.h" 11 #include "chrome/browser/chromeos/dbus/bluetooth_adapter_client.h"
12 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" 12 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 class BluetoothAdapterImpl : public BluetoothAdapter, 16 class BluetoothAdapterImpl : public BluetoothAdapter,
17 public BluetoothAdapterClient::Observer { 17 public BluetoothAdapterClient::Observer {
18 public: 18 public:
19 explicit BluetoothAdapterImpl(const std::string& id) : id_(id) { 19 explicit BluetoothAdapterImpl(const std::string& id) : id_(id) {
20 DBusThreadManager* dbus_thread_manager = DBusThreadManager::Get(); 20 DBusThreadManager* dbus_thread_manager = DBusThreadManager::Get();
21 DCHECK(dbus_thread_manager); 21 DCHECK(dbus_thread_manager);
22 bluetooth_adapter_client_ = dbus_thread_manager->bluetooth_adapter_client(); 22 bluetooth_adapter_client_ =
23 dbus_thread_manager->GetBluetoothAdapterClient();
23 DCHECK(bluetooth_adapter_client_); 24 DCHECK(bluetooth_adapter_client_);
24 bluetooth_adapter_client_->AddObserver(this, id_); 25 bluetooth_adapter_client_->AddObserver(this, id_);
25 } 26 }
26 27
27 virtual ~BluetoothAdapterImpl() { 28 virtual ~BluetoothAdapterImpl() {
28 DCHECK(bluetooth_adapter_client_); 29 DCHECK(bluetooth_adapter_client_);
29 bluetooth_adapter_client_->RemoveObserver(this, id_); 30 bluetooth_adapter_client_->RemoveObserver(this, id_);
30 } 31 }
31 32
32 virtual void AddObserver(BluetoothAdapter::Observer* observer) { 33 virtual void AddObserver(BluetoothAdapter::Observer* observer) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 125
125 BluetoothAdapter::~BluetoothAdapter() { 126 BluetoothAdapter::~BluetoothAdapter() {
126 } 127 }
127 128
128 // static 129 // static
129 BluetoothAdapter* BluetoothAdapter::Create(const std::string& id) { 130 BluetoothAdapter* BluetoothAdapter::Create(const std::string& id) {
130 return new BluetoothAdapterImpl(id); 131 return new BluetoothAdapterImpl(id);
131 } 132 }
132 133
133 } // namespace chromeos 134 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/accessibility_util.cc ('k') | chrome/browser/chromeos/bluetooth/bluetooth_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698