| 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_controll
er.h" | 5 #include "chrome/browser/extensions/api/braille_display_private/braille_controll
er.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "chrome/common/extensions/api/braille_display_private.h" | 9 #include "chrome/common/extensions/api/braille_display_private.h" |
| 10 | 10 |
| 11 namespace extensions { | 11 namespace extensions { |
| 12 namespace api { | 12 namespace api { |
| 13 namespace braille_display_private { | 13 namespace braille_display_private { |
| 14 | 14 |
| 15 // Stub implementation of BrailleController for use when brlapi is not | 15 // Stub implementation of BrailleController for use when brlapi is not |
| 16 // enabled. | 16 // enabled. |
| 17 class BrailleControllerImpl : public BrailleController { | 17 class BrailleControllerImpl : public BrailleController { |
| 18 public: | 18 public: |
| 19 static BrailleControllerImpl* GetInstance(); | 19 static BrailleControllerImpl* GetInstance(); |
| 20 virtual scoped_ptr<DisplayState> GetDisplayState() override; | 20 scoped_ptr<DisplayState> GetDisplayState() override; |
| 21 virtual void WriteDots(const std::string& cells) override; | 21 void WriteDots(const std::string& cells) override; |
| 22 virtual void AddObserver(BrailleObserver* observer) override; | 22 void AddObserver(BrailleObserver* observer) override; |
| 23 virtual void RemoveObserver(BrailleObserver* observer) override; | 23 void RemoveObserver(BrailleObserver* observer) override; |
| 24 | 24 |
| 25 private: | 25 private: |
| 26 BrailleControllerImpl(); | 26 BrailleControllerImpl(); |
| 27 virtual ~BrailleControllerImpl(); | 27 ~BrailleControllerImpl() override; |
| 28 friend struct DefaultSingletonTraits<BrailleControllerImpl>; | 28 friend struct DefaultSingletonTraits<BrailleControllerImpl>; |
| 29 DISALLOW_COPY_AND_ASSIGN(BrailleControllerImpl); | 29 DISALLOW_COPY_AND_ASSIGN(BrailleControllerImpl); |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 BrailleController::BrailleController() { | 32 BrailleController::BrailleController() { |
| 33 } | 33 } |
| 34 | 34 |
| 35 BrailleController::~BrailleController() { | 35 BrailleController::~BrailleController() { |
| 36 } | 36 } |
| 37 | 37 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 61 | 61 |
| 62 void BrailleControllerImpl::AddObserver(BrailleObserver* observer) { | 62 void BrailleControllerImpl::AddObserver(BrailleObserver* observer) { |
| 63 } | 63 } |
| 64 | 64 |
| 65 void BrailleControllerImpl::RemoveObserver(BrailleObserver* observer) { | 65 void BrailleControllerImpl::RemoveObserver(BrailleObserver* observer) { |
| 66 } | 66 } |
| 67 | 67 |
| 68 } // namespace braille_display_private | 68 } // namespace braille_display_private |
| 69 } // namespace api | 69 } // namespace api |
| 70 } // namespace extensions | 70 } // namespace extensions |
| OLD | NEW |