diff options
Diffstat (limited to 'chrome/browser/renderer_host/translation_service.h')
-rw-r--r-- | chrome/browser/renderer_host/translation_service.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/translation_service.h b/chrome/browser/renderer_host/translation_service.h new file mode 100644 index 0000000..a8e8429 --- /dev/null +++ b/chrome/browser/renderer_host/translation_service.h @@ -0,0 +1,36 @@ +// 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. + +#ifndef CHROME_BROWSER_RENDERER_HOST_TRANSLATION_SERVICE_H_ +#define CHROME_BROWSER_RENDERER_HOST_TRANSLATION_SERVICE_H_ + +#include <string> +#include <vector> + +#include "base/string16.h" + +class ResourceMessageFilter; + +// The TranslationService class is used to translate text. +// This temporary implementation only upcases the text sent to it. +class TranslationService { + public: + explicit TranslationService(ResourceMessageFilter* resource_msg_filter); + + // Translates the passed text chunks and sends a + // ViewMsg_TranslateTextReponse message on the renderer at |routing_id|. + void Translate(int routing_id, + int work_id, + const std::vector<string16>& text_chunks, + std::string from_language, + std::string to_language, + bool secure); + + private: + ResourceMessageFilter* resource_message_filter_; + + DISALLOW_COPY_AND_ASSIGN(TranslationService); +}; + +#endif // CHROME_BROWSER_RENDERER_HOST_TRANSLATION_SERVICE_H_ |