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

Unified Diff: chrome/browser/ui/cocoa/infobars/infobar_cocoa.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/browser/ui/cocoa/infobars/infobar.h ('k') | chrome/browser/ui/cocoa/infobars/infobar_cocoa.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/infobars/infobar_cocoa.h
diff --git a/chrome/browser/ui/cocoa/infobars/infobar_cocoa.h b/chrome/browser/ui/cocoa/infobars/infobar_cocoa.h
new file mode 100644
index 0000000000000000000000000000000000000000..f9588113a6d8d014ce22b560099190716e24e622
--- /dev/null
+++ b/chrome/browser/ui/cocoa/infobars/infobar_cocoa.h
@@ -0,0 +1,38 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_COCOA_H_
+#define CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_COCOA_H_
+
+#include "base/mac/scoped_nsobject.h"
+#include "chrome/browser/infobars/infobar.h"
+
+@class InfoBarController;
+
+// The cocoa specific implementation of InfoBar. The real info bar logic is
+// actually in InfoBarController.
+class InfoBarCocoa : public InfoBar {
+ public:
+ InfoBarCocoa(InfoBarService* owner, InfoBarDelegate* delegate);
+
+ virtual ~InfoBarCocoa();
+
+ InfoBarController* controller() const { return controller_; }
+
+ void set_controller(InfoBarController* controller) {
+ controller_.reset([controller retain]);
+ }
+
+ // These functions allow access to protected InfoBar functions.
+ void RemoveSelfCocoa();
+ InfoBarService* OwnerCocoa();
+
+ private:
+ // The Objective-C class that contains most of the info bar logic.
+ base::scoped_nsobject<InfoBarController> controller_;
+
+ DISALLOW_COPY_AND_ASSIGN(InfoBarCocoa);
+};
+
+#endif // CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_COCOA_H_
« no previous file with comments | « chrome/browser/ui/cocoa/infobars/infobar.h ('k') | chrome/browser/ui/cocoa/infobars/infobar_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698