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

Side by Side Diff: chrome/browser/chromeos/cros/speech_synthesis_library.cc

Issue 7891021: Use stub impl when libcros fails to load (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase with power library changes Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/chromeos/cros/speech_synthesis_library.h" 5 #include "chrome/browser/chromeos/cros/speech_synthesis_library.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "chrome/browser/chromeos/cros/cros_library.h" 8 #include "chrome/browser/chromeos/cros/cros_library.h"
9 #include "third_party/cros/chromeos_speech_synthesis.h" 9 #include "third_party/cros/chromeos_speech_synthesis.h"
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 bool StopSpeaking() { return true; } 59 bool StopSpeaking() { return true; }
60 bool IsSpeaking() { return false; } 60 bool IsSpeaking() { return false; }
61 void InitTts(InitStatusCallback callback) {} 61 void InitTts(InitStatusCallback callback) {}
62 62
63 private: 63 private:
64 DISALLOW_COPY_AND_ASSIGN(SpeechSynthesisLibraryStubImpl); 64 DISALLOW_COPY_AND_ASSIGN(SpeechSynthesisLibraryStubImpl);
65 }; 65 };
66 66
67 // static 67 // static
68 SpeechSynthesisLibrary* SpeechSynthesisLibrary::GetImpl(bool stub) { 68 SpeechSynthesisLibrary* SpeechSynthesisLibrary::GetImpl(bool stub) {
69 SpeechSynthesisLibrary* impl;
69 if (stub) 70 if (stub)
70 return new SpeechSynthesisLibraryStubImpl(); 71 impl = new SpeechSynthesisLibraryStubImpl();
71 else 72 else
72 return new SpeechSynthesisLibraryImpl(); 73 impl = new SpeechSynthesisLibraryImpl();
74 return impl;
73 } 75 }
74 76
75 } // namespace chromeos 77 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/screen_lock_library.cc ('k') | chrome/browser/chromeos/cros/update_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698