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

Side by Side Diff: chrome/browser/ui/cocoa/infobars/before_translate_infobar_controller.mm

Issue 10830353: Introduce InfoBarTabService API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments, merge to LKGR Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/cocoa/infobars/before_translate_infobar_controller.h " 5 #include "chrome/browser/ui/cocoa/infobars/before_translate_infobar_controller.h "
6 6
7 #include "base/sys_string_conversions.h" 7 #include "base/sys_string_conversions.h"
8 #import "chrome/browser/ui/cocoa/infobars/infobar_utilities.h" 8 #import "chrome/browser/ui/cocoa/infobars/infobar_utilities.h"
9 #include "grit/generated_resources.h" 9 #include "grit/generated_resources.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
(...skipping 20 matching lines...) Expand all
31 31
32 @implementation BeforeTranslateInfobarController 32 @implementation BeforeTranslateInfobarController
33 33
34 - (void)dealloc { 34 - (void)dealloc {
35 [neverTranslateButton_ setTarget:nil]; 35 [neverTranslateButton_ setTarget:nil];
36 [alwaysTranslateButton_ setTarget:nil]; 36 [alwaysTranslateButton_ setTarget:nil];
37 [super dealloc]; 37 [super dealloc];
38 } 38 }
39 39
40 - (id)initWithDelegate:(InfoBarDelegate*)delegate 40 - (id)initWithDelegate:(InfoBarDelegate*)delegate
41 owner:(InfoBarTabHelper*)owner { 41 owner:(InfoBarTabService*)owner {
42 if ((self = [super initWithDelegate:delegate owner:owner])) { 42 if ((self = [super initWithDelegate:delegate owner:owner])) {
43 [self initializeExtraControls]; 43 [self initializeExtraControls];
44 } 44 }
45 return self; 45 return self;
46 } 46 }
47 47
48 - (void)initializeExtraControls { 48 - (void)initializeExtraControls {
49 TranslateInfoBarDelegate* delegate = [self delegate]; 49 TranslateInfoBarDelegate* delegate = [self delegate];
50 const string16& language = delegate->GetLanguageDisplayableNameAt( 50 const string16& language = delegate->GetLanguageDisplayableNameAt(
51 delegate->original_language_index()); 51 delegate->original_language_index());
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 @implementation BeforeTranslateInfobarController (TestingAPI) 130 @implementation BeforeTranslateInfobarController (TestingAPI)
131 131
132 - (NSButton*)alwaysTranslateButton { 132 - (NSButton*)alwaysTranslateButton {
133 return alwaysTranslateButton_.get(); 133 return alwaysTranslateButton_.get();
134 } 134 }
135 - (NSButton*)neverTranslateButton { 135 - (NSButton*)neverTranslateButton {
136 return neverTranslateButton_.get(); 136 return neverTranslateButton_.get();
137 } 137 }
138 138
139 @end 139 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698