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

Unified Diff: chrome/browser/cocoa/translate/translate_infobar_base.mm

Issue 3034013: Fetch the translate script regularly (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Synced Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/cocoa/translate/translate_infobar_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/translate/translate_infobar_base.mm
diff --git a/chrome/browser/cocoa/translate/translate_infobar_base.mm b/chrome/browser/cocoa/translate/translate_infobar_base.mm
index 108ce7420c96dd4e279a5b79c6a991e535c0bb9a..e267074d3094ae3816b92a8ed1f99966596d6267 100644
--- a/chrome/browser/cocoa/translate/translate_infobar_base.mm
+++ b/chrome/browser/cocoa/translate/translate_infobar_base.mm
@@ -102,16 +102,16 @@ void AddMenuItem(NSMenu *menu, id target, SEL selector, NSString* title,
InfoBar* TranslateInfoBarDelegate::CreateInfoBar() {
TranslateInfoBarControllerBase* infobar_controller = NULL;
switch (type_) {
- case kBeforeTranslate:
+ case BEFORE_TRANSLATE:
infobar_controller =
[[BeforeTranslateInfobarController alloc] initWithDelegate:this];
break;
- case kAfterTranslate:
+ case AFTER_TRANSLATE:
infobar_controller =
[[AfterTranslateInfobarController alloc] initWithDelegate:this];
break;
- case kTranslating:
- case kTranslationError:
+ case TRANSLATING:
+ case TRANSLATION_ERROR:
infobar_controller =
[[TranslateMessageInfobarController alloc] initWithDelegate:this];
break;
@@ -471,7 +471,7 @@ InfoBar* TranslateInfoBarDelegate::CreateInfoBar() {
[self rebuildOptionsMenu:NO];
[[optionsPopUp_ cell] setArrowPosition:NSPopUpArrowAtBottom];
[optionsPopUp_ sizeToFit];
-
+
MoveControl(closeButton_, optionsPopUp_, spaceBetweenControls_, false);
if (!VerifyControlOrderAndSpacing(lastView, optionsPopUp_)) {
[self rebuildOptionsMenu:YES];
@@ -490,8 +490,8 @@ InfoBar* TranslateInfoBarDelegate::CreateInfoBar() {
- (IBAction)ok:(id)sender {
TranslateInfoBarDelegate* delegate = [self delegate];
TranslateInfoBarDelegate::Type state = delegate->type();
- DCHECK(state == TranslateInfoBarDelegate::kBeforeTranslate ||
- state == TranslateInfoBarDelegate::kTranslationError);
+ DCHECK(state == TranslateInfoBarDelegate::BEFORE_TRANSLATE ||
+ state == TranslateInfoBarDelegate::TRANSLATION_ERROR);
delegate->Translate();
UMA_HISTOGRAM_COUNTS("Translate.Translate", 1);
}
@@ -499,7 +499,7 @@ InfoBar* TranslateInfoBarDelegate::CreateInfoBar() {
// Called when someone clicks on the "Nope" button.
- (IBAction)cancel:(id)sender {
DCHECK(
- [self delegate]->type() == TranslateInfoBarDelegate::kBeforeTranslate);
+ [self delegate]->type() == TranslateInfoBarDelegate::BEFORE_TRANSLATE);
[self delegate]->TranslationDeclined();
UMA_HISTOGRAM_COUNTS("Translate.DeclineTranslate", 1);
[super dismiss:nil];
« no previous file with comments | « no previous file | chrome/browser/cocoa/translate/translate_infobar_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698