1 // Copyright 2013 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_UI_TRANSLATE_TRANSLATE_BUBBLE_FACTORY_H_
6 #define CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_FACTORY_H_
8 #include "chrome/browser/ui/translate/translate_bubble_model.h"
16 // Factory to show the Translate bubble.
17 class TranslateBubbleFactory {
19 virtual ~TranslateBubbleFactory();
21 // Shows the translate bubble. The behavior depends on the current factory's
23 static void Show(BrowserWindow* window,
24 content::WebContents* web_contents,
25 TranslateBubbleModel::ViewState view_state);
27 // Sets the factory to change the behavior how to show the bubble.
28 // TranslateBubbleFactory doesn't take the ownership of |factory|.
29 static void SetFactory(TranslateBubbleFactory* factory);
32 // Shows the translate bubble.
33 virtual void ShowImplementation(
34 BrowserWindow* window,
35 content::WebContents* web_contents,
36 TranslateBubbleModel::ViewState view_state) = 0;
39 static TranslateBubbleFactory* current_factory_;
42 #endif // CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_FACTORY_H_