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

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

Issue 213233003: Show a notification when a braille display is connected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Remove LOGs Created 6 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
(Empty)
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 #include "chrome/browser/extensions/api/braille_display_private/mock_braille_con troller.h"
6
7 namespace extensions {
8 namespace api {
9 namespace braille_display_private {
10
11 MockBrailleController::MockBrailleController()
12 : available_(false), observer_(NULL) {}
13
14 scoped_ptr<DisplayState> MockBrailleController::GetDisplayState() {
15 scoped_ptr<DisplayState> state(new DisplayState());
16 state->available = available_;
17 if (available_)
18 state->text_cell_count.reset(new int(18));
19 return state.Pass();
20 }
21
22 void MockBrailleController::AddObserver(BrailleObserver* observer) {
23 CHECK(observer_ == NULL);
24 observer_ = observer;
25 }
26
27 void MockBrailleController::RemoveObserver(BrailleObserver* observer) {
28 CHECK(observer == observer_);
29 observer_ = NULL;
30 }
31
32 void MockBrailleController::SetAvailable(bool available) {
33 available_ = available;
34 }
35
36 BrailleObserver* MockBrailleController::GetObserver() { return observer_; }
oshima 2014/03/26 19:42:54 nit: move the body to next line.
37
38 } // namespace braille_display_private
39 } // namespace api
40 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698