Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / extensions / api / braille_display_private / braille_controller_stub.cc
blobbd7b813633a2707c9104cca9ae9d446bb23db107
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
3 // found in the LICENSE file.
5 #include "chrome/browser/extensions/api/braille_display_private/braille_controller.h"
7 #include "base/memory/scoped_ptr.h"
8 #include "base/memory/singleton.h"
9 #include "chrome/common/extensions/api/braille_display_private.h"
11 namespace extensions {
12 namespace api {
13 namespace braille_display_private {
15 // Stub implementation of BrailleController for use when brlapi is not
16 // enabled.
17 class BrailleControllerImpl : public BrailleController {
18 public:
19 static BrailleControllerImpl* GetInstance();
20 scoped_ptr<DisplayState> GetDisplayState() override;
21 void WriteDots(const std::vector<char>& cells) override;
22 void AddObserver(BrailleObserver* observer) override;
23 void RemoveObserver(BrailleObserver* observer) override;
25 private:
26 BrailleControllerImpl();
27 ~BrailleControllerImpl() override;
28 friend struct DefaultSingletonTraits<BrailleControllerImpl>;
29 DISALLOW_COPY_AND_ASSIGN(BrailleControllerImpl);
32 BrailleController::BrailleController() {
35 BrailleController::~BrailleController() {
38 // static
39 BrailleController* BrailleController::GetInstance() {
40 return BrailleControllerImpl::GetInstance();
43 BrailleControllerImpl::BrailleControllerImpl() {
46 BrailleControllerImpl::~BrailleControllerImpl() {
49 // static
50 BrailleControllerImpl* BrailleControllerImpl::GetInstance() {
51 return Singleton<BrailleControllerImpl,
52 LeakySingletonTraits<BrailleControllerImpl> >::get();
55 scoped_ptr<DisplayState> BrailleControllerImpl::GetDisplayState() {
56 return scoped_ptr<DisplayState>(new DisplayState()).Pass();
59 void BrailleControllerImpl::WriteDots(const std::vector<char>& cells) {
62 void BrailleControllerImpl::AddObserver(BrailleObserver* observer) {
65 void BrailleControllerImpl::RemoveObserver(BrailleObserver* observer) {
68 } // namespace braille_display_private
69 } // namespace api
70 } // namespace extensions