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

Side by Side Diff: chrome/browser/ui/cocoa/infobars/infobar_cocoa.h

Issue 240193003: Move Infobars core files to the Infobars component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nib name on mac Created 6 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_COCOA_INFOBARS_INFOBAR_COCOA_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_COCOA_H_ 6 #define CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_COCOA_H_
7 7
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/infobars/infobar.h" 10 #include "components/infobars/core/infobar.h"
11 11
12 @class InfoBarController; 12 @class InfoBarController;
13 13
14 // The cocoa specific implementation of InfoBar. The real info bar logic is 14 // The cocoa specific implementation of InfoBar. The real info bar logic is
15 // actually in InfoBarController. 15 // actually in InfoBarController.
16 class InfoBarCocoa : public InfoBar { 16 class InfoBarCocoa : public infobars::InfoBar {
17 public: 17 public:
18 explicit InfoBarCocoa(scoped_ptr<InfoBarDelegate> delegate); 18 explicit InfoBarCocoa(scoped_ptr<infobars::InfoBarDelegate> delegate);
19 19
20 virtual ~InfoBarCocoa(); 20 virtual ~InfoBarCocoa();
21 21
22 InfoBarController* controller() const { return controller_; } 22 InfoBarController* controller() const { return controller_; }
23 23
24 void set_controller(InfoBarController* controller) { 24 void set_controller(InfoBarController* controller) {
25 controller_.reset([controller retain]); 25 controller_.reset([controller retain]);
26 } 26 }
27 27
28 // These functions allow access to protected InfoBar functions. 28 // These functions allow access to protected InfoBar functions.
29 InfoBarManager* OwnerCocoa(); 29 infobars::InfoBarManager* OwnerCocoa();
30 30
31 base::WeakPtr<InfoBarCocoa> GetWeakPtr(); 31 base::WeakPtr<InfoBarCocoa> GetWeakPtr();
32 32
33 private: 33 private:
34 // The Objective-C class that contains most of the info bar logic. 34 // The Objective-C class that contains most of the info bar logic.
35 base::scoped_nsobject<InfoBarController> controller_; 35 base::scoped_nsobject<InfoBarController> controller_;
36 36
37 // Used to vend the link back to this for |controller_|. 37 // Used to vend the link back to this for |controller_|.
38 base::WeakPtrFactory<InfoBarCocoa> weak_ptr_factory_; 38 base::WeakPtrFactory<InfoBarCocoa> weak_ptr_factory_;
39 39
40 DISALLOW_COPY_AND_ASSIGN(InfoBarCocoa); 40 DISALLOW_COPY_AND_ASSIGN(InfoBarCocoa);
41 }; 41 };
42 42
43 #endif // CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_COCOA_H_ 43 #endif // CHROME_BROWSER_UI_COCOA_INFOBARS_INFOBAR_COCOA_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm ('k') | chrome/browser/ui/cocoa/infobars/infobar_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698