Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / extensions / api / braille_display_private / mock_braille_controller.h
blob9ce52bc9967715e57e5532add563b9eb4971bb5e
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.
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_
8 #include "chrome/browser/extensions/api/braille_display_private/stub_braille_controller.h"
10 namespace extensions {
11 namespace api {
12 namespace braille_display_private {
14 // Mock implementation of the BrailleController interface.
15 class MockBrailleController : public StubBrailleController {
16 public:
17 MockBrailleController();
19 scoped_ptr<DisplayState> GetDisplayState() override;
20 void AddObserver(BrailleObserver* observer) override;
21 void RemoveObserver(BrailleObserver* observer) override;
23 // Sets the available flag without calling the observer.
24 void SetAvailable(bool available);
25 BrailleObserver* GetObserver() const;
27 private:
28 bool available_;
29 BrailleObserver* observer_;
32 } // namespace braille_display_private
33 } // namespace api
34 } // namespace extensions
36 #endif // CHROME_BROWSER_EXTENSIONS_API_BRAILLE_DISPLAY_PRIVATE_MOCK_BRAILLE_CONTROLLER_H_