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

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

Issue 6893046: added CTRL+Click and SHIFT+Click handler for context menu, Back and Forward. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: make this patch applicable to the latest trunk Created 9 years, 6 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) 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/confirm_infobar.h" 5 #include "chrome/browser/ui/views/infobars/confirm_infobar.h"
6 6
7 #include "chrome/browser/event_disposition.h"
7 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" 8 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
8 #include "chrome/browser/ui/views/event_utils.h"
9 #include "views/controls/button/text_button.h" 9 #include "views/controls/button/text_button.h"
10 #include "views/controls/label.h" 10 #include "views/controls/label.h"
11 #include "views/controls/link.h" 11 #include "views/controls/link.h"
12 12
13 // ConfirmInfoBarDelegate ----------------------------------------------------- 13 // ConfirmInfoBarDelegate -----------------------------------------------------
14 14
15 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar(TabContentsWrapper* owner) { 15 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar(TabContentsWrapper* owner) {
16 return new ConfirmInfoBar(owner, this); 16 return new ConfirmInfoBar(owner, this);
17 } 17 }
18 18
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 before_cancel_spacing = kButtonButtonSpacing; 117 before_cancel_spacing = kButtonButtonSpacing;
118 } 118 }
119 return width + ((cancel_button_ == NULL) ? 0 : 119 return width + ((cancel_button_ == NULL) ? 0 :
120 (before_cancel_spacing + cancel_button_->GetPreferredSize().width())); 120 (before_cancel_spacing + cancel_button_->GetPreferredSize().width()));
121 } 121 }
122 122
123 void ConfirmInfoBar::LinkClicked(views::Link* source, int event_flags) { 123 void ConfirmInfoBar::LinkClicked(views::Link* source, int event_flags) {
124 DCHECK(link_ != NULL); 124 DCHECK(link_ != NULL);
125 DCHECK_EQ(link_, source); 125 DCHECK_EQ(link_, source);
126 if (GetDelegate()->LinkClicked( 126 if (GetDelegate()->LinkClicked(
127 event_utils::DispositionFromEventFlags(event_flags))) 127 browser::DispositionFromEventFlags(event_flags)))
128 RemoveInfoBar(); 128 RemoveInfoBar();
129 } 129 }
130 130
131 ConfirmInfoBarDelegate* ConfirmInfoBar::GetDelegate() { 131 ConfirmInfoBarDelegate* ConfirmInfoBar::GetDelegate() {
132 return delegate()->AsConfirmInfoBarDelegate(); 132 return delegate()->AsConfirmInfoBarDelegate();
133 } 133 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/event_utils.cc ('k') | chrome/browser/ui/views/infobars/link_infobar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698