| Index: chrome/browser/ui/translate/translate_bubble_model.h
|
| diff --git a/chrome/browser/ui/translate/translate_bubble_model.h b/chrome/browser/ui/translate/translate_bubble_model.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a0b8ddcfd2ccad52da261b1a4cb4b1c69e6217bc
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/translate/translate_bubble_model.h
|
| @@ -0,0 +1,66 @@
|
| +// 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_H_
|
| +#define CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_MODEL_H_
|
| +
|
| +#include <string>
|
| +
|
| +#include "base/strings/string16.h"
|
| +
|
| +class TranslateBubbleModel {
|
| + public:
|
| + enum ViewType {
|
| + BEFORE_TRANSLATE,
|
| + TRANSLATING,
|
| + AFTER_TRANSLATE,
|
| + ERROR,
|
| + ADVANCED,
|
| + };
|
| +
|
| + virtual ~TranslateBubbleModel() {}
|
| +
|
| + // Returns the number of languages supported.
|
| + virtual int GetNumberOfLanguages() const = 0;
|
| +
|
| + // Returns the displayable name for the language at |index|.
|
| + virtual string16 GetLanguageNameAt(int index) const = 0;
|
| +
|
| + // Returns the original language index.
|
| + virtual int GetOriginalLanguageIndex() const = 0;
|
| +
|
| + // Sets the original language index.
|
| + virtual void SetOriginalLanguageIndex(int index) = 0;
|
| +
|
| + // Returns the target language index.
|
| + virtual int GetTargetLanguageIndex() const = 0;
|
| +
|
| + // Sets the target language index.
|
| + virtual void SetTargetLanguageIndex(int index) = 0;
|
| +
|
| + // Sets the value if the current language is blocked.
|
| + virtual void SetLanguageBlocked(bool value) = 0;
|
| +
|
| + // Sets the value if the current webpage is blacklisted.
|
| + virtual void SetSiteBlacklist(bool value) = 0;
|
| +
|
| + // Returns true if the webpage in the current original language should be
|
| + // translated into the current target language automatically.
|
| + virtual bool ShouldAlwaysTranslate() const = 0;
|
| +
|
| + // Sets the value if the webpage in the current original language should be
|
| + // translated into the current target language automatically.
|
| + virtual void SetAlwaysTranslate(bool value) = 0;
|
| +
|
| + // Starts translating the current page.
|
| + virtual void Translate() = 0;
|
| +
|
| + // Reverts translation.
|
| + virtual void RevertTranslation() = 0;
|
| +
|
| + // Processes when the user declines translation.
|
| + virtual void TranslationDeclined() = 0;
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_MODEL_H_
|
|
|