Home | History | Annotate | Download | only in braille_display_private
      1 // Copyright 2014 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.
      4 
      5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_MOCK_BRAILLE_CONTROLLER_H_
      6 #define CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_MOCK_BRAILLE_CONTROLLER_H_
      7 
      8 #include "chrome/browser/extensions/api/braille_display_private/stub_braille_controller.h"
      9 
     10 namespace extensions {
     11 namespace api {
     12 namespace braille_display_private {
     13 
     14 // Mock implementation of the BrailleController interface.
     15 class MockBrailleController : public StubBrailleController {
     16  public:
     17   MockBrailleController();
     18 
     19   virtual scoped_ptr<DisplayState> GetDisplayState() OVERRIDE;
     20   virtual void AddObserver(BrailleObserver* observer) OVERRIDE;
     21   virtual void RemoveObserver(BrailleObserver* observer) OVERRIDE;
     22 
     23   // Sets the available flag without calling the observer.
     24   void SetAvailable(bool available);
     25   BrailleObserver* GetObserver() const;
     26 
     27  private:
     28   bool available_;
     29   BrailleObserver* observer_;
     30 };
     31 
     32 }  // namespace braille_display_private
     33 }  // namespace api
     34 }  // namespace extensions
     35 
     36 #endif  // CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_MOCK_BRAILLE_CONTROLLER_H_
     37