OLD | NEW |
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/link_infobar.h" | 5 #include "chrome/browser/ui/views/infobars/link_infobar.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/api/infobars/link_infobar_delegate.h" |
8 #include "chrome/browser/event_disposition.h" | 9 #include "chrome/browser/event_disposition.h" |
9 #include "chrome/browser/tab_contents/link_infobar_delegate.h" | |
10 #include "ui/views/controls/label.h" | 10 #include "ui/views/controls/label.h" |
11 #include "ui/views/controls/link.h" | 11 #include "ui/views/controls/link.h" |
12 | 12 |
13 // LinkInfoBarDelegate -------------------------------------------------------- | 13 // LinkInfoBarDelegate -------------------------------------------------------- |
14 | 14 |
15 InfoBar* LinkInfoBarDelegate::CreateInfoBar(InfoBarTabHelper* owner) { | 15 InfoBar* LinkInfoBarDelegate::CreateInfoBar(InfoBarTabHelper* owner) { |
16 return new LinkInfoBar(owner, this); | 16 return new LinkInfoBar(owner, this); |
17 } | 17 } |
18 | 18 |
19 // LinkInfoBar ---------------------------------------------------------------- | 19 // LinkInfoBar ---------------------------------------------------------------- |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 DCHECK(link_ != NULL); | 77 DCHECK(link_ != NULL); |
78 DCHECK_EQ(link_, source); | 78 DCHECK_EQ(link_, source); |
79 if (GetDelegate()->LinkClicked( | 79 if (GetDelegate()->LinkClicked( |
80 chrome::DispositionFromEventFlags(event_flags))) | 80 chrome::DispositionFromEventFlags(event_flags))) |
81 RemoveSelf(); | 81 RemoveSelf(); |
82 } | 82 } |
83 | 83 |
84 LinkInfoBarDelegate* LinkInfoBar::GetDelegate() { | 84 LinkInfoBarDelegate* LinkInfoBar::GetDelegate() { |
85 return delegate()->AsLinkInfoBarDelegate(); | 85 return delegate()->AsLinkInfoBarDelegate(); |
86 } | 86 } |
OLD | NEW |