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

Side by Side Diff: chrome/browser/ui/translate/translate_bubble_model_impl.cc

Issue 26775007: Translate: Add TranslateBubbleView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move implementation of the view type transitions to TranslateBubbleModel 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 unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #include "chrome/browser/ui/translate/translate_bubble_model_impl.h"
6
7 #include "chrome/browser/translate/translate_ui_delegate.h"
8
9 TranslateBubbleModelImpl::TranslateBubbleModelImpl(
10 TranslateBubbleModel::ViewType view_type,
11 scoped_ptr<TranslateUIDelegate> ui_delegate)
12 : TranslateBubbleModel(view_type),
13 ui_delegate_(ui_delegate.Pass()) {
14 }
15
16 TranslateBubbleModelImpl::~TranslateBubbleModelImpl() {
17 }
18
19 int TranslateBubbleModelImpl::GetNumberOfLanguages() const {
20 return ui_delegate_->GetNumberOfLanguages();
21 }
22
23 string16 TranslateBubbleModelImpl::GetLanguageNameAt(int index) const {
24 return ui_delegate_->GetLanguageNameAt(index);
25 }
26
27 int TranslateBubbleModelImpl::GetOriginalLanguageIndex() const {
28 return ui_delegate_->GetOriginalLanguageIndex();
29 }
30
31 void TranslateBubbleModelImpl::SetOriginalLanguageIndex(int index) {
32 ui_delegate_->SetOriginalLanguageIndex(index);
33 }
34
35 int TranslateBubbleModelImpl::GetTargetLanguageIndex() const {
36 return ui_delegate_->GetTargetLanguageIndex();
37 }
38
39 void TranslateBubbleModelImpl::SetTargetLanguageIndex(int index) {
40 ui_delegate_->SetTargetLanguageIndex(index);
41 }
42
43 void TranslateBubbleModelImpl::SetLanguageBlocked(bool value) {
44 ui_delegate_->SetLanguageBlocked(value);
45 }
46
47 void TranslateBubbleModelImpl::SetSiteBlacklist(bool value) {
48 ui_delegate_->SetSiteBlacklist(value);
49 }
50
51 bool TranslateBubbleModelImpl::ShouldAlwaysTranslate() const {
52 return ui_delegate_->ShouldAlwaysTranslate();
53 }
54
55 void TranslateBubbleModelImpl::SetAlwaysTranslate(bool value) {
56 ui_delegate_->SetAlwaysTranslate(value);
57 }
58
59 void TranslateBubbleModelImpl::Translate() {
60 ui_delegate_->Translate();
61 }
62
63 void TranslateBubbleModelImpl::RevertTranslation() {
64 ui_delegate_->RevertTranslation();
65 }
66
67 void TranslateBubbleModelImpl::TranslationDeclined() {
68 ui_delegate_->TranslationDeclined();
69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698