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 <stddef.h> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 #include "chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h" | 10 #include "chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h" |
9 #include "ui/base/window_open_disposition.h" | 11 #include "ui/base/window_open_disposition.h" |
10 #include "ui/gfx/text_elider.h" | 12 #include "ui/gfx/text_elider.h" |
11 #include "ui/views/controls/label.h" | 13 #include "ui/views/controls/label.h" |
12 #include "ui/views/controls/link.h" | 14 #include "ui/views/controls/link.h" |
13 | 15 |
14 | 16 |
15 // AlternateNavInfoBarDelegate ------------------------------------------------- | 17 // AlternateNavInfoBarDelegate ------------------------------------------------- |
16 | 18 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 return; // We're closing; don't call anything, it might access the owner. | 108 return; // We're closing; don't call anything, it might access the owner. |
107 DCHECK(link_ != NULL); | 109 DCHECK(link_ != NULL); |
108 DCHECK_EQ(link_, source); | 110 DCHECK_EQ(link_, source); |
109 if (GetDelegate()->LinkClicked(ui::DispositionFromEventFlags(event_flags))) | 111 if (GetDelegate()->LinkClicked(ui::DispositionFromEventFlags(event_flags))) |
110 RemoveSelf(); | 112 RemoveSelf(); |
111 } | 113 } |
112 | 114 |
113 AlternateNavInfoBarDelegate* AlternateNavInfoBarView::GetDelegate() { | 115 AlternateNavInfoBarDelegate* AlternateNavInfoBarView::GetDelegate() { |
114 return static_cast<AlternateNavInfoBarDelegate*>(delegate()); | 116 return static_cast<AlternateNavInfoBarDelegate*>(delegate()); |
115 } | 117 } |
OLD | NEW |