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

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

Issue 4767001: Make TabContents own its infobar delegates.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/views/infobars/translate_message_infobar.h" 5 #include "chrome/browser/views/infobars/translate_message_infobar.h"
6 6
7 #include "chrome/browser/translate/translate_infobar_delegate.h" 7 #include "chrome/browser/translate/translate_infobar_delegate.h"
8 #include "chrome/browser/views/infobars/infobar_text_button.h" 8 #include "chrome/browser/views/infobars/infobar_text_button.h"
9 #include "views/controls/image_view.h" 9 #include "views/controls/image_view.h"
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 if (button_) { 42 if (button_) {
43 button_->SetBounds(label_->bounds().right() + 43 button_->SetBounds(label_->bounds().right() +
44 InfoBar::kButtonInLabelSpacing, 44 InfoBar::kButtonInLabelSpacing,
45 InfoBar::OffsetY(this, button_pref_size), 45 InfoBar::OffsetY(this, button_pref_size),
46 button_pref_size.width(), button_pref_size.height()); 46 button_pref_size.width(), button_pref_size.height());
47 } 47 }
48 } 48 }
49 49
50 void TranslateMessageInfoBar::ButtonPressed(views::Button* sender, 50 void TranslateMessageInfoBar::ButtonPressed(views::Button* sender,
51 const views::Event& event) { 51 const views::Event& event) {
52 if (sender == button_) { 52 if (delegate() && (sender == button_)) {
53 GetDelegate()->MessageInfoBarButtonPressed(); 53 GetDelegate()->MessageInfoBarButtonPressed();
54 return; 54 return;
55 } 55 }
56 TranslateInfoBarBase::ButtonPressed(sender, event); 56 TranslateInfoBarBase::ButtonPressed(sender, event);
57 } 57 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698