diff options
Diffstat (limited to 'chrome/browser/speech/speech_input_bubble.cc')
-rw-r--r-- | chrome/browser/speech/speech_input_bubble.cc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/chrome/browser/speech/speech_input_bubble.cc b/chrome/browser/speech/speech_input_bubble.cc new file mode 100644 index 0000000..8df9d7d --- /dev/null +++ b/chrome/browser/speech/speech_input_bubble.cc @@ -0,0 +1,27 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/tab_contents/tab_contents.h" +#include "chrome/browser/speech/speech_input_bubble.h" +#include "gfx/rect.h" + +SpeechInputBubble::FactoryMethod SpeechInputBubble::factory_ = NULL; + +SpeechInputBubble* SpeechInputBubble::Create(TabContents* tab_contents, + Delegate* delegate, + const gfx::Rect& element_rect) { + if (factory_) + return (*factory_)(tab_contents, delegate, element_rect); + + // Has the tab already closed before bubble create request was processed? + if (!tab_contents) + return NULL; + +#if defined(OS_WIN) + return CreateNativeBubble(tab_contents, delegate, element_rect); +#else + // TODO(satish): Remove once the Mac and Linux implementations are ready. + return NULL; +#endif +} |