blob: 4e2a6704aa06b2c049cab4e49bd1f3968939c837 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// 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;
const int SpeechInputBubble::kBubbleTargetOffsetX = 5;
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;
return CreateNativeBubble(tab_contents, delegate, element_rect);
}
|