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

Side by Side Diff: chrome/browser/extensions/api/braille_display_private/braille_display_private_api.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 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
OLDNEW
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 <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 scoped_observer_(this), 47 scoped_observer_(this),
48 event_delegate_(new DefaultEventDelegate(this, profile_)) {} 48 event_delegate_(new DefaultEventDelegate(this, profile_)) {}
49 49
50 BrailleDisplayPrivateAPI::~BrailleDisplayPrivateAPI() { 50 BrailleDisplayPrivateAPI::~BrailleDisplayPrivateAPI() {
51 } 51 }
52 52
53 void BrailleDisplayPrivateAPI::Shutdown() { 53 void BrailleDisplayPrivateAPI::Shutdown() {
54 } 54 }
55 55
56 static base::LazyInstance< 56 static base::LazyInstance<
57 BrowserContextKeyedAPIFactory<BrailleDisplayPrivateAPI> > g_factory = 57 BrowserContextKeyedAPIFactory<BrailleDisplayPrivateAPI>>::DestructorAtExit
58 LAZY_INSTANCE_INITIALIZER; 58 g_factory = LAZY_INSTANCE_INITIALIZER;
59 59
60 // static 60 // static
61 BrowserContextKeyedAPIFactory<BrailleDisplayPrivateAPI>* 61 BrowserContextKeyedAPIFactory<BrailleDisplayPrivateAPI>*
62 BrailleDisplayPrivateAPI::GetFactoryInstance() { 62 BrailleDisplayPrivateAPI::GetFactoryInstance() {
63 return g_factory.Pointer(); 63 return g_factory.Pointer();
64 } 64 }
65 65
66 void BrailleDisplayPrivateAPI::OnBrailleDisplayStateChanged( 66 void BrailleDisplayPrivateAPI::OnBrailleDisplayStateChanged(
67 const DisplayState& display_state) { 67 const DisplayState& display_state) {
68 std::unique_ptr<Event> event( 68 std::unique_ptr<Event> event(
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 void BrailleDisplayPrivateWriteDotsFunction::Work() { 178 void BrailleDisplayPrivateWriteDotsFunction::Work() {
179 BrailleController::GetInstance()->WriteDots(params_->cells, params_->columns, 179 BrailleController::GetInstance()->WriteDots(params_->cells, params_->columns,
180 params_->rows); 180 params_->rows);
181 } 181 }
182 182
183 bool BrailleDisplayPrivateWriteDotsFunction::Respond() { 183 bool BrailleDisplayPrivateWriteDotsFunction::Respond() {
184 return true; 184 return true;
185 } 185 }
186 } // namespace api 186 } // namespace api
187 } // namespace extensions 187 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/bookmarks/bookmarks_api.cc ('k') | chrome/browser/extensions/api/commands/command_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698