| OLD | NEW |
| 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/ui/views/infobars/link_infobar.h" | 5 #include "chrome/browser/ui/views/infobars/link_infobar.h" |
| 6 | 6 |
| 7 #include "chrome/browser/tab_contents/infobar_delegate.h" | 7 #include "chrome/browser/tab_contents/link_infobar_delegate.h" |
| 8 #include "chrome/browser/ui/views/event_utils.h" | 8 #include "chrome/browser/ui/views/event_utils.h" |
| 9 | 9 |
| 10 // LinkInfoBarDelegate -------------------------------------------------------- | 10 // LinkInfoBarDelegate -------------------------------------------------------- |
| 11 | 11 |
| 12 InfoBar* LinkInfoBarDelegate::CreateInfoBar() { | 12 InfoBar* LinkInfoBarDelegate::CreateInfoBar() { |
| 13 return new LinkInfoBar(this); | 13 return new LinkInfoBar(this); |
| 14 } | 14 } |
| 15 | 15 |
| 16 // LinkInfoBar ---------------------------------------------------------------- | 16 // LinkInfoBar ---------------------------------------------------------------- |
| 17 | 17 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 DCHECK(link_ != NULL); | 72 DCHECK(link_ != NULL); |
| 73 DCHECK_EQ(link_, source); | 73 DCHECK_EQ(link_, source); |
| 74 if (GetDelegate()->LinkClicked( | 74 if (GetDelegate()->LinkClicked( |
| 75 event_utils::DispositionFromEventFlags(event_flags))) | 75 event_utils::DispositionFromEventFlags(event_flags))) |
| 76 RemoveInfoBar(); | 76 RemoveInfoBar(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 LinkInfoBarDelegate* LinkInfoBar::GetDelegate() { | 79 LinkInfoBarDelegate* LinkInfoBar::GetDelegate() { |
| 80 return delegate()->AsLinkInfoBarDelegate(); | 80 return delegate()->AsLinkInfoBarDelegate(); |
| 81 } | 81 } |
| OLD | NEW |