OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 #import "chrome/browser/ui/cocoa/translate/translate_infobar_base.h" | 6 #import "chrome/browser/ui/cocoa/translate/translate_infobar_base.h" |
7 | 7 |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 if (checked) | 102 if (checked) |
103 [item setState:NSOnState]; | 103 [item setState:NSOnState]; |
104 if (!enabled) | 104 if (!enabled) |
105 [item setEnabled:NO]; | 105 [item setEnabled:NO]; |
106 } | 106 } |
107 } | 107 } |
108 | 108 |
109 } // namespace TranslateInfoBarUtilities | 109 } // namespace TranslateInfoBarUtilities |
110 | 110 |
111 // TranslateInfoBarDelegate views specific method: | 111 // TranslateInfoBarDelegate views specific method: |
112 InfoBar* TranslateInfoBarDelegate::CreateInfoBar() { | 112 InfoBar* TranslateInfoBarDelegate::CreateInfoBar(TabContentsWrapper* owner) { |
113 TranslateInfoBarControllerBase* infobar_controller = NULL; | 113 TranslateInfoBarControllerBase* infobar_controller = NULL; |
114 switch (type_) { | 114 switch (type_) { |
115 case BEFORE_TRANSLATE: | 115 case BEFORE_TRANSLATE: |
116 infobar_controller = | 116 infobar_controller = |
117 [[BeforeTranslateInfobarController alloc] initWithDelegate:this]; | 117 [[BeforeTranslateInfobarController alloc] initWithDelegate:this]; |
118 break; | 118 break; |
119 case AFTER_TRANSLATE: | 119 case AFTER_TRANSLATE: |
120 infobar_controller = | 120 infobar_controller = |
121 [[AfterTranslateInfobarController alloc] initWithDelegate:this]; | 121 [[AfterTranslateInfobarController alloc] initWithDelegate:this]; |
122 break; | 122 break; |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 return false; | 646 return false; |
647 } | 647 } |
648 previousControl = control; | 648 previousControl = control; |
649 } | 649 } |
650 | 650 |
651 return true; | 651 return true; |
652 } | 652 } |
653 | 653 |
654 @end // TranslateInfoBarControllerBase (TestingAPI) | 654 @end // TranslateInfoBarControllerBase (TestingAPI) |
655 | 655 |
OLD | NEW |