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

Unified Diff: chrome/browser/infobars/infobar.h

Issue 23338005: Mac InfoBar: Use cross platform infobar classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/nibs/InfoBarContainer.xib ('k') | chrome/browser/infobars/infobar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/infobars/infobar.h
diff --git a/chrome/browser/infobars/infobar.h b/chrome/browser/infobars/infobar.h
index 1c0fbb9898fe1e5f2e29b6298782063969a49d7b..e7fb403c378bfa00a2f48fc34a7b828a4f8aec33 100644
--- a/chrome/browser/infobars/infobar.h
+++ b/chrome/browser/infobars/infobar.h
@@ -26,9 +26,6 @@ typedef InfoBarDelegate InfoBarAddedDetails;
typedef std::pair<InfoBarDelegate*, bool> InfoBarRemovedDetails;
typedef std::pair<InfoBarDelegate*, InfoBarDelegate*> InfoBarReplacedDetails;
-// TODO(pkasting): Port Mac to use this.
-#if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK) || defined(OS_ANDROID)
-
class InfoBarContainer;
class InfoBarService;
@@ -67,6 +64,15 @@ class InfoBar : public ui::AnimationDelegate {
// delegate once it is invisible.
void CloseSoon();
+ // Forwards a close request to our owner.
+ // NOTE: Subclasses should not call this if we're already unowned.
+ void RemoveSelf();
Peter Kasting 2013/08/24 03:03:39 One other note. Any way to avoid making these fun
sail 2013/08/25 18:31:07 Done. I needed these to be public so that the Obj
+
+ InfoBarService* owner() const { return owner_; }
+
+ // Changes the target height of the main ("bar") portion of the infobar.
+ void SetBarTargetHeight(int height);
+
const ui::SlideAnimation& animation() const { return animation_; }
int arrow_height() const { return arrow_height_; }
int arrow_target_height() const { return arrow_target_height_; }
@@ -77,19 +83,11 @@ class InfoBar : public ui::AnimationDelegate {
// ui::AnimationDelegate:
virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
- // Forwards a close request to our owner.
- // NOTE: Subclasses should not call this if we're already unowned.
- void RemoveSelf();
-
- // Changes the target height of the main ("bar") portion of the infobar.
- void SetBarTargetHeight(int height);
-
// Given a control with size |prefsize|, returns the centered y position
// within us, taking into account animation so the control "slides in" (or
// out) as we animate open and closed.
int OffsetY(const gfx::Size& prefsize) const;
- InfoBarService* owner() const { return owner_; }
const InfoBarContainer* container() const { return container_; }
InfoBarContainer* container() { return container_; }
ui::SlideAnimation* animation() { return &animation_; }
@@ -135,8 +133,4 @@ class InfoBar : public ui::AnimationDelegate {
DISALLOW_COPY_AND_ASSIGN(InfoBar);
};
-#elif defined(OS_MACOSX)
-#include "chrome/browser/ui/cocoa/infobars/infobar.h"
-#endif
-
#endif // CHROME_BROWSER_INFOBARS_INFOBAR_H_
« no previous file with comments | « chrome/app/nibs/InfoBarContainer.xib ('k') | chrome/browser/infobars/infobar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698