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

Side by Side Diff: chrome/browser/ui/cocoa/translate/translate_infobar_base.mm

Issue 7006010: Change InfoBar-related notifications to be sourced from a TabContentsWrapper, not a TabContents. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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) 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 [[AfterTranslateInfobarController alloc] initWithDelegate:this]; 121 [[AfterTranslateInfobarController alloc] initWithDelegate:this];
122 break; 122 break;
123 case TRANSLATING: 123 case TRANSLATING:
124 case TRANSLATION_ERROR: 124 case TRANSLATION_ERROR:
125 infobar_controller = 125 infobar_controller =
126 [[TranslateMessageInfobarController alloc] initWithDelegate:this]; 126 [[TranslateMessageInfobarController alloc] initWithDelegate:this];
127 break; 127 break;
128 default: 128 default:
129 NOTREACHED(); 129 NOTREACHED();
130 } 130 }
131 return new InfoBar(infobar_controller); 131 return new InfoBar(infobar_controller, this);
132 } 132 }
133 133
134 @implementation TranslateInfoBarControllerBase (FrameChangeObserver) 134 @implementation TranslateInfoBarControllerBase (FrameChangeObserver)
135 135
136 // Triggered when the frame changes. This will figure out what size and 136 // Triggered when the frame changes. This will figure out what size and
137 // visibility the options popup should be. 137 // visibility the options popup should be.
138 - (void)didChangeFrame:(NSNotification*)notification { 138 - (void)didChangeFrame:(NSNotification*)notification {
139 [self adjustOptionsButtonSizeAndVisibilityForView: 139 [self adjustOptionsButtonSizeAndVisibilityForView:
140 [[self visibleControls] lastObject]]; 140 [[self visibleControls] lastObject]];
141 } 141 }
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/infobars/infobar_controller.mm ('k') | chrome/browser/ui/gtk/infobars/infobar_container_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698