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

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

Issue 10384068: views: Have a more accurate name for View parent_owned accessors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 7 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/views/infobars/infobar_view.h" 5 #include "chrome/browser/ui/views/infobars/infobar_view.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #endif 9 #endif
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 const int InfoBar::kDefaultBarTargetHeight = 36; 53 const int InfoBar::kDefaultBarTargetHeight = 36;
54 54
55 const int InfoBarView::kButtonButtonSpacing = 10; 55 const int InfoBarView::kButtonButtonSpacing = 10;
56 const int InfoBarView::kEndOfLabelSpacing = 16; 56 const int InfoBarView::kEndOfLabelSpacing = 16;
57 const int InfoBarView::kHorizontalPadding = 6; 57 const int InfoBarView::kHorizontalPadding = 6;
58 58
59 InfoBarView::InfoBarView(InfoBarTabHelper* owner, InfoBarDelegate* delegate) 59 InfoBarView::InfoBarView(InfoBarTabHelper* owner, InfoBarDelegate* delegate)
60 : InfoBar(owner, delegate), 60 : InfoBar(owner, delegate),
61 icon_(NULL), 61 icon_(NULL),
62 close_button_(NULL) { 62 close_button_(NULL) {
63 set_parent_owned(false); // InfoBar deletes itself at the appropriate time. 63 set_owned_by_client(); // InfoBar deletes itself at the appropriate time.
64 set_background(new InfoBarBackground(delegate->GetInfoBarType())); 64 set_background(new InfoBarBackground(delegate->GetInfoBarType()));
65 } 65 }
66 66
67 InfoBarView::~InfoBarView() { 67 InfoBarView::~InfoBarView() {
68 // We should have closed any open menus in PlatformSpecificHide(), then 68 // We should have closed any open menus in PlatformSpecificHide(), then
69 // subclasses' RunMenu() functions should have prevented opening any new ones 69 // subclasses' RunMenu() functions should have prevented opening any new ones
70 // once we became unowned. 70 // once we became unowned.
71 DCHECK(!menu_runner_.get()); 71 DCHECK(!menu_runner_.get());
72 } 72 }
73 73
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 // infobar. 375 // infobar.
376 if (focused_before && focused_now && !Contains(focused_before) && 376 if (focused_before && focused_now && !Contains(focused_before) &&
377 Contains(focused_now) && GetWidget()) { 377 Contains(focused_now) && GetWidget()) {
378 GetWidget()->NotifyAccessibilityEvent( 378 GetWidget()->NotifyAccessibilityEvent(
379 this, ui::AccessibilityTypes::EVENT_ALERT, true); 379 this, ui::AccessibilityTypes::EVENT_ALERT, true);
380 } 380 }
381 } 381 }
382 382
383 void InfoBarView::OnDidChangeFocus(View* focused_before, View* focused_now) { 383 void InfoBarView::OnDidChangeFocus(View* focused_before, View* focused_now) {
384 } 384 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/importer/import_progress_dialog_view.cc ('k') | chrome/browser/ui/views/notifications/balloon_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698