OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/views/translate/translate_bubble_view.h" | 5 #include "chrome/browser/ui/views/translate/translate_bubble_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 251 |
252 TranslateBubbleModel::ViewState TranslateBubbleView::GetViewState() const { | 252 TranslateBubbleModel::ViewState TranslateBubbleView::GetViewState() const { |
253 return model_->GetViewState(); | 253 return model_->GetViewState(); |
254 } | 254 } |
255 | 255 |
256 TranslateBubbleView::TranslateBubbleView( | 256 TranslateBubbleView::TranslateBubbleView( |
257 views::View* anchor_view, | 257 views::View* anchor_view, |
258 scoped_ptr<TranslateBubbleModel> model, | 258 scoped_ptr<TranslateBubbleModel> model, |
259 translate::TranslateErrors::Type error_type, | 259 translate::TranslateErrors::Type error_type, |
260 content::WebContents* web_contents) | 260 content::WebContents* web_contents) |
261 : BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT), | 261 : ManagedFullScreenBubbleDelegateView(anchor_view, web_contents), |
262 WebContentsObserver(web_contents), | 262 WebContentsObserver(web_contents), |
263 before_translate_view_(NULL), | 263 before_translate_view_(NULL), |
264 translating_view_(NULL), | 264 translating_view_(NULL), |
265 after_translate_view_(NULL), | 265 after_translate_view_(NULL), |
266 error_view_(NULL), | 266 error_view_(NULL), |
267 advanced_view_(NULL), | 267 advanced_view_(NULL), |
268 denial_combobox_(NULL), | 268 denial_combobox_(NULL), |
269 source_language_combobox_(NULL), | 269 source_language_combobox_(NULL), |
270 target_language_combobox_(NULL), | 270 target_language_combobox_(NULL), |
271 always_translate_checkbox_(NULL), | 271 always_translate_checkbox_(NULL), |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 model_->ShouldAlwaysTranslate()); | 761 model_->ShouldAlwaysTranslate()); |
762 } | 762 } |
763 | 763 |
764 base::string16 label; | 764 base::string16 label; |
765 if (model_->IsPageTranslatedInCurrentLanguages()) | 765 if (model_->IsPageTranslatedInCurrentLanguages()) |
766 label = l10n_util::GetStringUTF16(IDS_DONE); | 766 label = l10n_util::GetStringUTF16(IDS_DONE); |
767 else | 767 else |
768 label = l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT); | 768 label = l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT); |
769 advanced_done_button_->SetText(label); | 769 advanced_done_button_->SetText(label); |
770 } | 770 } |
OLD | NEW |