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

Side by Side Diff: components/infobars/core/infobar.h

Issue 2473863004: Remove MaterialDesignController::IsModeMaterial (Closed)
Patch Set: pkasting review and rebase Created 4 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
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.cc ('k') | components/infobars/core/infobar.cc » ('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 <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 26 matching lines...) Expand all
37 // the owning InfoBarManager, it must check whether that's still possible. 37 // the owning InfoBarManager, it must check whether that's still possible.
38 class InfoBar : public gfx::AnimationDelegate { 38 class InfoBar : public gfx::AnimationDelegate {
39 public: 39 public:
40 // These are the types passed as Details for infobar-related notifications. 40 // These are the types passed as Details for infobar-related notifications.
41 typedef InfoBar AddedDetails; 41 typedef InfoBar AddedDetails;
42 typedef std::pair<InfoBar*, bool> RemovedDetails; 42 typedef std::pair<InfoBar*, bool> RemovedDetails;
43 43
44 explicit InfoBar(std::unique_ptr<InfoBarDelegate> delegate); 44 explicit InfoBar(std::unique_ptr<InfoBarDelegate> delegate);
45 ~InfoBar() override; 45 ~InfoBar() override;
46 46
47 static SkColor GetTopColor(InfoBarDelegate::Type infobar_type); 47 static SkColor GetBackgroundColor(InfoBarDelegate::Type infobar_type);
48 static SkColor GetBottomColor(InfoBarDelegate::Type infobar_type);
49 48
50 InfoBarManager* owner() { return owner_; } 49 InfoBarManager* owner() { return owner_; }
51 InfoBarDelegate* delegate() const { return delegate_.get(); } 50 InfoBarDelegate* delegate() const { return delegate_.get(); }
52 void set_container(InfoBarContainer* container) { container_ = container; } 51 void set_container(InfoBarContainer* container) { container_ = container; }
53 52
54 // Sets |owner_|. This also sets the nav entry ID on |delegate_|. This must 53 // Sets |owner_|. This also sets the nav entry ID on |delegate_|. This must
55 // only be called once as there's no way to extract an infobar from its owner 54 // only be called once as there's no way to extract an infobar from its owner
56 // without deleting it, for reparenting in another tab. 55 // without deleting it, for reparenting in another tab.
57 void SetOwner(InfoBarManager* owner); 56 void SetOwner(InfoBarManager* owner);
58 57
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 int arrow_half_width_; // Includes only fill. 133 int arrow_half_width_; // Includes only fill.
135 int bar_height_; // Includes both fill and bottom separator. 134 int bar_height_; // Includes both fill and bottom separator.
136 int bar_target_height_; // May be left as -1, meaning "use default". 135 int bar_target_height_; // May be left as -1, meaning "use default".
137 136
138 DISALLOW_COPY_AND_ASSIGN(InfoBar); 137 DISALLOW_COPY_AND_ASSIGN(InfoBar);
139 }; 138 };
140 139
141 } // namespace infobars 140 } // namespace infobars
142 141
143 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_H_ 142 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.cc ('k') | components/infobars/core/infobar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698