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

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

Issue 26775007: Translate: Add TranslateBubbleView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (rebasing) 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_model_impl.h
diff --git a/chrome/browser/ui/translate/translate_bubble_model_impl.h b/chrome/browser/ui/translate/translate_bubble_model_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..94c78ad73b33fb8d43bb2831ba574fe7d4677acb
--- /dev/null
+++ b/chrome/browser/ui/translate/translate_bubble_model_impl.h
@@ -0,0 +1,48 @@
+// 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_MODEL_IMPL_H_
+#define CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_MODEL_IMPL_H_
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/ui/translate/translate_bubble_model.h"
+#include "chrome/browser/ui/translate/translate_bubble_view_state_transition.h"
+
+class TranslateUIDelegate;
+
+// The standard implementation of TranslateBubbleModel.
+class TranslateBubbleModelImpl : public TranslateBubbleModel {
+ public:
+ TranslateBubbleModelImpl(TranslateBubbleModel::ViewState view_type,
+ scoped_ptr<TranslateUIDelegate> ui_delegate);
+ virtual ~TranslateBubbleModelImpl();
+
+ // TranslateBubbleModel methods.
+ virtual TranslateBubbleModel::ViewState GetViewState() const OVERRIDE;
+ virtual void SetViewState(TranslateBubbleModel::ViewState view_state)
+ OVERRIDE;
+ virtual void GoBackFromAdvanced() OVERRIDE;
+ virtual int GetNumberOfLanguages() const OVERRIDE;
+ virtual string16 GetLanguageNameAt(int index) const OVERRIDE;
+ virtual int GetOriginalLanguageIndex() const OVERRIDE;
+ virtual void SetOriginalLanguageIndex(int index) OVERRIDE;
+ virtual int GetTargetLanguageIndex() const OVERRIDE;
+ virtual void SetTargetLanguageIndex(int index) OVERRIDE;
+ virtual void SetNeverTranslateLanguage(bool value) OVERRIDE;
+ virtual void SetNeverTranslateSite(bool value) OVERRIDE;
+ virtual bool ShouldAlwaysTranslate() const OVERRIDE;
+ virtual void SetAlwaysTranslate(bool value) OVERRIDE;
+ virtual void Translate() OVERRIDE;
+ virtual void RevertTranslation() OVERRIDE;
+ virtual void TranslationDeclined() OVERRIDE;
+
+ private:
+ scoped_ptr<TranslateUIDelegate> ui_delegate_;
+ TranslateBubbleViewStateTransition view_state_transition_;
+
+ DISALLOW_COPY_AND_ASSIGN(TranslateBubbleModelImpl);
+};
+
+#endif // CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_MODEL_IMPL_H_
« no previous file with comments | « chrome/browser/ui/translate/translate_bubble_model.h ('k') | chrome/browser/ui/translate/translate_bubble_model_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698