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

Side by Side Diff: components/infobars/core/infobar.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
« no previous file with comments | « chrome/test/base/view_event_test_base.cc ('k') | components/infobars/core/infobar_container.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_INFOBARS_CORE_INFOBAR_H_ 5 #ifndef COMPONENTS_INFOBARS_CORE_INFOBAR_H_
6 #define COMPONENTS_INFOBARS_CORE_INFOBAR_H_ 6 #define COMPONENTS_INFOBARS_CORE_INFOBAR_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 static const int kDefaultArrowTargetHalfWidth; 50 static const int kDefaultArrowTargetHalfWidth;
51 static const int kMaximumArrowTargetHalfWidth; 51 static const int kMaximumArrowTargetHalfWidth;
52 52
53 explicit InfoBar(scoped_ptr<InfoBarDelegate> delegate); 53 explicit InfoBar(scoped_ptr<InfoBarDelegate> delegate);
54 virtual ~InfoBar(); 54 virtual ~InfoBar();
55 55
56 static SkColor GetTopColor(InfoBarDelegate::Type infobar_type); 56 static SkColor GetTopColor(InfoBarDelegate::Type infobar_type);
57 static SkColor GetBottomColor(InfoBarDelegate::Type infobar_type); 57 static SkColor GetBottomColor(InfoBarDelegate::Type infobar_type);
58 58
59 InfoBarManager* owner() { return owner_; } 59 InfoBarManager* owner() { return owner_; }
60 InfoBarDelegate* delegate() { return delegate_.get(); } 60 InfoBarDelegate* delegate() const { return delegate_.get(); }
61 const InfoBarDelegate* delegate() const { return delegate_.get(); }
62 void set_container(InfoBarContainer* container) { container_ = container; } 61 void set_container(InfoBarContainer* container) { container_ = container; }
63 62
64 // Sets |owner_|. This also calls StoreActiveEntryUniqueID() on |delegate_|. 63 // Sets |owner_|. This also calls StoreActiveEntryUniqueID() on |delegate_|.
65 // This must only be called once as there's no way to extract an infobar from 64 // This must only be called once as there's no way to extract an infobar from
66 // its owner without deleting it, for reparenting in another tab. 65 // its owner without deleting it, for reparenting in another tab.
67 void SetOwner(InfoBarManager* owner); 66 void SetOwner(InfoBarManager* owner);
68 67
69 // Makes the infobar visible. If |animate| is true, the infobar is then 68 // Makes the infobar visible. If |animate| is true, the infobar is then
70 // animated to full size. 69 // animated to full size.
71 void Show(bool animate); 70 void Show(bool animate);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 int arrow_half_width_; // Includes only fill. 142 int arrow_half_width_; // Includes only fill.
144 int bar_height_; // Includes both fill and bottom separator. 143 int bar_height_; // Includes both fill and bottom separator.
145 int bar_target_height_; 144 int bar_target_height_;
146 145
147 DISALLOW_COPY_AND_ASSIGN(InfoBar); 146 DISALLOW_COPY_AND_ASSIGN(InfoBar);
148 }; 147 };
149 148
150 } // namespace infobars 149 } // namespace infobars
151 150
152 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_H_ 151 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_H_
OLDNEW
« no previous file with comments | « chrome/test/base/view_event_test_base.cc ('k') | components/infobars/core/infobar_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698