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

Unified Diff: chrome/browser/ui/translate/translate_bubble_factory.h

Issue 25373009: Translate: New Bubble UX (for the view toolkit) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug fix: view id on tests Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/translate/translate_bubble_factory.h
diff --git a/chrome/browser/ui/translate/translate_bubble_factory.h b/chrome/browser/ui/translate/translate_bubble_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..1c170441b9442b305edd15c62201a2fe8edd0a19
--- /dev/null
+++ b/chrome/browser/ui/translate/translate_bubble_factory.h
@@ -0,0 +1,42 @@
+// Copyright 2013 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.
+
+#ifndef CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_FACTORY_H_
+#define CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_FACTORY_H_
+
+#include "chrome/browser/ui/translate/translate_bubble_model.h"
+
+class BrowserWindow;
+
+namespace content {
+class WebContents;
+}
+
+// Factory to show the Translate bubble.
+class TranslateBubbleFactory {
+ public:
+ virtual ~TranslateBubbleFactory();
+
+ // Shows the translate bubble. The behavior depends on the current factory's
+ // implementation.
+ static void Show(BrowserWindow* window,
+ content::WebContents* web_contents,
+ TranslateBubbleModel::ViewState view_state);
+
+ // Sets the factory to change the behavior how to show the bubble.
+ // TranslateBubbleFactory doesn't take the ownership of |factory|.
+ static void SetFactory(TranslateBubbleFactory* factory);
+
+ protected:
+ // Shows the translate bubble.
+ virtual void ShowImplementation(
+ BrowserWindow* window,
+ content::WebContents* web_contents,
+ TranslateBubbleModel::ViewState view_state) = 0;
+
+ private:
+ static TranslateBubbleFactory* current_factory_;
+};
+
+#endif // CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_FACTORY_H_
« no previous file with comments | « chrome/browser/ui/translate/language_combobox_model.cc ('k') | chrome/browser/ui/translate/translate_bubble_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698