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

Side by Side Diff: chrome/browser/autofill/autofill_cc_infobar_win.cc

Issue 6539002: Begun the DCHECK() cleanup. Starting off with /src/chrome/a* and /src/chrome/... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 10 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 #include "chrome/browser/autofill/autofill_cc_infobar.h" 5 #include "chrome/browser/autofill/autofill_cc_infobar.h"
6 6
7 #include "chrome/browser/tab_contents/infobar_delegate.h" 7 #include "chrome/browser/tab_contents/infobar_delegate.h"
8 #include "chrome/browser/ui/views/event_utils.h" 8 #include "chrome/browser/ui/views/event_utils.h"
9 #include "chrome/browser/ui/views/infobars/confirm_infobar.h" 9 #include "chrome/browser/ui/views/infobars/confirm_infobar.h"
10 #include "chrome/browser/ui/views/infobars/infobar_text_button.h" 10 #include "chrome/browser/ui/views/infobars/infobar_text_button.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 save_button_->SetBounds(save_x, OffsetY(this, save_ps), save_ps.width(), 114 save_button_->SetBounds(save_x, OffsetY(this, save_ps), save_ps.width(),
115 save_ps.height()); 115 save_ps.height());
116 int dont_save_x = save_x + save_ps.width() + kButtonButtonSpacing; 116 int dont_save_x = save_x + save_ps.width() + kButtonButtonSpacing;
117 dont_save_button_->SetBounds(dont_save_x, OffsetY(this, dont_save_ps), 117 dont_save_button_->SetBounds(dont_save_x, OffsetY(this, dont_save_ps),
118 dont_save_ps.width(), dont_save_ps.height()); 118 dont_save_ps.width(), dont_save_ps.height());
119 } 119 }
120 120
121 void SaveCCInfoConfirmInfoBar::LinkActivated(views::Link* source, 121 void SaveCCInfoConfirmInfoBar::LinkActivated(views::Link* source,
122 int event_flags) { 122 int event_flags) {
123 DCHECK(source == link_); 123 DCHECK_EQ(source, link_);
124 DCHECK(link_->IsVisible()); 124 DCHECK(link_->IsVisible());
125 DCHECK(!link_->GetText().empty()); 125 DCHECK(!link_->GetText().empty());
126 GetDelegate()->LinkClicked( 126 GetDelegate()->LinkClicked(
127 event_utils::DispositionFromEventFlags(event_flags)); 127 event_utils::DispositionFromEventFlags(event_flags));
128 } 128 }
129 129
130 void SaveCCInfoConfirmInfoBar::ViewHierarchyChanged(bool is_add, 130 void SaveCCInfoConfirmInfoBar::ViewHierarchyChanged(bool is_add,
131 views::View* parent, 131 views::View* parent,
132 views::View* child) { 132 views::View* child) {
133 InfoBarView::ViewHierarchyChanged(is_add, parent, child); 133 InfoBarView::ViewHierarchyChanged(is_add, parent, child);
(...skipping 29 matching lines...) Expand all
163 } 163 }
164 164
165 ConfirmInfoBarDelegate* SaveCCInfoConfirmInfoBar::GetDelegate() { 165 ConfirmInfoBarDelegate* SaveCCInfoConfirmInfoBar::GetDelegate() {
166 return delegate()->AsConfirmInfoBarDelegate(); 166 return delegate()->AsConfirmInfoBarDelegate();
167 } 167 }
168 168
169 InfoBar* CreateAutofillCcInfoBar(ConfirmInfoBarDelegate* delegate) { 169 InfoBar* CreateAutofillCcInfoBar(ConfirmInfoBarDelegate* delegate) {
170 DCHECK(delegate); 170 DCHECK(delegate);
171 return new SaveCCInfoConfirmInfoBar(delegate); 171 return new SaveCCInfoConfirmInfoBar(delegate);
172 } 172 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698