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

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

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 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 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_ALTERNATE_NAV_INFOBAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_ALTERNATE_NAV_INFOBAR_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_ALTERNATE_NAV_INFOBAR_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_ALTERNATE_NAV_INFOBAR_VIEW_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/ui/views/infobars/infobar_view.h" 9 #include "chrome/browser/ui/views/infobars/infobar_view.h"
10 #include "ui/views/controls/link_listener.h" 10 #include "ui/views/controls/link_listener.h"
(...skipping 16 matching lines...) Expand all
27 // a lone ellipsis. 27 // a lone ellipsis.
28 // 28 //
29 // NOTE: This may modify the text of any/all of the labels, so reset their 29 // NOTE: This may modify the text of any/all of the labels, so reset their
30 // texts when the available width changes before calling this again. 30 // texts when the available width changes before calling this again.
31 static void ElideLabels(Labels* labels, int available_width); 31 static void ElideLabels(Labels* labels, int available_width);
32 32
33 // InfoBarView: 33 // InfoBarView:
34 virtual void Layout() OVERRIDE; 34 virtual void Layout() OVERRIDE;
35 virtual void ViewHierarchyChanged( 35 virtual void ViewHierarchyChanged(
36 const ViewHierarchyChangedDetails& details) OVERRIDE; 36 const ViewHierarchyChangedDetails& details) OVERRIDE;
37 virtual int ContentMinimumWidth() OVERRIDE; 37 virtual int ContentMinimumWidth() const OVERRIDE;
38 38
39 // views::LinkListener: 39 // views::LinkListener:
40 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; 40 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
41 41
42 AlternateNavInfoBarDelegate* GetDelegate(); 42 AlternateNavInfoBarDelegate* GetDelegate();
43 43
44 base::string16 label_1_text_; 44 base::string16 label_1_text_;
45 base::string16 link_text_; 45 base::string16 link_text_;
46 base::string16 label_2_text_; 46 base::string16 label_2_text_;
47 47
48 views::Label* label_1_; 48 views::Label* label_1_;
49 views::Link* link_; 49 views::Link* link_;
50 views::Label* label_2_; 50 views::Label* label_2_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(AlternateNavInfoBarView); 52 DISALLOW_COPY_AND_ASSIGN(AlternateNavInfoBarView);
53 }; 53 };
54 54
55 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_ALTERNATE_NAV_INFOBAR_VIEW_H_ 55 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_ALTERNATE_NAV_INFOBAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698