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/alternate_nav_infobar_view.h" | 5 #include "chrome/browser/ui/views/infobars/alternate_nav_infobar_view.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/event_disposition.h" | 8 #include "chrome/browser/event_disposition.h" |
9 #include "chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h" | 9 #include "chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h" |
10 #include "ui/views/controls/label.h" | 10 #include "ui/views/controls/label.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 if (!owned()) | 79 if (!owned()) |
80 return; // We're closing; don't call anything, it might access the owner. | 80 return; // We're closing; don't call anything, it might access the owner. |
81 DCHECK(link_ != NULL); | 81 DCHECK(link_ != NULL); |
82 DCHECK_EQ(link_, source); | 82 DCHECK_EQ(link_, source); |
83 if (GetDelegate()->LinkClicked( | 83 if (GetDelegate()->LinkClicked( |
84 chrome::DispositionFromEventFlags(event_flags))) | 84 chrome::DispositionFromEventFlags(event_flags))) |
85 RemoveSelf(); | 85 RemoveSelf(); |
86 } | 86 } |
87 | 87 |
88 AlternateNavInfoBarDelegate* AlternateNavInfoBarView::GetDelegate() { | 88 AlternateNavInfoBarDelegate* AlternateNavInfoBarView::GetDelegate() { |
89 return delegate()->AsAlternateNavInfoBarDelegate(); | 89 return static_cast<AlternateNavInfoBarDelegate*>(delegate()); |
90 } | 90 } |
OLD | NEW |