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

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

Issue 6989001: Misc. infobar stuff: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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/translate_message_infobar.h" 5 #include "chrome/browser/ui/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 "views/controls/button/text_button.h" 8 #include "views/controls/button/text_button.h"
9 #include "views/controls/label.h" 9 #include "views/controls/label.h"
10 10
11 TranslateMessageInfoBar::TranslateMessageInfoBar( 11 TranslateMessageInfoBar::TranslateMessageInfoBar(
12 TabContentsWrapper* owner,
12 TranslateInfoBarDelegate* delegate) 13 TranslateInfoBarDelegate* delegate)
13 : TranslateInfoBarBase(delegate), 14 : TranslateInfoBarBase(owner, delegate),
14 label_(NULL), 15 label_(NULL),
15 button_(NULL) { 16 button_(NULL) {
16 } 17 }
17 18
18 TranslateMessageInfoBar::~TranslateMessageInfoBar() { 19 TranslateMessageInfoBar::~TranslateMessageInfoBar() {
19 } 20 }
20 21
21 void TranslateMessageInfoBar::Layout() { 22 void TranslateMessageInfoBar::Layout() {
22 TranslateInfoBarBase::Layout(); 23 TranslateInfoBarBase::Layout();
23 24
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 if (sender == button_) 60 if (sender == button_)
60 GetDelegate()->MessageInfoBarButtonPressed(); 61 GetDelegate()->MessageInfoBarButtonPressed();
61 else 62 else
62 TranslateInfoBarBase::ButtonPressed(sender, event); 63 TranslateInfoBarBase::ButtonPressed(sender, event);
63 } 64 }
64 65
65 int TranslateMessageInfoBar::ContentMinimumWidth() const { 66 int TranslateMessageInfoBar::ContentMinimumWidth() const {
66 return (button_ != NULL) ? 67 return (button_ != NULL) ?
67 (button_->GetPreferredSize().width() + kButtonInLabelSpacing) : 0; 68 (button_->GetPreferredSize().width() + kButtonInLabelSpacing) : 0;
68 } 69 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/translate_message_infobar.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698