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

Side by Side Diff: chrome/browser/views/infobars/infobars.cc

Issue 141013: Relanding focus manager refactoring (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/views/info_bubble.cc ('k') | chrome/browser/views/shelf_item_dialog.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/views/infobars/infobars.h" 5 #include "chrome/browser/views/infobars/infobars.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "app/slide_animation.h" 10 #include "app/slide_animation.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 void InfoBar::InfoBarAdded() { 201 void InfoBar::InfoBarAdded() {
202 // The container_ pointer must be set before adding to the view hierarchy. 202 // The container_ pointer must be set before adding to the view hierarchy.
203 DCHECK(container_); 203 DCHECK(container_);
204 #if defined(OS_WIN) 204 #if defined(OS_WIN)
205 // When we're added to a view hierarchy within a widget, we create an 205 // When we're added to a view hierarchy within a widget, we create an
206 // external focus tracker to track what was focused in case we obtain 206 // external focus tracker to track what was focused in case we obtain
207 // focus so that we can restore focus when we're removed. 207 // focus so that we can restore focus when we're removed.
208 views::Widget* widget = GetWidget(); 208 views::Widget* widget = GetWidget();
209 if (widget) { 209 if (widget) {
210 focus_tracker_.reset( 210 focus_tracker_.reset(new views::ExternalFocusTracker(this,
211 new views::ExternalFocusTracker(this, 211 GetFocusManager()));
212 views::FocusManager::GetFocusManager(widget->GetNativeView())));
213 } 212 }
214 #endif 213 #endif
215 } 214 }
216 215
217 void InfoBar::InfoBarRemoved() { 216 void InfoBar::InfoBarRemoved() {
218 DestroyFocusTracker(false); 217 DestroyFocusTracker(false);
219 // NULL our container_ pointer so that if Animation::Stop results in 218 // NULL our container_ pointer so that if Animation::Stop results in
220 // AnimationEnded being called, we do not try and delete ourselves twice. 219 // AnimationEnded being called, we do not try and delete ourselves twice.
221 container_ = NULL; 220 container_ = NULL;
222 animation_->Stop(); 221 animation_->Stop();
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 484
486 InfoBar* LinkInfoBarDelegate::CreateInfoBar() { 485 InfoBar* LinkInfoBarDelegate::CreateInfoBar() {
487 return new LinkInfoBar(this); 486 return new LinkInfoBar(this);
488 } 487 }
489 488
490 // ConfirmInfoBarDelegate, InfoBarDelegate overrides: -------------------------- 489 // ConfirmInfoBarDelegate, InfoBarDelegate overrides: --------------------------
491 490
492 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar() { 491 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar() {
493 return new ConfirmInfoBar(this); 492 return new ConfirmInfoBar(this);
494 } 493 }
OLDNEW
« no previous file with comments | « chrome/browser/views/info_bubble.cc ('k') | chrome/browser/views/shelf_item_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698