OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/extensions/api/braille_display_private/braille_display_
private_api.h" | 5 #include "chrome/browser/extensions/api/braille_display_private/braille_display_
private_api.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "chrome/browser/extensions/api/braille_display_private/braille_controll
er.h" | 8 #include "chrome/browser/extensions/api/braille_display_private/braille_controll
er.h" |
9 #include "chrome/browser/extensions/extension_system.h" | 9 #include "chrome/browser/extensions/extension_system.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 void BrailleDisplayPrivateAPI::Shutdown() { | 50 void BrailleDisplayPrivateAPI::Shutdown() { |
51 } | 51 } |
52 | 52 |
53 static base::LazyInstance<ProfileKeyedAPIFactory<BrailleDisplayPrivateAPI> > | 53 static base::LazyInstance<ProfileKeyedAPIFactory<BrailleDisplayPrivateAPI> > |
54 g_factory = LAZY_INSTANCE_INITIALIZER; | 54 g_factory = LAZY_INSTANCE_INITIALIZER; |
55 | 55 |
56 // static | 56 // static |
57 ProfileKeyedAPIFactory<BrailleDisplayPrivateAPI>* | 57 ProfileKeyedAPIFactory<BrailleDisplayPrivateAPI>* |
58 BrailleDisplayPrivateAPI::GetFactoryInstance() { | 58 BrailleDisplayPrivateAPI::GetFactoryInstance() { |
59 return &g_factory.Get(); | 59 return g_factory.Pointer(); |
60 } | 60 } |
61 | 61 |
62 void BrailleDisplayPrivateAPI::OnDisplayStateChanged( | 62 void BrailleDisplayPrivateAPI::OnDisplayStateChanged( |
63 const DisplayState& display_state) { | 63 const DisplayState& display_state) { |
64 scoped_ptr<Event> event(new Event( | 64 scoped_ptr<Event> event(new Event( |
65 OnDisplayStateChanged::kEventName, | 65 OnDisplayStateChanged::kEventName, |
66 OnDisplayStateChanged::Create(display_state))); | 66 OnDisplayStateChanged::Create(display_state))); |
67 event_delegate_->BroadcastEvent(event.Pass()); | 67 event_delegate_->BroadcastEvent(event.Pass()); |
68 } | 68 } |
69 | 69 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 170 |
171 void BrailleDisplayPrivateWriteDotsFunction::Work() { | 171 void BrailleDisplayPrivateWriteDotsFunction::Work() { |
172 BrailleController::GetInstance()->WriteDots(params_->cells); | 172 BrailleController::GetInstance()->WriteDots(params_->cells); |
173 } | 173 } |
174 | 174 |
175 bool BrailleDisplayPrivateWriteDotsFunction::Respond() { | 175 bool BrailleDisplayPrivateWriteDotsFunction::Respond() { |
176 return true; | 176 return true; |
177 } | 177 } |
178 } // namespace api | 178 } // namespace api |
179 } // namespace extensions | 179 } // namespace extensions |
OLD | NEW |