OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "chrome/browser/ui/cocoa/translate/translate_bubble_controller.h" | 5 #import "chrome/browser/ui/cocoa/translate/translate_bubble_controller.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 translate::ReportUiAction(translate::TRY_AGAIN_BUTTON_CLICKED); | 833 translate::ReportUiAction(translate::TRY_AGAIN_BUTTON_CLICKED); |
834 } | 834 } |
835 | 835 |
836 - (IBAction)handleAdvancedLinkButtonPressed:(id)sender { | 836 - (IBAction)handleAdvancedLinkButtonPressed:(id)sender { |
837 translate::ReportUiAction(translate::ADVANCED_LINK_CLICKED); | 837 translate::ReportUiAction(translate::ADVANCED_LINK_CLICKED); |
838 [self switchView:TranslateBubbleModel::VIEW_STATE_ADVANCED]; | 838 [self switchView:TranslateBubbleModel::VIEW_STATE_ADVANCED]; |
839 } | 839 } |
840 | 840 |
841 - (IBAction)handleLanguageSettingsLinkButtonPressed:(id)sender { | 841 - (IBAction)handleLanguageSettingsLinkButtonPressed:(id)sender { |
842 GURL url = chrome::GetSettingsUrl(chrome::kLanguageOptionsSubPage); | 842 GURL url = chrome::GetSettingsUrl(chrome::kLanguageOptionsSubPage); |
843 webContents_->OpenURL( | 843 webContents_->OpenURL(content::OpenURLParams( |
844 content::OpenURLParams(url, content::Referrer(), NEW_FOREGROUND_TAB, | 844 url, content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB, |
845 ui::PAGE_TRANSITION_LINK, false)); | 845 ui::PAGE_TRANSITION_LINK, false)); |
846 translate::ReportUiAction(translate::SETTINGS_LINK_CLICKED); | 846 translate::ReportUiAction(translate::SETTINGS_LINK_CLICKED); |
847 [self close]; | 847 [self close]; |
848 } | 848 } |
849 | 849 |
850 - (IBAction)handleDenialPopUpButtonNeverTranslateLanguageSelected:(id)sender { | 850 - (IBAction)handleDenialPopUpButtonNeverTranslateLanguageSelected:(id)sender { |
851 translate::ReportUiAction(translate::NEVER_TRANSLATE_LANGUAGE_MENU_CLICKED); | 851 translate::ReportUiAction(translate::NEVER_TRANSLATE_LANGUAGE_MENU_CLICKED); |
852 model_->DeclineTranslation(); | 852 model_->DeclineTranslation(); |
853 model_->SetNeverTranslateLanguage(true); | 853 model_->SetNeverTranslateLanguage(true); |
854 [self close]; | 854 [self close]; |
855 } | 855 } |
(...skipping 23 matching lines...) Expand all Loading... |
879 // source or target language on the before translate view. | 879 // source or target language on the before translate view. |
880 - (BOOL)textView:(NSTextView*)aTextView | 880 - (BOOL)textView:(NSTextView*)aTextView |
881 clickedOnLink:(id)link | 881 clickedOnLink:(id)link |
882 atIndex:(NSUInteger)charIndex { | 882 atIndex:(NSUInteger)charIndex { |
883 translate::ReportUiAction(translate::ADVANCED_LINK_CLICKED); | 883 translate::ReportUiAction(translate::ADVANCED_LINK_CLICKED); |
884 [self switchView:TranslateBubbleModel::VIEW_STATE_ADVANCED]; | 884 [self switchView:TranslateBubbleModel::VIEW_STATE_ADVANCED]; |
885 return YES; | 885 return YES; |
886 } | 886 } |
887 | 887 |
888 @end | 888 @end |
OLD | NEW |