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

Side by Side Diff: chrome/browser/ui/views/infobars/alternate_nav_infobar_view.cc

Issue 11896047: Move the methods in disposition_utils.h and event_disposition.h to ui\base\window_open_disposition.… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix regex in ui.gyp Created 7 years, 11 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) 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"
9 #include "chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h" 8 #include "chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h"
9 #include "ui/base/window_open_disposition.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 // AlternateNavInfoBarDelegate ------------------------------------------------- 13 // AlternateNavInfoBarDelegate -------------------------------------------------
14 14
15 InfoBar* AlternateNavInfoBarDelegate::CreateInfoBar(InfoBarService* owner) { 15 InfoBar* AlternateNavInfoBarDelegate::CreateInfoBar(InfoBarService* owner) {
16 return new AlternateNavInfoBarView(owner, this); 16 return new AlternateNavInfoBarView(owner, this);
17 } 17 }
18 18
19 // AlternateNavInfoBarView ----------------------------------------------------- 19 // AlternateNavInfoBarView -----------------------------------------------------
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // the close button is the last child. 73 // the close button is the last child.
74 InfoBarView::ViewHierarchyChanged(is_add, parent, child); 74 InfoBarView::ViewHierarchyChanged(is_add, parent, child);
75 } 75 }
76 76
77 void AlternateNavInfoBarView::LinkClicked(views::Link* source, 77 void AlternateNavInfoBarView::LinkClicked(views::Link* source,
78 int event_flags) { 78 int event_flags) {
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(ui::DispositionFromEventFlags(event_flags)))
84 chrome::DispositionFromEventFlags(event_flags)))
85 RemoveSelf(); 84 RemoveSelf();
86 } 85 }
87 86
88 AlternateNavInfoBarDelegate* AlternateNavInfoBarView::GetDelegate() { 87 AlternateNavInfoBarDelegate* AlternateNavInfoBarView::GetDelegate() {
89 return static_cast<AlternateNavInfoBarDelegate*>(delegate()); 88 return static_cast<AlternateNavInfoBarDelegate*>(delegate());
90 } 89 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | chrome/browser/ui/views/infobars/confirm_infobar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698