| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 void TranslateBubbleView::HandleLinkClicked( | 458 void TranslateBubbleView::HandleLinkClicked( |
| 459 TranslateBubbleView::LinkID sender_id) { | 459 TranslateBubbleView::LinkID sender_id) { |
| 460 switch (sender_id) { | 460 switch (sender_id) { |
| 461 case LINK_ID_ADVANCED: { | 461 case LINK_ID_ADVANCED: { |
| 462 SwitchView(TranslateBubbleModel::VIEW_STATE_ADVANCED); | 462 SwitchView(TranslateBubbleModel::VIEW_STATE_ADVANCED); |
| 463 translate::ReportUiAction(translate::ADVANCED_LINK_CLICKED); | 463 translate::ReportUiAction(translate::ADVANCED_LINK_CLICKED); |
| 464 break; | 464 break; |
| 465 } | 465 } |
| 466 case LINK_ID_LANGUAGE_SETTINGS: { | 466 case LINK_ID_LANGUAGE_SETTINGS: { |
| 467 GURL url = chrome::GetSettingsUrl(chrome::kLanguageOptionsSubPage); | 467 GURL url = chrome::GetSettingsUrl(chrome::kLanguageOptionsSubPage); |
| 468 web_contents()->OpenURL( | 468 web_contents()->OpenURL(content::OpenURLParams( |
| 469 content::OpenURLParams(url, content::Referrer(), NEW_FOREGROUND_TAB, | 469 url, content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB, |
| 470 ui::PAGE_TRANSITION_LINK, false)); | 470 ui::PAGE_TRANSITION_LINK, false)); |
| 471 translate::ReportUiAction(translate::SETTINGS_LINK_CLICKED); | 471 translate::ReportUiAction(translate::SETTINGS_LINK_CLICKED); |
| 472 break; | 472 break; |
| 473 } | 473 } |
| 474 } | 474 } |
| 475 } | 475 } |
| 476 | 476 |
| 477 void TranslateBubbleView::HandleComboboxPerformAction( | 477 void TranslateBubbleView::HandleComboboxPerformAction( |
| 478 TranslateBubbleView::ComboboxID sender_id) { | 478 TranslateBubbleView::ComboboxID sender_id) { |
| 479 switch (sender_id) { | 479 switch (sender_id) { |
| 480 case COMBOBOX_ID_DENIAL: { | 480 case COMBOBOX_ID_DENIAL: { |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 base::string16 label; | 958 base::string16 label; |
| 959 if (model_->IsPageTranslatedInCurrentLanguages()) | 959 if (model_->IsPageTranslatedInCurrentLanguages()) |
| 960 label = l10n_util::GetStringUTF16(IDS_DONE); | 960 label = l10n_util::GetStringUTF16(IDS_DONE); |
| 961 else | 961 else |
| 962 label = l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT); | 962 label = l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT); |
| 963 advanced_done_button_->SetText(label); | 963 advanced_done_button_->SetText(label); |
| 964 advanced_done_button_->SizeToPreferredSize(); | 964 advanced_done_button_->SizeToPreferredSize(); |
| 965 if (advanced_view_) | 965 if (advanced_view_) |
| 966 advanced_view_->Layout(); | 966 advanced_view_->Layout(); |
| 967 } | 967 } |
| OLD | NEW |